# getLightCone (Cliente)

> Lê a abertura e a dureza da borda do cone de uma luz spot.

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

## Sintaxe

```lua
float|false getLightCone(light light)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `light` | `light` | A luz. |

## Retorno

Dois números: o ângulo em graus a partir do eixo e a dureza, de 0 a 0.99, ou `false` com um argumento errado.

## Exemplo

```lua
local light = createSpotLight(0, 0, 10, 0, 0, -1)
local angle, hardness = getLightCone(light)
outputDebugString(angle .. " " .. hardness) -- 30 0.5
```

### Atenção

Só para luzes spot. Numa luz point ou rect, registra um aviso que diz o tipo dela e devolve `false`.

## Veja também

- [setLightCone (Cliente)](https://wiki.mymp.gg/pt/setLightCone.md): Muda a abertura e a dureza da borda do cone de uma luz spot.
- [getLightSourceRadius (Cliente)](https://wiki.mymp.gg/pt/getLightSourceRadius.md): Lê o tamanho do bulbo de uma luz spot.
