Skip to content

engine

execute_client_cmd

engine.execute_client_cmd(command: string)

Name Type Description
command string Command to execute
Example
1
2
3
4
5
register_callback("player_death", function(event)
    if event:get_pawn("attacker") == entitylist.get_local_player_pawn() then 
        engine.execute_client_cmd("say 1")
    end
end)

play_sound

engine.play_sound(sound_name: string, volume: number)

Name Type Description
sound_name string Sound name
volume number Volume in the range [0.0, 1.0]

chat_print

engine.chat_print(text: string)

Name Type Description
text string Text to print

camera_in_thirdperson

engine.camera_in_thirdperson(): boolean


get_level_name

engine.get_level_name(): string


get_product_version_string

engine.get_product_version_string(): string


get_netvar_offset

engine.get_netvar_offset(module_name: string, table_name: string, prop_name: string): number

Name Type Description
module_name string Module name
table_name string Name of the table
prop_name string Name of the property

trace_bullet

engine.trace_bullet(from_entity: base_entity_t, from: vec3_t, to: vec3_t): number

Name Type Description
from_entity base_entity_t Player whose weapon will be used for this trace
from vec3_t Position to start tracing from
to vec3_t Position where the trace ends

Info

Returns nil if bullet can't hit