Squirrel/Server/Functions/Spheres/ID

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (testing confirmedit)
m
 
Line 16: Line 16:
 
function onPlayerEnterSphere( player, sphere )
 
function onPlayerEnterSphere( player, sphere )
 
{
 
{
     MessagePlayer( "The current id of this sphere is: " + sphere.ID, player );
+
     MessagePlayer( "The ID of this sphere is: " + sphere.ID, player );
 
      
 
      
 
     return 1;
 
     return 1;
Line 24: Line 24:
 
=== Notes ===
 
=== Notes ===
  
The call [[Squirrel/Server/Events/Sphere/onPlayerEnterSphere|onPlayerEnterSphere]] was used in this example. More info about this can be found in the corresponding page.
+
The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and callback [[Squirrel/Server/Events/Sphere/onPlayerEnterSphere|onPlayerEnterSphere]] were used in this example. More info about them can be found in the corresponding pages.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Spheres}}
 
{{Squirrel/Server/Functions/Spheres}}

Latest revision as of 14:45, 13 March 2011

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

This Sphere class member returns the ID of the sphere.

[edit] Syntax

  1. int Sphere.ID

[edit] Arguments

  • none

[edit] Example

This example will message the player with the current ID of the sphere when they enter it.

  1.  
  2. function onPlayerEnterSphere( player, sphere )
  3. {
  4. MessagePlayer( "The ID of this sphere is: " + sphere.ID, player );
  5. return 1;
  6. }
  7.  

[edit] Notes

The function MessagePlayer and callback onPlayerEnterSphere were used in this example. More info about them can be found in the corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox