# setVehicleFullBeam (Shared)

> Turns a vehicle's high beams on or off.

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

## Syntax

```lua
bool setVehicleFullBeam(element vehicle, bool fullBeam)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `element` | The vehicle, or a parent element whose vehicles all change. |
| `fullBeam` | `bool` | `true` for high beams, `false` for low beams. |

## Returns

`true` if it changed, `false` if it was already so or the element is not a vehicle.

Given a parent element such as `root`, it applies to every vehicle below it, but the value returned is the element's own: `false` when it is not a vehicle.

## Example

```lua
addCommandHandler("farolalto", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        setVehicleFullBeam(vehicle, not isVehicleFullBeam(vehicle))
    end
end)
```

### Coming from MTA

MTA has no such function.

## See also

- [isVehicleFullBeam (Shared)](https://wiki.mymp.gg/en/isVehicleFullBeam.md): Returns whether a vehicle's high beams are on.
- [setVehicleOverrideLights (Shared)](https://wiki.mymp.gg/en/setVehicleOverrideLights.md): Forces a vehicle's lights on or off, or hands the choice back to the game.
