Scripting/Squirrel/Functions/FindCheckpoint: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "== Syntax == <pre>FindCheckPoint(ID)</pre> == Arguments == *''int'' '''ID''' - The ID of the Checkpoint to find == Example == <source lang=squirrel> function onPlayerComm...") |
(No difference)
|
Revision as of 20:17, 7 August 2015
Syntax
FindCheckPoint(ID)
Arguments
- int ID - The ID of the Checkpoint to find
Example
function onPlayerCommand( player, cmd, text )
{
if(cmd == "findcp")
{
local cp = FindCheckPoint(text.tointeger());
if (cp)
{
cp.Pos = player.Pos;
MessagePlayer("[#00FF00]CheckPoint has been found and has been teleported to you!", player);
} else {
MessagePlayer("[#FF0000]CheckPoint has not been found :(", player);
}
}
}
Notes
Call onPlayerCommand was used in this example. More info about it in the page.