OnCheckpointEntered: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This is called when a player enters any checkpoint == Syntax == <pre>function onCheckpointEntered( player, checkpoint )</pre> == Arguments == * '''player''' - The pointer...")
 
 
Line 1: Line 1:
This is called when a player enters any checkpoint
#REDIRECT [[Scripting/Squirrel/Events/OnCheckpointEntered]]
 
== Syntax ==
 
<pre>function onCheckpointEntered( player, checkpoint )</pre>
 
== Arguments ==
 
* '''player''' - The pointer of the new player
* '''checkpoint''' - The pointer of the checkpoint
 
== Example ==
 
<source lang="squirrel">
function onCheckpointEntered( player, checkpoint )
{
    MessagePlayer( "You have entered a checkpoint! ID: " + checkpoint.ID, player );   
}
</source>
 
=== Notes ===
 
The functions [[Scripting/Squirrel/Functions/MessagePlayer|MessagePlayer]] and [[Scripting/Squirrel/Functions/Checkpoint.ID|Checkpoint.ID]] were used in this example. More info about them in corresponding pages.
 
== Related Functions ==
 
{{Scripting/Squirrel/Events/Checkpoint_Events}}

Latest revision as of 20:40, 18 April 2016