Squirrel/Server/Events/Checkpoint/onPlayerEnterCheckpoint

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|onPlayerEnterCheckpoint}} This event is called when a player enters a checkpoint. == Syntax == <code>function onPlayerEnterCheckpoint( Player plr, Checkpoint c…')
 
m
 
Line 30: Line 30:
 
=== Notes ===
 
=== Notes ===
  
The function [[Squirrel/Server/Functions/Checkpoints/Remove|Checkpoint.Remove]] was used in in this example. More info about this in the corresponding page.
+
The function [[Squirrel/Server/Functions/Checkpoints/Remove|Checkpoint.Remove]] was used in this example. More info about this in the corresponding page.
  
 
== Related Events ==
 
== Related Events ==

Latest revision as of 12:40, 11 November 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when a player enters a checkpoint.

[edit] Syntax

  1. function onPlayerEnterCheckpoint( Player plr, Checkpoint cp )

[edit] Arguments

  • plr - The player who entered the checkpoint
  • cp - The checkpoint the player entered

[edit] Returns

This event does not handle return values.

[edit] Example

This example will remove the checkpoint after a player has entered it.

  1.  
  2. function onPlayerEnterCheckpoint( player, cp )
  3. {
  4. cp.Remove();
  5. return 1;
  6. }
  7.  

[edit] Notes

The function Checkpoint.Remove was used in this example. More info about this in the corresponding page.

[edit] Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox