Vehicle.Wrecked

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Vehicle class member returns whether the vehicle has been wrecked (aka. it has not yet respawned after its destruction).

Syntax

  1. bool Vehicle.Wrecked

Arguments

  • none

Example

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "wrecked" )
  5. {
  6. local pVehicle = FindVehicle( 0 );
  7. if ( pVehicle ) MessagePlayer( "Vehicle ID (0) wrecked status is currently - " + pVehicle.Wrecked, pPlayer );
  8. }
  9. return 1;
  10. }
  11.  

Notes

The functions MessagePlayer and FindVehicle and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox