FECALITY.SHOP [API]
  • Overview
  • GETTING STARTED
    • Metadata
    • Creating scripts
    • Callbacks
    • Examples
    • Useful resources
  • DOCUMENTATION
    • Datatypes
      • entity
      • player_info
      • weapon_info
      • user_cmd
      • trace_t
      • vec3
      • cvar
      • timer
      • cfg_value
      • shot_info
      • game_event
      • material
      • material_var
      • zip
      • animator
    • Namespaces
      • Gui
      • Render
      • Engine
      • Math
      • Utilities
      • Entities
      • Database
      • Input
      • Panorama
      • Materials
      • Filesystem
      • Zip
    • Instances
      • Global Vars
      • Fecality
      • Gamerules
      • Server
Powered by GitBook
On this page
  • Entity
  • Player
  1. DOCUMENTATION
  2. Datatypes

entity

entity datatype

Entity

get_index

local ent = entities.get_entity(1)ent:get_index()

Returns:

entity index

number

is_player

local ent = entities.get_entity(1)ent:is_player()

Returns:

whether or not the entity is a player

boolean

get_class

ent:get_class() -- ex: CCSPlayer

Returns:

entity's class name

string

get_prop

ent:get_prop("m_hMyWeapons", 1)

name

string

❌

table index

number

index of prop if it is an array

0

Returns:

prop's value

set_prop

ent:set_prop("m_bSpotted", 0, true)

name

string

table index

number

index of prop if it is an array

value

any

value to set prop to

Usage:

Sets prop's value.

is_alive

ent:is_alive()

Returns:

whether or not the entity is alive

boolean

get_esp_alpha

Returns:

esp alpha (0 - 255)

float

Player

is_valid

local player = entities.get_entity(engine.get_local_player())player:is_valid()

Returns:

true if the player is alive and not dormant

boolean

is_enemy

player:is_enemy()

Returns:

true if the player is an enemy

boolean

get_player_info

player:get_player_info()

Returns:

the player's info

get_bbox

local x1, y1, x2, y2 = player:get_bbox()

Returns:

x1

number

y1

number

x2

number

y2

number

Only works on enemy players!

get_weapon

player:get_weapon()

Returns:

the player's active weapon

get_eye_position

player:get_eye_position()

Returns:

x

number

y

number

z

number

get_hitbox_position

player:get_hitbox_position(1)

hitbox_index

number

the hitbox id

Returns:

x

number

y

number

z

number

PreviousDatatypesNextplayer_info

Last updated 2 years ago

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

number, string, boolean, ​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

​​

Value
Datatype
Value
Datatype
Value
Datatype
Parameter
Datatype
Description
Default value
prop name
Value
Datatype
math.vec3
Parameter
Datatype
Description
prop name
Value
Datatype
Value
Datatype
Value
Datatype
Value
Datatype
Value
Datatype
player_info
Value
Datatype
Value
Datatype
entity
Value
Datatype
Parameter
Datatype
Description
Value
Datatype