This function creates a new local checkpoint (corona) visible for one player only and returns a pointer to it. If the creation was unsuccessful, the function will return null.
CreateClientCheckpoint can take 3 different lists of parameters:
- CreateClientCheckpoint( Vector pos, float radius, Player plr )
- CreateClientCheckpoint( Vector pos, float radius, Colour col, Player plr )
- CreateClientCheckpoint( Vector pos, float radius, int red, int green, int blue, Player plr )
- pos - The position where you want the checkpoint to be created
- radius - The radius of the checkpoint to be created
- plr - The owner of this checkpoint (the player who will be able to see it)
- col - The colour of the checkpoint as a Colour object. If no colour is used the checkpoint will default to red
- red, green, blue - The colour of the checkpoint as separate RGB values
This command will create a blue checkpoint at the player's location.
- function onPlayerCommand( player, cmd, text )
- if ( cmd == "cp" )
- local pos = player.Pos;
- CreateClientCheckpoint( pos, 5.0, Colour( 0, 0, 255 ), player );
- return 1;
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.