# entity

## Functions:

### get

`entity.get(idx: number[, by_userid: boolean]):` <mark style="color:purple;">`entity`</mark>

<table><thead><tr><th width="150">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>idx</strong></td><td><strong><code>number</code></strong></td><td>Index of the entity</td></tr><tr><td><strong>by_userid</strong></td><td><strong><code>boolean</code></strong></td><td>If <mark style="color:purple;"><code>true</code></mark> then <strong>idx</strong> will be perceived as a userid</td></tr></tbody></table>

Returns a pointer to the specified entity.

### get\_local\_player

`entity.get_local_player():` <mark style="color:purple;">`entity`</mark>

Returns a pointer to the local player.

### get\_players

`entity.get_players([enemies_only: boolean, include_dormant: boolean, callback: function]):`<mark style="color:purple;">`table`</mark>

<table><thead><tr><th width="194.71365870421369">Name</th><th width="150">Type</th><th width="366.77253218884124">Description</th></tr></thead><tbody><tr><td><strong>enemies_only</strong></td><td><strong><code>boolean</code></strong></td><td>If <mark style="color:purple;"><code>true</code></mark> then only enemies will be included</td></tr><tr><td><strong>include_dormant</strong></td><td><strong><code>boolean</code></strong></td><td>If <mark style="color:purple;"><code>true</code></mark> then dormant players will be included</td></tr><tr><td><strong>callback</strong></td><td><strong><code>function</code></strong></td><td>A callback with an entity pointer as the argument</td></tr></tbody></table>

If the callback is nil, it returns the table of pointers to player entities. Otherwise the callback will be called. Access the player pointer using the arguments of the specified callback.

### get\_entities

`entity.get_entities([class: number/string, include_dormant: boolean, callback: function]):` <mark style="color:purple;">`table`</mark>

<table><thead><tr><th width="194.71365870421369">Name</th><th width="165.84833781820578">Type</th><th width="366.77253218884124">Description</th></tr></thead><tbody><tr><td><strong>class</strong></td><td><strong><code>number/string</code></strong></td><td>Either a name or an ID of the needed class. Pass <mark style="color:purple;"><code>nil</code></mark> to get every entity.</td></tr><tr><td><strong>include_dormant</strong></td><td><strong><code>boolean</code></strong></td><td>If <mark style="color:purple;"><code>true</code></mark> then dormant players will be included</td></tr><tr><td><strong>callback</strong></td><td><strong><code>function</code></strong></td><td>A callback with an entity pointer as the argument</td></tr></tbody></table>

If the callback is nil, it returns the table of pointers to entities. Otherwise the callback will be called. Access the entity pointer using the arguments of the specified callback.

### get\_threat

`entity.get_threat([ hittable: boolean ]):` <mark style="color:purple;">`entity`</mark>

<table><thead><tr><th width="150">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>hittable</strong></td><td><strong><code>boolean</code></strong></td><td>If <mark style="color:purple;"><code>true</code></mark> then returns a pointer to the player that can hit you</td></tr></tbody></table>

Returns a pointer to the current threat.

### get\_game\_rules

`entity.get_game_rules():` <mark style="color:purple;">`entity`</mark>

Returns the pointer to the CCSGameRulesProxy instance, or nil if none exists.

### get\_player\_resource

`entity.get_player_resource():` <mark style="color:purple;">`entity`</mark>

Returns the pointer to the CCSPlayerResource instance, or nil if none exists.

## Netprops

### Getting FFI pointer

`ent[0]` `:` <mark style="color:purple;">`userdata`</mark>

Returns the <mark style="color:yellow;">`ffi`</mark> pointer to the entity.

### Getting netprop values

`ent.prop_name:` <mark style="color:purple;">`any`</mark>

`ent.prop_name[index]:` <mark style="color:purple;">`any`</mark>

`ent["prop_name"]:` <mark style="color:purple;">`any`</mark>

<table><thead><tr><th width="150">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>prop_name</strong></td><td><strong><code>string</code></strong></td><td>Name of the networked property</td></tr><tr><td><strong>index</strong></td><td><strong><code>number</code></strong></td><td>Optional. If <code>prop_name</code> is an array, the value at this array index will be returned</td></tr></tbody></table>

