# 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="/pages/vPTuoHPQFCBz9qmOdRTX#menugroup"><code>group</code></a> to the current item.</td></tr></tbody></table>


---

# Agent Instructions: 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 current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
