πŸšΆβ€β™‚οΈentity

Functions:

get_local

entity.get_local(): entity

Returns a pointer to the local player.

get_player_by_index

entity.get_player_by_index(player_index: number): entity

Name
Type
Description

player_index

number

player_index

Returns a pointer to the specified player.

get_weapon_by_player

entity.get_weapon_by_player(player: entity): weapon

Name
Type
Description

player

entity

player

Returns a pointer to the player's weapon entity.

get_players

entity.get_players(ignore_team: boolean): table

Name
Type
Description

ignore_team

boolean

ignore_team

Returns the table of pointers to entities.

Classes:

:get_animstate

<entity>:get_animstate(): table

Field

m_flUpVelocity m_bInHitGroundAnimation m_bOnGround m_fDuckAmount m_fLandingDuckAdditiveSomething m_flCurrentFeetYaw m_flCurrentTorsoYaw m_flEyeYaw m_flFeetCycle m_flFeetSpeedForwardsOrSideWays m_flFeetSpeedUnknownForwardOrSideways m_flFeetYawRate m_flGoalFeetYaw m_flHeadHeightOrOffsetFromHittingGroundAnimation m_flLastClientSideAnimationUpdateTime m_flLastOriginZ m_flLeanAmount m_flMovingFraction m_flPitch m_flSpeedNormalized m_flStopToFullRunningFraction m_flTimeSinceStartedMoving m_flTimeSinceStoppedMoving m_iLastClientSideAnimationUpdateFramecount m_velocity m_vLastOrigin m_vOrigin m_vVelocityX m_vVelocityY

:max_desync_delta

<anim_state>:max_desync_delta(): number

Returns the player animstate.

:get_animlayer

<entity>:get_animlayer(index: number): table

Name
Type
Description

index

number

Animlayer index

Field

m_bClientBlend m_flBlendIn m_flCycle m_flPlaybackRate m_flPrevCycle m_flWeight m_flWeightDeltaRate m_nDispatchSequence m_nOrder m_nSequence

Returns the player animlayer.

:get_sequence_activity

<entity>:get_sequence_activity(sequence: number): number

Name
Type
Description

sequence

number

Sequence

Returns the player sequence activity.

:get_name

<entity>:get_name(): string

Returns the player name.

:get_weapons

<entity>:get_weapons(index: number): weapon

Returns a table containing pointers to every weapon entity the player is currently carrying.

Name
Type
Description

index

number

index

:get_index

<entity>:get_index(): number

Returns the index of the player.

:get_dormant

<entity>:get_dormant(): boolean

Returns true, if the player is dormant.

:get_team

<entity>:get_team(): number

Returns the player team number.

:is_alive

<entity>:is_alive(): boolean

Returns true, if the player is alive.

:get_velocity

<entity>:get_velocity(): vector

Returns the velocity vector of the player.

:get_absorigin

<entity>:get_absorigin(): vector

Returns the absolute position vector of the player.

:get_angles

<entity>:get_angles(): vector

Returns the angles of the player.

:get_player_hitbox_pos

<entity>:get_player_hitbox_pos(): vector

Returns the position of the specified hitbox.

:get_muzzle_pos

<entity>:get_muzzle_pos(): vector

Returns the position of the muzzle.

:get_player_bone_pos

<entity>:get_player_bone_pos(): vector

Returns the position of the specified bone.

:get_shoot_pos

<entity>:get_shoot_pos(): vector

Returns the position of the shoot.

:has_heavy_arm

<entity>:has_heavy_arm(): vector

Returns true, if the player has heavy armor

:is_scoped

<entity>:is_scoped(): vector

Returns true, if the player is scoped.

:get_health

<entity>:get_health(): vector

Returns the player health.

:get_bbox

<entity>:get_bbox(): table

Returns a table containing x, y, w, and h values.

:get_body_yaw

<entity>:get_body_yaw(): number

Returns the player body yaw.

:m_flposeparameter

<entity>:m_flposeparameter()[index: number]: number

Name
Type
Description

index

number

-

Returns the player pose parameters.

:set_render_pose

<entity>:set_render_pose(index: number, value: number)

Name
Type
Description

index

number

index

value

number

value

cheat.push_callback("on_frame_net", function(stage)
    if (stage == enum_frames.frame_start) then
        local player = entity.get_local()
        
        if (player == nil or not player:is_alive()) then
            return
        end
        
        local flags = player:get_prop_int("CBasePlayer", "m_fFlags")
        local on_ground = bit.band(flags, 1) == 1
        
        if (not on_ground) then
            player:set_render_pose(6, 1) --> Static legs
        end
    end
end)

Sets the values of the pose parameters.

:draw_hitbox

<entity>:draw_hitbox(hitbox: number, col: color, duration: number, ignore_z: boolean)

Name
Type
Description

hitbox

number

hitbox

col

color

col

duration

number

duration

ignore_z

boolean

ignore_z

Draws a specific player hitbox.

:set_model_index

<entity>:set_model_index(index: number)

Name
Type
Description

index

number

index

Sets the index of the model to the player.

:get_model

<entity>:get_model(): model

Returns the player model.

Getting prop values

<entity>:get_prop_int(class_name: string, prop_name: string): number

Name
Type
Description

class_name

string

Class name

prop_name

string

Prop name

Setting prop values

<entity>:set_prop_int(class_name: string, prop_name: string, value: number)

Name
Type
Description

class_name

string

Class name

prop_name

string

Prop name

value

number

Prop value

Last updated