Squirrel/Server/Functions/Pickups/GetPickupCount

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
 
Line 1: Line 1:
__NOTOC__
+
{{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

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

This function returns the number of pickups on the server.

[edit] Syntax

  1. int GetPickupCount()

[edit] Arguments

  • none

[edit] Example

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "pickupcount" )
  5. {
  6. local pupcount = GetPickupCount( );
  7.  
  8. if ( pupcount > 0 ) MessagePlayer( "There are currently: " + pupcount + " pickups!", player );
  9. else MessagePlayer( "There are no pickups", player );
  10. }
  11. }
  12.  

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.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox