Skip to content
Necroso edited this page Sep 16, 2022 · 7 revisions

Vehicle Events

onVehicleUpdate

Description: This event is called when the vehicle has update change.

Example:

function onVehicleUpdate(vehicle, updateType)
    -- Detect health change
    if(updateType == 4) then
        Player.msgAll("Vehicle " .. vehicle:getID() .. " has a new health change: " .. vehicle.health .. "%")
    end
end
  • vehicle: The vehicle that was updated.
  • updateType: The type of the update.

Clone this wiki locally