OnPlayerToggleVehicleHorn: Difference between revisions
From Onset Developer Wiki
(Created page with "{{Info|Event|Client|1.2.2}} {{FuncDescription|Called when a (local) player presses the key to turn the horn on/off. You can return '''false''' to prevent turning it on.}} {{...") |
(No difference)
|
Latest revision as of 12:23, 9 January 2021
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)