# isElementOnScreen (Client)

> Tells whether an element shows on screen.

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

## Syntax

```lua
bool isElementOnScreen(element element)
```

## Parameters

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

## Returns

`true` if the element is on screen, `false` if not or if it is not streamed in.

## Example

```lua
addEventHandler("onClientRender", root, function()
    for _, vehicle in ipairs(getElementsByType("vehicle", root, true)) do
        if isElementOnScreen(vehicle) then
            local pos = getElementPosition(vehicle)
            local sx, sy = getScreenFromWorldPosition(pos.x, pos.y, pos.z + 1)
            if sx then
                dxDrawText("vehicle", sx, sy)
            end
        end
    end
end)
```

## See also

- [isElementStreamedIn (Client)](https://wiki.mymp.gg/en/isElementStreamedIn.md): Tells whether an element is loaded into this client's world.
- [getScreenFromWorldPosition (Client)](https://wiki.mymp.gg/en/getScreenFromWorldPosition.md): Projects a world point onto the screen, with the current frame's camera.
