onVehicleWrecked

From Liberty Unleashed Wiki
Revision as of 13:17, 11 November 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 is called whenever a vehicle is wrecked.

Syntax

  1. function onVehicleWrecked( Vehicle vehicle )

Arguments

  • vehicle - The vehicle which was wrecked

Returns

This event does not handle return values.

Example

This example will print a message to the console whenever someone wrecks a vehicle.

  1.  
  2. function onVehicleWrecked( vehicle )
  3. {
  4. print( "Vehicle " + vehicle.ID + " was wrecked." );
  5. return 1;
  6. }
  7.  

Notes

The functions Vehicle.ID and print were used in this example. More info about them can be found in the corresponding pages.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox