# getElementCastShadow (Client)

> Tells whether an element casts a shadow.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Elements
- **URL**: https://wiki.mymp.gg/en/getElementCastShadow

## Syntax

```lua
bool getElementCastShadow(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element to read. |

## Returns

`true` if it casts a shadow. `false` if it does not or is not a player, ped, vehicle or object.

## Example

```lua
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and getElementCastShadow(vehicle) then
    setElementCastShadow(vehicle, false)
end
```

## See also

- [setElementCastShadow (Client)](https://wiki.mymp.gg/en/setElementCastShadow.md): Turns the shadow an element casts on or off.
