Squirrel/Server/Functions/Spheres/ID
From Liberty Unleashed Wiki
(Difference between revisions)
m (testing confirmedit) |
m |
||
Line 16: | Line 16: | ||
function onPlayerEnterSphere( player, sphere ) | function onPlayerEnterSphere( player, sphere ) | ||
{ | { | ||
− | MessagePlayer( "The | + | MessagePlayer( "The ID of this sphere is: " + sphere.ID, player ); |
return 1; | return 1; | ||
Line 24: | Line 24: | ||
=== Notes === | === Notes === | ||
− | The | + | 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
This Sphere class member returns the ID of the sphere.
[edit] Syntax
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.
function onPlayerEnterSphere( player, sphere ) { MessagePlayer( "The ID of this sphere is: " + sphere.ID, player ); return 1; }
[edit] Notes
The function MessagePlayer and callback onPlayerEnterSphere were used in this example. More info about them can be found in the corresponding pages.