Lua API
  • 🔎Overview
  • Getting started
    • 🚀Creating scripts
    • 📓Metadata
    • ☎ïļCallbacks
    • 🧠Examples
    • 🌐Useful resources
  • Documentation
    • ⚙ïļNamespaces
      • ðŸ–ĨïļGui
      • ✏ïļRender
      • 🏎ïļEngine
      • ðŸ”ĒMath
      • ⚙ïļUtilities
      • 🙎Entities
      • 📖Database
      • ðŸ–ąïļInput
      • 🌌Panorama
      • ðŸŠķMaterials
      • 📂Filesystem
      • 🗃ïļZip
    • ⚙ïļInstances
      • ⚙ïļGlobal Vars
      • ⚙ïļFatality
      • ⚙ïļGamerules
      • ⚙ïļServer
    • ⚙ïļDatatypes
      • ðŸ–Ĩïļcontrol
      • ðŸ–Ĩïļcheckbox
      • ðŸ–Ĩïļcombobox
      • ðŸ–Ĩïļcolor_picker
      • ðŸ–Ĩïļslider
      • ðŸ–Ĩïļtextbox
      • ðŸ–Ĩïļlist
      • ⚙ïļentity
      • ⚙ïļplayer_info
      • ⚙ïļweapon_info
      • ⚙ïļuser_cmd
      • ⚙ïļtrace_t
      • ⚙ïļvec3
      • ⚙ïļtimer
      • ⚙ïļcvar
      • ⚙ïļshot_info
      • ⚙ïļgame_event
      • ⚙ïļmaterial
      • ⚙ïļmaterial_var
      • ⚙ïļzip
      • ⚙ïļanimator
Powered by GitBook

ÂĐ 2025 - FATALITY

On this page
  • Functions
  • get_local_player
  • get_player_for_user_id
  • get_player_info
  • get_view_angles
  • set_view_angles
  • is_in_game
  • exec
  1. Documentation
  2. Namespaces

Engine

engine namespace

Functions

get_local_player

engine.get_local_player()

Returns:

local player's entity index

number

get_player_for_user_id

engine.get_player_for_user_id(event:get_int("userid"))

number

Returns:

player's entity index

number

get_player_info

engine.get_player_info(engine.get_local_player())

player's entity index

number

players entity index (1 - 64)

Returns:

player's info

get_view_angles

local pitch, yaw = engine.get_view_angles()

Returns:

pitch

number

yaw

number

set_view_angles

engine.set_view_angles(0, 90)

pitch

number

pitch angle (-90 - 90)

yaw

number

yaw angle (0 - 360) or

(-180 - 180)

is_in_game

engine.is_in_game()

Returns:

true if you are in a game

boolean

exec

engine.exec("say hello from engine cmd")

con_command

string

console command to execute

PreviousRenderNextMath

Last updated 2 years ago

player's

players user_id. can be retrieved with their or an event

⚙ïļ
🏎ïļ
Value
Datatype
Parameter
Datatype
Description
user_id
player_info
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
player_info
Value
Datatype
Parameter
Datatype
Description
Value
Datatype
Parameter
Datatype
Description