GetVehicleCount

From Liberty Unleashed Wiki
Revision as of 19:41, 28 September 2010 by Juppi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function returns the number of vehicles ingame.

Syntax

  1. int GetVehicleCount()

Arguments

  • none

Example

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

  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. return 1;
  10. }
  11.  

Notes

The function MessagePlayer and call onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox