client

get_local_time

Returns the current hours, minutes, and seconds

int get_local_time()

Example

print(client.get_local_time()) -- prints current (hrs,mins,sec)

get_unix_time

Returns the current unix timestamp

int get_unix_time()

Example

print(client.get_unix_time()) -- prints current unix time

get_hitgroup_name

Returns the specified hitgroup as a string

string get_hitgroup_name()
FieldsDescription

hitgroup e_hitgroups

hitgroup

Example

print(client.get_hitgroup_name(e_hitgroups.HEAD))

get_hitbox_name

Returns the specified hitbox as a string

string get_hitbox_name()
FieldsDescription

hitbox e_hitboxes

hitbox

Example

print(client.get_hitbox_name(e_hitboxes.HEAD))

time_to_ticks

Converts time (in seconds) into csgo ticks

int client.time_to_ticks(<float> time)

Example

print(client.time_to_ticks(1)) -- prints 64 on a 64-tick server

ticks_to_time

Converts csgo ticks into seconds

float client.ticks_to_time(<int> ticks)

Example

print(client.ticks_to_time(64)) -- prints 1

get_fps

Returns the client's frames per second

int get_fps()

Example

print(client.get_fps()) -- prints the current client frames per second

get_tickrate

Returns the current server's tickrate

int get_tickrate()

Example

print(string.format("Current Server Tickrate: %d",client.get_tickrate()))

precache_model

Adds model to level precache list

void precache_model(<string> name)
FieldsDescription

name string

model path to cache

Example

client.precache_model("models/weapons/v_ak47beast.mdl")

random_float

Returns a random float between min and max

float random_float(<float> min, <float> max)
FieldsDescription

min float

minimum float value

max float

maximum float value

Example

print(client.random_float(0.5, 2.5)) -- prints a random float between (0.5 - 2.5)

random_int

Returns a random int between min and max

int random_int(<int> min, <int> max)
FieldsDescription

min int

minimum int value

max int

maximum int value

Example

print(client.random_int(1, 10)) -- prints a random int between 1 and 10

is_in_thirdperson

Returns if the camera is in third person

bool is_in_thirdperson()

Example

print(client.is_in_thirdperson()) -- returns true or false if condition is met

can_fire

Returns if the client is able to fire

bool can_fire()

Example

print(client.can_fire()) -- returns true or false if condition is met

log_screen

Prints to screen logs

void log_screen(<string> fmt,...)

Example

client.log_screen("white text")
client.log_screen("white text", color_t(255, 0, 0), "red text", "still red text")
client.log_screen(color_t(0, 255, 0), "green text")

log

Prints to console logs

void log(<string> fmt,...)

Example

client.log("white text")
client.log("white text", color_t(255, 0, 0), "red text", "still red text")
client.log(color_t(0, 255, 0), "green text")

delay_call

Runs a function after a defined delay

void delay_call(<function> fn, <float> delay)

Example

local function delayed_call()
    print("lol delay")
end

client.delay_call(delayed_call, 5.0)

Last updated