Squirrel/Server/Functions/Pickups/GetPickupCount
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|GetPickupCount}} | |
This function returns the number of pickups on the server. | This function returns the number of pickups on the server. | ||
Latest revision as of 11:11, 11 October 2010
This function returns the number of pickups on the server.
[edit] Syntax
int GetPickupCount()
[edit] Arguments
- none
[edit] Example
function onPlayerCommand( player, cmd, text ) { if ( cmd == "pickupcount" ) { local pupcount = GetPickupCount( ); if ( pupcount > 0 ) MessagePlayer( "There are currently: " + pupcount + " pickups!", player ); else MessagePlayer( "There are no pickups", player ); } }
This command will give the player information about the number of pickups in the server.
[edit] Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.