Squirrel/Server/Functions/Spheres/ID
From Liberty Unleashed Wiki
(Difference between revisions)
m (testing confirmedit) |
|||
Line 10: | Line 10: | ||
== Example == | == Example == | ||
+ | |||
+ | This example will message the player with the current ID of the sphere when they enter it. | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
Line 19: | Line 21: | ||
} | } | ||
</code> | </code> | ||
− | |||
− | |||
=== Notes === | === Notes === |
Revision as of 00:32, 13 March 2011
This Sphere class member returns the ID of the sphere.
Syntax
int Sphere.ID
Arguments
- none
Example
This example will message the player with the current ID of the sphere when they enter it.
function onPlayerEnterSphere( player, sphere ) { MessagePlayer( "The current id of this sphere is: " + sphere.ID, player ); return 1; }
Notes
The call onPlayerEnterSphere was used in this example. More info about this can be found in the corresponding page.