Squirrel/Server/Functions/Checkpoints/ID
From Liberty Unleashed Wiki
(Difference between revisions)
m (Fixed a bug) |
|||
Line 16: | Line 16: | ||
function onPlayerEnterCheckpoint( player, checkpoint ) | function onPlayerEnterCheckpoint( player, checkpoint ) | ||
{ | { | ||
− | + | MessagePlayer( "The current id of this checkpoint is: " + checkpoint.ID, player ); | |
+ | |||
+ | return 1; | ||
} | } | ||
</code> | </code> |
Revision as of 19:47, 24 September 2010
This Checkpoint class member returns the ID of the checkpoint.
Syntax
int Checkpoint.ID
Arguments
- none
Example
This example will message the player with the current ID of the checkpoint.
function onPlayerEnterCheckpoint( player, checkpoint ) { MessagePlayer( "The current id of this checkpoint is: " + checkpoint.ID, player ); return 1; }
Notes
The function MessagePlayer and event onPlayerEnterCheckpoint were used in in this example. More info about them in the corresponding pages.