Scripting/Server/Functions/CreateCheckpoint

Creates a race-style checkpoint (the tall tube marker of the GTA III races and the Patriot Playground) that fires onPlayerEnterCheckpoint/onPlayerExitCheckpoint. Radius 0 or less becomes 1.5. Default colour is GTA blue. Checkpoints use the same slots as spheres.

Syntax

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

Arguments

Returns

Checkpoint or null.

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "createcheckpoint" )
	{
		local result = CreateCheckpoint( player.Pos, 5.0 );
		MessagePlayer( "CreateCheckpoint 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