game

Interact with Counter-Strike 2.

Functions:

Get Schema

game.get_schema(string: schema, string: field);

Returns the schema offset.

Get View Angles

game.get_view_angles()

Returns the local player's view angles x, y, and z.

Trace Line

game.trace_line(int: x, int: y, int: z, int: x2, int: y2, int: z2);

Uses the map parser and returns false if the trace hit something, returns true if it didn't.

Dump Schemas

game.dump_schemas();

Returns all useable schemas in the cheat.

Get Globals

game.get_globals();

Returns a table with these fields:

Global Name
Description

real_time

Returns the local time in seconds.

frame_count

Returns the number of frames since the game started.

frame_time

Returns the number of ticks elapsed in the server.

max_clients

Returns the maximum number of players in the server.

interval_per_tick

Returns the time elapsed in one game tick in seconds.

current_time

Returns the game time in seconds. This number is synchronized with the server.

tick_count

Returns the number of ticks elapsed in the server.

map_name

Returns the name of the map.

Last updated