From Liberty Unleashed Wiki
This event is called every time a vehicle sync packet (player is driving a vehicle or unoccupied sync) is received.
- function onVehicleUpdate( Vehicle vehicle, Player trigger )
- vehicle - Vehicle which was updated
- trigger - The player who triggered this event (either the vehicle driver or the player who moved an unoccupied vehicle)
- 1 - This sync packet will be transmitted to other clients normally
- 0 - Do not broadcast this sync packet to other clients
This example will message the player if they move an unoccupied vehicle.
- function onVehicleUpdate( vehicle, player )
- // Check that the vehicle has no driver
- if ( vehicle.Driver ) return 1;
- MessagePlayer( "Nice one you scratched the paint of that " + GetVehicleName( vehicle.Model ), player );
- return 1;