OnPlayerToggleVehicleHorn
From Onset Developer Wiki
Description
Called when a (local) player presses the key to turn the horn on/off. You can return false to prevent turning it on.
Syntax
OnPlayerToggleVehicleHorn(vehicle, toggle)
- vehicle
The vehicle identifier. - toggle
true if the player turns on the horn, false otherwise.
Example
AddEvent("OnPlayerToggleVehicleHorn", function(vehicle, toggle)
if toggle == true then
return false -- do not allow the player to use the horn
end
end)