Anvil Scripting Reference
  • Getting started
    • Introduction
  • 🚀Examples
    • Create a speed overlay
    • Creating a Clock with ImGui
    • Calculating Distances Tool
  • ⚙️ User Settings
    • Make use of our settings API
  • 📦Namespaces
    • engine
    • player
    • key
    • mouse
    • memory
    • draw
    • ImGui
  • 🧪Types
    • Vec2
    • Vec3
    • Vec4
    • playerState
    • refDef
    • clientEntity
    • cg
    • usercmd
    • trace
    • dvar
  • 📄Enums
    • CmdButton
    • ImGuiWindowFlags
    • ImGuiStyleVar
    • ImGuiCol
Powered by GitBook
On this page
  • Available Properties
  • Methods
  • getName()
  • getBoneOrigin(bone)
  • Find the type of properties here
  1. Types

clientEntity

A client entity, such as other players.

PreviousrefDefNextcg

Last updated 2 years ago

To see the type of an individual property, please look at the struct .

Available Properties

  • clientNumber

  • origin

  • angles

  • isAlive

  • isOnGround

  • team

Methods

getName()

Returns the name of this player.

Example:

-- Print closest players name
local closestPlayer = engine.getClosestPlayer()
print("The closest player is: " .. closestPlayer:getName())

getBoneOrigin(bone)

  • bone - The bone you wish to get the origin for

Returns the origin of the given bone of this clientEntity as a Vec3

Available Bones:

  • head

  • helmet

  • spine

  • neck

  • pelvis

Example:

-- The head position of the closest player
local closestPlayer = engine.getClosestPlayer()
local head = closestPlayer:getBoneOrigin("head")
print("The closest players head is at " .. head:toString())

Find the type of properties here

struct clientEntity
{
 	int clientNumber;
	Vec3 origin;
	Vec3 angles;
	bool isAlive;
	bool isOnGround;
	bool isInAir;
};
🧪
here