entity
Interact with our internally used entity system for CS2
Getting entity:
Get local player
entity.getLocalPlayer();Returns the local player as pointer.
Get DwEntityList
entity.getDwEntityList();Returns the entity list as a pointer.
Get crosshair entity
entity.getCrosshairEntity(IntPtr: localPlayer)Returns the aimed at player as an entity
About entity:
Get Health
entity.getHealth(IntPtr: entity);Returns the entity's health as an integer.
Is Dead?
entity.isDead(IntPtr: entity);Returns a boolean for any entity.
Get Team
entity.getTeam(IntPtr: entity);Returns the entity's team number as an integer.
Is Dormant?
entity.isDormant(IntPtr: entity);Returns a boolean for any entity.
Is Scoped?
entity.isScoped(IntPtr: entity);Returns a boolean for any entity.
Is Reloading?
entity.isReloading(IntPtr: entity);Returns a boolean for any entity.
Is Flashed?
entity.isFlashed(IntPtr: entity);Returns a boolean for any entity.
Is Jumping?
entity.isJumping(IntPtr: entity);Returns a boolean for any entity
Is Defusing?
entity.isDefusing(IntPtr: entity);Returns a boolean for any entity
Get Name
entity.getNickname(IntPtr: entity);Returns a string (128 length) for any entity
Set name
entity.setNickname(IntPtr: entity);Sets the entity's name but should be the local player
Speed
entity.getSpeed(IntPtr: entity);Returns the entity's speed as a nice integer by doing Math.Sqrt on the speed vector.
Get Weapon Index
entity.getWeaponIndex(IntPtr: entity);Returns the entity's weapon index as an integer
Get Weapon Type
entity.getWeaponType(short: index);Returns the entity's weapon type as a lowercase string.
Get Shots Fired
entity.getShotsFired(IntPtr: entity);Returns the current amount of shots fired while shooting as an integer
Get Punch Angle
entity.getPunchAngle(IntPtr: entity);Returns a vector for the view recoil
Get Position
entity.getPosition(IntPtr: entity);Returns the X,Y,Z of the entities position, this vector is already unpacked by default and does not require Unpack
Example:
var player = entity.getLocalPlayer();
var pos = entity.getPosition(player);
client.print(`X: ${pos.X} Y: ${pos.Y}, Z: ${pos.Z}`);Functions:
Remove Flash
entity.removeFlash(IntPtr: entity); Used to remove the flash for local player typically
Last updated
Was this helpful?