ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setVehicleTaxiLightOn

Function

setVehicleTaxiLightOn

ServerVehiclesIdentical to MTA:SA

Turns the "TAXI" roof light of a taxi on or off for every player (models with the light: Taxi 420, Cabbie 438). A lit sign usually means the taxi is free.

Syntax

bool setVehicleTaxiLightOn(vehicle element, bool value)

Arguments

elementvehicle
The vehicle.
valuebool
true = the light is on.

Returns

true on success.

Example

addEventHandler("onVehicleEnter", root, function(player, seat)
    if getElementModel(source) == 420 and seat > 0 then
        setVehicleTaxiLightOn(source, false)
    end
end)

See also