GetVehicleCount

From Liberty Unleashed Wiki
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