Squirrel/Server/Functions/Vehicles/GetVehicleCount

From Liberty Unleashed Wiki
Revision as of 14:38, 8 March 2010 by Force (Talk | contribs)

Jump to: navigation, search

This function returns the number of vehicles ingame.

Syntax

  1. int GetVehicleCount()

Arguments

  • none

Example

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "vehcount" )
  5. {
  6. local count = GetVehicleCount();
  7. MessagePlayer( "The current vehicle count is: " + count, player );
  8. }
  9. }
  10.  

This command will return how many vehicles are currently in the server.

Notes

The call onPlayerCommand was used in in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox