setVehicleFullBeam
Shared
Turns a vehicle's high beams on or off.
bool setVehicleFullBeam(element vehicle, bool fullBeam)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | element | The vehicle, or a parent element whose vehicles all change. |
| fullBeam | bool | true for high beams, false for low beams. |
Returns
true if it changed, false if it was already so or the element is not a vehicle.
Given a parent element such as root, it applies to every vehicle below it, but the value returned is the element's own: false when it is not a vehicle.
Example
addCommandHandler("farolalto", function(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle then
setVehicleFullBeam(vehicle, not isVehicleFullBeam(vehicle))
end
end)Coming from MTAMTA has no such function.