Skip to content

Events (client)#

Vehicle spawn#

Triggered after successful vehicle spawn.

Listen-only, do not trigger!

Parameters:
vehicle - int - Vehicle handle.

AddEventHandler("AP:vehicleSpawned", function(vehicle)
    print("Vehicle " .. GetVehicleNumberPlateText(vehicle) .. " spawned")
end)

Vehicle update#

Triggered after client side vehicle update. The server side update could still be rejected at this point.

Listen-only, do not trigger!

Parameters:
vehicle - int - Vehicle handle.
reason - string - Reason for the update.

AddEventHandler("AP:updateVehicle", function(vehicle, reason)
    print("Vehicle " .. GetVehicleNumberPlateText(vehicle) .. " updated for " .. reason)
end)