M MY Multiplayer: Wiki
Side
Kind

setVehicleNeonColor

Shared

Changes the colour of a vehicle's neon. The colour applies to every strip.

bool setVehicleNeonColor(element element, color color)

Parameters

NameTypeDescription
elementelementA vehicle, or a parent element: every vehicle below it changes too.
colorcolorThree numbers r, g, b (integers from 0 to 255) or a tocolor value. Alpha is ignored.

Returns

true if it changed, false if it is not a vehicle.

On the server, the change is sent to every client. On the client, it applies to this client only.

Example

local vehicle = createVehicle("infernus", 2490, -1670, 13.3)
setVehicleNeonColor(vehicle, tocolor(0, 255, 120))
setVehicleNeonEnabled(vehicle, "all", true)
NoteWith a parent element (such as root), every vehicle below changes, but the return value is the element's own, which is not a vehicle: false.

See also