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
No edit summary |
No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 21: | Line 21: | ||
else | else | ||
{ | { | ||
MessagePlayer("[#FF0000]Checkpoint has not been found", player); | MessagePlayer("[#FF0000]Checkpoint has not been found!", player); | ||
} | } | ||
} | } | ||
Line 30: | Line 30: | ||
=== Notes === | === Notes === | ||
Call [[onPlayerCommand]] was used in this example. More info about it in the page. | Call [[onPlayerCommand]] was used in this example. More info about it in the page. | ||
== Related Functions == | |||
{{Scripting/Squirrel/Functions/Checkpoint_Functions}} | |||
[[Category:Scripting/Squirrel/Functions/Checkpoint_Functions]] |
Latest revision as of 17:59, 30 January 2017
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)
{
MessagePlayer("[#00FF00]Checkpoint has been found!", player);
}
else
{
MessagePlayer("[#FF0000]Checkpoint has not been found!", player);
}
}
return 1;
}
Notes
Call onPlayerCommand was used in this example. More info about it in the page.