setVehicleTaxiLightOn | Multi Theft Auto: Wiki Skip to content

setVehicleTaxiLightOn

Client-side
Server-side
Shared

Pair: isVehicleTaxiLightOn

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function will set the taxi light on in a taxi (vehicle ID's 420 and 438)

Syntax

setVehicleTaxiLightOn ( )

Code Examples

server

This example allows the driver of a taxi to toggle on/off taxi light with a command

function toggleTaxiLight()
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and getVehicleController(vehicle) == localPlayer then
local vehModel = getElementModel(vehicle)
if (vehModel) == 420 or (vehModel) == 438 then
setVehicleTaxiLightOn (vehicle, not isVehicleTaxiLightOn(vehicle))
else
outputChatBox ("You're not in a Taxi!", 255, 0, 0, true)
end
end
end
addCommandHandler("taxilight",toggleTaxiLight)

See Also

Vehicle Functions