```lua
local on_createmove = function(cmd)
    local localplayer = entity.get_local_player()
    
    if localplayer == nil then
        return
    end
    
    -- example 1
    local health = localplayer.m_iHealth

    -- example 2 [array netprops]
    local pitch = localplayer.m_flPoseParameter[12]

    -- example 3
    local stamina = localplayer['m_flStamina']
    
    print(('my health is: %d | pitch: %.1f | stamina: %d%%'):format(
        health, pitch,
        100 - (80 / 100 * stamina)
    ))
end

events.createmove:set(on_createmove)
```

### Setting netprop values

`ent.prop_name = value`

`ent.prop_name[index] = value`

`ent["prop_name"] = value`

<table><thead><tr><th width="150">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>prop_name</strong></td><td><strong><code>string</code></strong></td><td>Name of the networked property</td></tr><tr><td><strong>value</strong></td><td><strong><code>any</code></strong></td><td>The property will be set to this value</td></tr><tr><td><strong>index</strong></td><td><strong><code>number</code></strong></td><td>Optional. If <code>prop_name</code> is an array, the value at this array index will be set</td></tr></tbody></table>

```lua
for _, player in ipairs(entity.get_players(true)) do
  -- example 1
  player.m_bSpotted = true
  
  -- example 2 [array netprops]
  player.m_flPoseParameter[12] = 0.5
  
  -- example 3
  player['m_nSkin'] = 2
end
```

## Common

### :is\_player

`ent:is_player():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is a player entity.

### :is\_weapon

`ent:is_weapon():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is a weapon entity.

### :is\_dormant

`ent:is_dormant():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is dormant.

### :is\_bot

`ent:is_bot():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is a bot.

### :is\_alive

`ent:is_alive():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is alive.

### :is\_enemy

`ent:is_enemy():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is an enemy.

### :is\_visible

`ent:is_visible():` <mark style="color:purple;">`boolean`</mark>

Returns <mark style="color:green;">`true`</mark> if the entity is visible.

### :is\_occluded

`ent:is_occluded([ to_entity: entity ]):` <mark style="color:purple;">`boolean`</mark>

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>to_entity</strong></td><td><strong><code>entity</code></strong></td><td>Optional. The entity that will be checked for occlusion</td></tr></tbody></table>

If the `to_entity` is nil, the local player is checked. Returns <mark style="color:green;">`true`</mark> if the entity is completely occluded for the current entity.

### :get\_index

`ent:get_index():` <mark style="color:purple;">`number`</mark>

Returns the index of the entity.

### :get\_name

`ent:get_name():` <mark style="color:purple;">`string`</mark>

Returns the player name, weapon name or class name if the entity is neither of those.

### :get\_origin

`ent:get_origin():` <mark style="color:purple;">`vector`</mark>

Returns the position vector of the entity.

### :get\_angles

`ent:get_angles():` <mark style="color:purple;">`vector`</mark>

Returns the absolute angles of the entity.

### :get\_simulation\_time

`ent:get_simulation_time():` <mark style="color:purple;">`table`</mark>

Returns a table containing <mark style="color:blue;">`current`</mark> and <mark style="color:blue;">`old`</mark> simulation time values.

### :get\_classname

`ent:get_classname():` <mark style="color:purple;">`string`</mark>

Returns the name of the entity's class.

### :get\_classid

`ent:get_classid():` <mark style="color:purple;">`number`</mark>

Returns the ID of the entity's class.

### :get\_materials

`ent:get_materials():` <mark style="color:purple;">`table`</mark>

Returns a table containing all materials used by the entity.

### :get\_model\_name

`ent:get_model_name():` <mark style="color:purple;">`string`</mark>

Returns the model name of the entity.

## Players

### :get\_network\_state

`ent:get_network_state():` <mark style="color:purple;">`number`</mark>

Returns the network state of the player.

