Squirrel/Server/Functions/Checkpoints/Owner

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|Checkpoint.Owner}} This ''Checkpoint'' class member returns the owner of the checkpoint or ''null'' if the checkpoint is a global one. == Syntax == <code>Player…')
 

Latest revision as of 19:49, 24 September 2010

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

This Checkpoint class member returns the owner of the checkpoint or null if the checkpoint is a global one.

[edit] Syntax

  1. Player Checkpoint.Owner

[edit] Arguments

  • none

[edit] Example

This example will message the player whether the checkpoint they entered is a local or global one.

  1.  
  2. function onPlayerEnterCheckpoint( player, checkpoint )
  3. {
  4. MessagePlayer( "This checkpoint is a " + ( checkpoint.Owner ? "local" : "global" ) + " checkpoint.", player );
  5. return 1;
  6. }
  7.  

[edit] Notes

The function MessagePlayer and event onPlayerEnterCheckpoint were used in in this example. More info about them in the corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox