OnPlayerToggleVehicleLight: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Event|Client|1.0}} {{FuncDescription|Called when a (local) player presses the key to switch the vehicle light on/off.}} {{FuncSyntax|OnPlayerToggleVehicleLight(vehicl..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Event|Client|1.0}} | {{Info|Event|Client|1.1.0}} | ||
{{FuncDescription|Called when a (local) player presses the key to switch the vehicle light on/off.}} | {{FuncDescription|Called when a (local) player presses the key to switch the vehicle light on/off.}} |
Latest revision as of 16:58, 8 March 2020
Description
Called when a (local) player presses the key to switch the vehicle light on/off.
Syntax
OnPlayerToggleVehicleLight(vehicle, toggle)
- vehicle
The vehicle identifier. - toggle
true if the player will turn on the light, false otherwise.
Example
AddEvent("OnPlayerToggleVehicleLight", function(vehicle, toggle)
if toggle == true then
return false -- do not allow the player to turn on the light
end
end)