Scripting/Squirrel/Functions/Checkpoint.Owner: 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 "This function gets the Owner of a checkpoint. == Syntax == <pre>Checkpoint.Owner</pre> == Example == <source lang="squirrel"> </source> === Notes === == Related Function...") |
No edit summary |
||
Line 2: | Line 2: | ||
== Syntax == | == Syntax == | ||
<pre>Checkpoint.Owner</pre> | <pre>Checkpoint.Owner</pre> | ||
== Example == | == Example == | ||
Note: If there is no Owner set for the Checkpoint this function will return: (null : 0x0000000000000000) | |||
<source lang="squirrel"> | <source lang="squirrel"> | ||
function onPlayerCommand(player, command, arguments) | |||
{ | |||
if(cmd == "playercp") | |||
{ | |||
CheckpointTest <- CreateCheckpoint(player, 0, player.Pos, RGB(255, 0, 255), 2); | |||
ClientMessage("[#ffffff]Checkpoint Owner: " + CheckpointTest.Owner,player,255,255,255); | |||
} | |||
return 1; | |||
} | |||
</source> | </source> | ||
=== Notes === | === Notes === | ||
Call [[onPlayerCommand]] were used in this example. More info about them in the corresponding pages. | |||
== Related Functions == | == Related Functions == | ||
{{Scripting/Squirrel/Functions/Checkpoint_Functions}} | {{Scripting/Squirrel/Functions/Checkpoint_Functions}} |
Revision as of 16:23, 25 April 2016
This function gets the Owner of a checkpoint.
Syntax
Checkpoint.Owner
Example
Note: If there is no Owner set for the Checkpoint this function will return: (null : 0x0000000000000000)
function onPlayerCommand(player, command, arguments)
{
if(cmd == "playercp")
{
CheckpointTest <- CreateCheckpoint(player, 0, player.Pos, RGB(255, 0, 255), 2);
ClientMessage("[#ffffff]Checkpoint Owner: " + CheckpointTest.Owner,player,255,255,255);
}
return 1;
}
Notes
Call onPlayerCommand were used in this example. More info about them in the corresponding pages.