<table><thead><tr><th width="150">ID</th><th width="595.8382139978988">Description</th></tr></thead><tbody><tr><td><strong>0</strong></td><td>The entity is <mark style="color:green;"><code>not dormant</code></mark></td></tr><tr><td><strong>1</strong></td><td>The entity is dormant but the cheat has 100% info where the player is</td></tr><tr><td><strong>2</strong></td><td>The entity is dormant (updated by <mark style="color:blue;"><code>Shared ESP</code></mark>)</td></tr><tr><td><strong>3</strong></td><td>The entity is dormant (updated by <mark style="color:blue;"><code>Sounds</code></mark>)</td></tr><tr><td><strong>4</strong></td><td>The entity is dormant (not updated)</td></tr><tr><td><strong>5</strong></td><td>The entity is dormant (data is <mark style="color:red;"><code>unavailable</code></mark> or <mark style="color:red;"><code>too old</code></mark>)</td></tr></tbody></table>

### :get\_bbox

`ent:get_bbox():` <mark style="color:purple;">`table`</mark>

Returns a table containing <mark style="color:blue;">`pos1`</mark>, <mark style="color:blue;">`pos2`</mark>, and <mark style="color:blue;">`alpha`</mark> values.

### :get\_player\_info

`ent:get_player_info():` <mark style="color:purple;">`table`</mark>

Returns a table containing information from the `player_info_t` structure of the entity.

Table values: <mark style="color:blue;">`is_hltv`</mark>, <mark style="color:blue;">`is_fake_player`</mark>, <mark style="color:blue;">`steamid`</mark>, <mark style="color:blue;">`steamid64`</mark>, <mark style="color:blue;">`userid`</mark>, and <mark style="color:blue;">`files_downloaded`</mark>

### :get\_player\_weapon

`ent:get_player_weapon([all_weapons: boolean]):` <mark style="color:purple;">`entity / table`</mark>

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>all_weapons</strong></td><td><strong><code>boolean</code></strong></td><td>If <mark style="color:purple;"><code>true</code></mark> then all weapons will be included</td></tr></tbody></table>

Returns a pointer to the player's weapon entity.

If `all_weapons` is <mark style="color:green;">`true`</mark>, returns a table containing pointers to every weapon entity the player is currently carrying.

### :get\_anim\_state

`ent:get_anim_state():` <mark style="color:purple;">`table`</mark>

Returns a table containing information about the animation state of the player.

<details>

<summary>🧷 Animation state keys</summary>

* \[number] abs\_yaw
* \[number] abs\_yaw\_last
* \[vector] acceleration
* \[number] acceleration\_weight
* \[number] action\_weight\_bias\_remainder
* \[boolean] adjust\_started
* \[number] aim\_matrix\_transition
* \[number] aim\_matrix\_transition\_delay
* \[number] aim\_pitch\_max
* \[number] aim\_pitch\_min
* \[number] aim\_yaw\_max
* \[number] aim\_yaw\_min
* \[number] anim\_duck\_amount
* \[number] animstate\_model\_version
* \[number] cached\_model\_index
* \[number] camera\_smooth\_height
* \[userdata] crouch\_walk\_aim
* \[boolean] defuse\_started
* \[number] duck\_additional
* \[number] duration\_in\_air
* \[number] duration\_move\_weight\_is\_too\_high
* \[number] duration\_moving
* \[number] duration\_still
* \[number] duration\_strafing
* \[number] eye\_pitch
* \[number] eye\_position\_smooth\_lerp
* \[number] eye\_yaw
* \[boolean] feet\_crossed
* \[boolean] first\_foot\_plant\_since\_init
* \[boolean] first\_run\_since\_init
* \[boolean] flashed
* \[userdata] foot\_left
* \[number] foot\_lerp
* \[userdata] foot\_right
* \[number] in\_air\_smooth\_value
* \[number] jump\_to\_fall
* \[number] ladder\_speed
* \[number] ladder\_weight
* \[number] land\_anim\_multiplier
* \[boolean] landed\_on\_ground\_this\_frame
* \[boolean] landing
* \[number] last\_foot\_plant\_update
* \[number] last\_rendered\_eye\_z
* \[number] last\_time\_velocity\_over\_ten
* \[number] last\_update\_frame
* \[number] last\_update\_increment
* \[number] last\_update\_time
* \[number] last\_velocity\_test\_time
* \[userdata] layer\_order\_preset
* \[number] left\_ground\_height
* \[boolean] left\_the\_ground\_this\_frame
* \[number] move\_weight
* \[number] move\_weight\_smoothed
* \[number] move\_yaw
* \[number] move\_yaw\_current\_to\_ideal
* \[number] move\_yaw\_ideal
* \[number] next\_twitch\_time
* \[boolean] on\_ground
* \[boolean] on\_ladder
* \[boolean] plant\_anim\_started
* \[entity] player
* \[boolean] player\_is\_accelerating
* \[userdata] pose\_param\_mappings
* \[vector] position\_current
* \[vector] position\_last
* \[number] previous\_move\_state
* \[number] primary\_cycle
* \[number] recrouch\_weight
* \[boolean] smooth\_height\_valid
* \[number] speed\_as\_portion\_of\_crouch\_top\_speed
* \[number] speed\_as\_portion\_of\_run\_top\_speed
* \[number] speed\_as\_portion\_of\_walk\_top\_speed
* \[userdata] stand\_run\_aim
* \[userdata] stand\_walk\_aim
* \[number] static\_approach\_speed
* \[number] step\_height\_left
* \[number] step\_height\_right
* \[number] strafe\_change\_cycle
* \[number] strafe\_change\_target\_weight
* \[number] strafe\_change\_weight
* \[number] strafe\_change\_weight\_smooth\_fall\_off
* \[boolean] strafe\_changing
* \[number] strafe\_sequence
* \[number] stutter\_step
* \[vector] target\_acceleration
* \[number] time\_of\_last\_known\_injury
* \[number] time\_to\_align\_lower\_body
* \[boolean] twitch\_anim\_started
* \[vector] velocity
* \[vector] velocity\_last
* \[number] velocity\_length\_xy
* \[number] velocity\_length\_z
* \[vector] velocity\_normalized
* \[vector] velocity\_normalized\_non\_zero
* \[number] walk\_run\_transition
* \[boolean] walk\_to\_run\_transition\_state
* \[entity] weapon
* \[entity] weapon\_last
* \[entity] weapon\_last\_bone\_setup

