# setVehicleNeonEnabled (Shared)

> Turns neon strips under a vehicle on or off.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Vehicle looks
- **URL**: https://wiki.mymp.gg/en/setVehicleNeonEnabled

## Syntax

```lua
bool setVehicleNeonEnabled(element element, int|string|table strips, bool enabled)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | A vehicle, or a parent element: every vehicle below it changes too. |
| `strips` | `int\|string\|table` | One strip by name or number (from 0), `"all"` or `-1` for every strip, or a table of several. |
| `enabled` | `bool` | Turn on or off. |

## Returns

`true` if it changed, `false` if one of the strips does not exist on the vehicle (nothing changes on it).

Each strip is a rectangular light facing down. The strips come from the vehicle's model; `getVehicleNeonStrips` lists their names. On the server, the change is sent to every client. On the client, it applies to this client only.

## Example

```lua
addCommandHandler("neon", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        setVehicleNeonColor(vehicle, 0, 200, 255)
        setVehicleNeonEnabled(vehicle, "all", true)
    end
end)
```

### Note

With 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

- [isVehicleNeonEnabled (Shared)](https://wiki.mymp.gg/en/isVehicleNeonEnabled.md): Tells whether a vehicle's neon strips are on.
- [getVehicleNeonStrips (Shared)](https://wiki.mymp.gg/en/getVehicleNeonStrips.md): Lists the neon strips a vehicle's model has.
- [setVehicleNeonColor (Shared)](https://wiki.mymp.gg/en/setVehicleNeonColor.md): Changes the colour of a vehicle's neon. The colour applies to every strip.
- [setVehicleNeonPower (Shared)](https://wiki.mymp.gg/en/setVehicleNeonPower.md): Changes the brightness of a vehicle's neon.
