> For the complete documentation index, see [llms.txt](https://docs-csgo.neverlose.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-csgo.neverlose.cc/documentation/variables/esp.md).

# esp

## Example available!

{% content-ref url="/pages/z7xi2JlDIiuW4Re07FT5" %}
[ESP](/useful-information/script-examples/esp.md)
{% endcontent-ref %}

## Class names

Available ESP classes: <mark style="color:blue;">`enemy`</mark>, <mark style="color:blue;">`team`</mark>, <mark style="color:blue;">`self`</mark>

## Functions:

### :new\_text

`esp.esp_class:new_text(name: string, preview: string, callback: function):` <mark style="color:purple;">`ESPGroup`</mark>

<table><thead><tr><th width="150">Name</th><th width="162.52330706200414">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>name</strong></td><td><strong><code>string</code></strong></td><td>ESP element picker text</td></tr><tr><td><strong>preview</strong></td><td><strong><code>string</code></strong></td><td>ESP preview text</td></tr><tr><td><strong>callback</strong></td><td><strong><code>function</code></strong></td><td>Function that will be called for each entity while drawing the ESP</td></tr></tbody></table>

Registers ESP text to the specified class. The callback function is called every frame. It is passed an entity pointer. Return a string in order to manage the output.

### :new\_bar

`esp.esp_class:new_bar(name: string, callback: function):` <mark style="color:purple;">`ESPGroup`</mark>

<table><thead><tr><th width="150">Name</th><th width="162.52330706200414">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>name</strong></td><td><strong><code>string</code></strong></td><td>ESP element picker text</td></tr><tr><td><strong>callback</strong></td><td><strong><code>function</code></strong></td><td>Function that will be called for each entity while drawing the ESP</td></tr></tbody></table>

Registers an ESP bar to the specified class. The callback function is called every frame. Access the entity pointer using the arguments of the specified callback. Return a boolean followed by the number in the range \[0.0, 1.0].

### :new\_item

`esp.esp_class:new_item(name: string):` <mark style="color:purple;">`ESPGroup`</mark>

<table><thead><tr><th width="150">Name</th><th width="162.52330706200414">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>name</strong></td><td><strong><code>string</code></strong></td><td>ESP element picker text</td></tr></tbody></table>

Registers an ESP item that is neither text nor a bar.

#### 🔗 struct <mark style="color:blue;">`ESPGroup`</mark>

<table><thead><tr><th width="160.7500302222433">Name</th><th width="150">Type</th><th width="420.1829205510523">Description</th></tr></thead><tbody><tr><td><strong>get</strong></td><td><strong><code>function</code></strong></td><td>Returns the value of the item.</td></tr><tr><td><strong>set</strong></td><td><strong><code>function</code></strong></td><td>Sets the value of the item.</td></tr><tr><td><strong>name</strong></td><td><strong><code>function</code></strong></td><td>Returns the name of the item. If the argument is present, the name is set to the new value.</td></tr><tr><td><strong>create</strong></td><td><strong><code>function</code></strong></td><td>Attaches a <a href="/documentation/variables/ui.md#menugroup"><code>group</code></a> to the current item.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs-csgo.neverlose.cc/documentation/variables/esp.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