</details>

### :get\_anim\_overlay

`ent:get_anim_overlay([idx: number]):` <mark style="color:purple;">`table`</mark>

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>idx</strong></td><td><strong><code>number</code></strong></td><td>Index of the animation layer</td></tr></tbody></table>

Returns a table containing information about the specified animation layer. Pass `nil` to get every animation layer.

<details>

<summary>🧷 Animation overlay keys</summary>

* \[number] activity
* \[number] cycle
* \[number] dispatched\_dst
* \[number] dispatched\_src
* \[userdata] dispatched\_studio\_hdr
* \[number] invalidate\_physics\_bits
* \[number] layer\_animtime
* \[number] layer\_fade\_outtime
* \[number] order
* \[entity] owner
* \[number] playback\_rate
* \[number] prev\_cycle
* \[number] sequence
* \[number] weight
* \[number] weight\_delta\_rate

</details>

### :get\_eye\_position

`ent:get_eye_position():` <mark style="color:purple;">`vector`</mark>

Returns the eye position of the player.

### :get\_bone\_position

`ent:get_bone_position(idx: number):` <mark style="color:purple;">`vector`</mark>

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>idx</strong></td><td><strong><code>number</code></strong></td><td>Index of the bone</td></tr></tbody></table>

Returns the position of the specified bone.

### :get\_hitbox\_position

`ent:get_hitbox_position(idx: number):` <mark style="color:purple;">`vector`</mark>

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>idx</strong></td><td><strong><code>number</code></strong></td><td>Index of the hitbox</td></tr></tbody></table>

Returns the position of the specified hitbox.

### :get\_steam\_avatar

`ent:get_steam_avatar():` <mark style="color:purple;">`ImgObject`</mark>

Returns a pointer to the Steam avatar image object of the specified entity.

### :get\_xuid

`ent:get_xuid():` <mark style="color:purple;">`string`</mark>

Returns the Steam ID of the player.

### :get\_resource

`ent:get_resource():` <mark style="color:purple;">`entity`</mark>

Returns the pointer to the CCSPlayerResource instance attached to the player, or nil if none exists.

### :get\_spectators

`ent:get_spectators():` <mark style="color:purple;">`table`</mark>

Returns a table of pointers to the players that are currently spectating the specified player.

### :set\_icon

`ent:set_icon([icon: string])`

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>icon</strong></td><td><strong><code>string</code></strong></td><td>Optional. URL to the icon or a panorama path.</td></tr></tbody></table>

