Client API

Functions

  • client.register_callback(event_name, fn)

  • client.log(message)

  • client.con_msg(message)

  • client.get_fps() -> number

  • client.get_system_time() -> string

  • client.get_username() -> string

  • client.get_mouse_pos() -> x, y

  • client.is_mouse_down(button) -> bool

  • client.is_key_down(vk) -> bool

  • client.notify(title, message, duration?, font_id?, texture_id?, color_table?)

  • client.mouse_move(dx, dy)

  • client.set_thirdperson(enabled)

  • client.set_channel(channel_id)

  • client.get_channel() -> int

  • client.send_chat(message, amount?)

client.send_chat

Sends chat through engine console command execution.

Signature:

Behavior:

  • message is required.

  • amount is optional, default 1.

  • Amount is clamped to a safe range.

  • Debug logs are printed in console ([Lua Chat] ...).

Example

Última actualización

¿Te fue útil?