Scripting/Server/Functions/CreateSphere

Creates a coloured sphere marker that fires onPlayerEnterSphere/onPlayerExitSphere. Radius 0 or less becomes 1.5. Default colour is GTA blue.

Syntax

CreateSphere(pos, radius [, colour])
CreateSphere(pos, radius, r, g, b)

Arguments

Returns

Sphere or null.

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "createsphere" )
	{
		local result = CreateSphere( player.Pos, 5.0 );
		MessagePlayer( "CreateSphere returned: " + result, player );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Creating world entities

Categories: Server functions | Creating world entities