Sets an icon in the scoreboard next to the specified player's avatar. The icon will be removed if no icon was provided.

### :simulate\_movement

`ent:simulate_movement([origin: vector, velocity: vector, flags: number]):` <mark style="color:purple;">`sim_ctx`</mark>

<table><thead><tr><th width="171.291500478032">Name</th><th width="150">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>origin</strong></td><td><strong><code>vector</code></strong></td><td>Specifies the origin from which the movement should be simulated. If not provided, it uses the player's current origin.</td></tr><tr><td><strong>velocity</strong></td><td><strong><code>vector</code></strong></td><td>Specifies the velocity vector for the simulated movement. If not provided, the function will use the player's current velocity as the default for the simulation.</td></tr><tr><td><strong>flags</strong></td><td><strong><code>number</code></strong></td><td>Specifies the m_fFlags 32-bit mask for prediction. If not provided, it uses the player's current <code>m_fFlags</code> value.</td></tr></tbody></table>

This function allows you to simulate players' movement by optionally providing an origin, velocity, and flags. Returns an instance of the <mark style="color:purple;">`sim_ctx`</mark> class containing details and tools for the movement simulation.

## Simulation Context

{% hint style="info" %}
This class encapsulates the context and results of a movement simulation initiated by `:simmulate_movement`.
{% endhint %}

### :think

`sim:think([ticks: number])`

Simulates the player's movement for a specified number of ticks. If not specified, it defaults to simulating for 1 tick.

<table><thead><tr><th width="214.12668192920174">Name</th><th width="120">Type</th><th width="410.3276962436035">Description</th></tr></thead><tbody><tr><td><strong>origin</strong></td><td><strong><code>vector</code></strong></td><td>Position of the player after simulation.</td></tr><tr><td><strong>velocity</strong></td><td><strong><code>vector</code></strong></td><td>Velocity of the player after simulation.</td></tr><tr><td><strong>view_offset</strong></td><td><strong><code>number</code></strong></td><td>Z axis view offset. Used to calculate the eye position.</td></tr><tr><td><strong>duck_amount</strong></td><td><strong><code>number</code></strong></td><td><code>m_flDuckAmount</code> value of the player after simulation.</td></tr><tr><td><strong>did_hit_collision</strong></td><td><strong><code>boolean</code></strong></td><td>Flags whether the player hit a collision during the simulation.</td></tr><tr><td><strong>obb_mins</strong></td><td><strong><code>vector</code></strong></td><td>Player's bounding box's minimum points.</td></tr><tr><td><strong>obb_maxs</strong></td><td><strong><code>vector</code></strong></td><td>Player's bounding box's maximum points.</td></tr><tr><td><strong>move</strong></td><td><strong><code>vector</code></strong></td><td></td></tr><tr><td><strong>simulation_ticks</strong></td><td><strong><code>number</code></strong></td><td>The number of ticks over which the simulation was conducted.</td></tr><tr><td><strong>gravity_per_apply</strong></td><td><strong><code>number</code></strong></td><td>Indicates the applied gravitational force during the simulation.</td></tr><tr><td><strong>original_max_speed</strong></td><td><strong><code>number</code></strong></td><td>The player's maximum speed before the simulation.</td></tr><tr><td><strong>max_speed</strong></td><td><strong><code>number</code></strong></td><td>The maximum speed achieved by the player during the simulation.</td></tr><tr><td><strong>is_speed_cropped</strong></td><td><strong><code>boolean</code></strong></td><td></td></tr><tr><td><strong>velocity_modifier</strong></td><td><strong><code>number</code></strong></td><td><code>m_flVelocityModifier</code> value of the player after simulation.</td></tr><tr><td><strong>duck_speed</strong></td><td><strong><code>number</code></strong></td><td>The simulated speed at which the player can be crouching.</td></tr><tr><td><strong>stamina</strong></td><td><strong><code>number</code></strong></td><td><code>m_flStamina</code>value of the player after simulation.</td></tr><tr><td><strong>surface_friction</strong></td><td><strong><code>number</code></strong></td><td><code>m_surfaceFriction</code> value of the player after simulation.</td></tr><tr><td><strong>trace</strong></td><td><strong><code>trace</code></strong></td><td>Post-simulation trace object.</td></tr></tbody></table>

## Weapons

