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

Function

setVehicleHeadLightColor

ServerVehiclesIdentical to MTA:SA

Changes the colour of a vehicle's headlights for every player, e.g. xenon blue or yellow. It affects the glowing lenses and the light patch in front of the car.

Syntax

bool setVehicleHeadLightColor(vehicle vehicle, int r, int g, int b)

Arguments

vehiclevehicle
The vehicle.
rint
Red 0-255.
gint
Green 0-255.
bint
Blue 0-255.

Returns

true on success.

Example

addCommandHandler("ksenony", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then setVehicleHeadLightColor(vehicle, 170, 200, 255) end
end)

See also