# setLightCastShadow (Cliente)

> Liga ou desliga as sombras de uma luz.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Cliente
- **Categoria**: Luzes
- **URL**: https://wiki.mymp.gg/pt/setLightCastShadow

## Sintaxe

```lua
bool setLightCastShadow(light light, bool castShadow)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `light` | `light` | A luz. |
| `castShadow` | `bool` | Se a luz projeta sombras. |

## Retorno

`true` se mudou. Com um argumento errado, registra um aviso e devolve `false`.

Com sombra, uma luz spot usa uma vista com o próprio cone; uma point ou rect usa um cubo de seis vistas a partir do centro.

## Exemplo

```lua
local light = createPointLight(2495.1, -1687.4, 14.5, 12)
setLightCastShadow(light, true)
```

## Veja também

- [getLightCastShadow (Cliente)](https://wiki.mymp.gg/pt/getLightCastShadow.md): Diz se uma luz projeta sombras.
- [setElementCastShadow (Cliente)](https://wiki.mymp.gg/pt/setElementCastShadow.md): Liga ou desliga a sombra que um elemento projeta.
- [createSpotLight (Cliente)](https://wiki.mymp.gg/pt/createSpotLight.md): Cria uma luz que ilumina dentro de um cone, como um holofote. A luz existe só neste cliente.