{% hint style="info" %}
Access functions listed below via [<mark style="color:purple;">`:get_player_weapon`</mark>](#get_player_weapon) function
{% endhint %}

### :get\_weapon\_index

`ent:get_weapon_index():` <mark style="color:purple;">`number`</mark>

Returns the index of the weapon.

### :get\_weapon\_icon

`ent:get_weapon_icon():` <mark style="color:purple;">`ImgObject`</mark>

Returns the icon of the weapon.

### :get\_weapon\_info

`ent:get_weapon_info():` <mark style="color:purple;">`userdata`</mark>

Returns a pointer to the <mark style="color:blue;">`CCSWeaponInfo`</mark> struct of the weapon.

<details>

<summary>🧷 Weapon Info keys</summary>

* \[number] max\_player\_speed
* \[number] max\_player\_speed\_alt
* \[number] attack\_move\_speed\_factor
* \[number] spread
* \[number] spread\_alt
* \[number] inaccuracy\_crouch
* \[number] inaccuracy\_crouch\_alt
* \[number] inaccuracy\_stand
* \[number] inaccuracy\_stand\_alt
* \[number] inaccuracy\_jump\_initial
* \[number] inaccuracy\_jump\_apex
* \[number] inaccuracy\_jump
* \[number] inaccuracy\_jump\_alt
* \[number] inaccuracy\_land
* \[number] inaccuracy\_land\_alt
* \[number] inaccuracy\_ladder
* \[number] inaccuracy\_ladder\_alt
* \[number] inaccuracy\_fire
* \[number] inaccuracy\_fire\_alt
* \[number] inaccuracy\_move
* \[number] inaccuracy\_move\_alt
* \[number] inaccuracy\_reload
* \[number] recoil\_seed
* \[number] recoil\_angle
* \[number] recoil\_angle\_alt
* \[number] recoil\_angle\_variance
* \[number] recoil\_angle\_variance\_alt
* \[number] recoil\_magnitude
* \[number] recoil\_magnitude\_alt
* \[number] recoil\_magnitude\_variance\_alt
* \[number] spread\_seed
* \[number] recovery\_time\_crouch
* \[number] recovery\_time\_stand
* \[number] recovery\_time\_crouch\_final
* \[number] recovery\_time\_stand\_final
* \[number] recovery\_transition\_start\_bullet
* \[number] recovery\_transition\_end\_bullet
* \[boolean] unzoom\_after\_shot
* \[boolean] hide\_view\_model\_zoomed
* \[number] zoom\_level
* \[userdata] zoom\_fov
* \[userdata] zoom\_time
* \[string] weapon\_class
* \[boolean] has\_burst\_mode
* \[boolean] is\_revolver
* \[number] recoil\_magnitude\_variance
* \[string] weapon\_name
* \[number] weapon\_type
* \[number] weapon\_price
* \[string] console\_name
* \[number] max\_clip1
* \[number] max\_clip2
* \[string] world\_model
* \[string] view\_model
* \[string] dropped\_model
* \[string] hud\_name
* \[number] kill\_award
* \[number] cycle\_time
* \[number] cycle\_time\_alt
* \[number] time\_to\_idle
* \[boolean] full\_auto
* \[number] damage
* \[number] headshot\_multiplier
* \[number] armor\_ratio
* \[number] bullets
* \[number] penetration
* \[number] range
* \[number] range\_modifier
* \[number] throw\_velocity
* \[boolean] has\_silencer

</details>

### :get\_weapon\_owner

`ent:get_weapon_owner():` <mark style="color:purple;">`entity`</mark>

Returns a pointer to the weapon owner's entity.

### :get\_weapon\_reload

`ent:get_weapon_reload():` <mark style="color:purple;">`number`</mark>

Returns the weapon reload percentage (0.0-1.0), -1 if not reloading.&#x20;

### :get\_max\_speed

`ent:get_max_speed():` <mark style="color:purple;">`number`</mark>

Returns the maximum speed the player can move with the weapon.

### :get\_spread

`ent:get_spread():` <mark style="color:purple;">`number`</mark>

Returns the spread of the weapon in radians.

### :get\_inaccuracy

`ent:get_inaccuracy():` <mark style="color:purple;">`number`</mark>

Returns the inaccuracy of the weapon in radians.
