Scripting/Squirrel/Functions/CreateCheckpoint: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
{{Scripting/Squirrel/Functions/Checkpoint_Functions}} | {{Scripting/Squirrel/Functions/Checkpoint_Functions}} | ||
[[Category:Scripting/Squirrel/Functions/Checkpoint_Functions]] |
Revision as of 17:58, 30 January 2017
CreateCheckpoint is a function that creates a checkpoint. Checkpoints are used in racing.
Syntax
CreateCheckpoint(player, world, isSphere, pos, rgb, radius)
Arguments
- Player | null player - The player to stream this checkpoint to. If the variable is null, it will be shown to everyone
- int world - The world id
- bool isSphere - 'true' for is Sphere and 'false' for not (Added in 04rel004 will not work in earlier versions!)
- Vector pos - The checkpoint position
- cRGB rgb - The checkpoint color
- int radius - The diameter of the checkoint
Example
The following example will create a checkpoint:
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "createcheckpoint" )
{
CreateCheckpoint( null, 0, false, player.Pos, RGB(255, 0, 255), 2);
}
}
Notes
Call onPlayerCommand were used in this example. More info about them in the corresponding pages.