Skip to content

Script

Functions

Return Type Name
bool script.is_running(string script)
script_global script.globals(number base)
script_local script.locals(number hash, number base)
script_tunable script.tunables(number hash)

Types

script_global

Property Name
string str
scr_vec3 vec3
vec2 vec2
number int8
number int16
number int32
number int64
number uint8
number uint16
number uint32
number uint64
number double
number float
bool bool
Return Type Name Description
script_global at(number index, number size) 1 + (index*size)
script_global at(number index) Adds the index to the global ptr

script_local

Property Name
string str
scr_vec3 vec3
vec2 vec2
number int8
number int16
number int32
number int64
number uint8
number uint16
number uint32
number uint64
number double
number float
bool bool
Return Type Name Description
script_local at(number index, number size) 1 + (index*size)
script_local at(number index) Adds the index to the local ptr

script_tunable

Property Name
string str
scr_vec3 vec3
vec2 vec2
number int8
number int16
number int32
number int64
number uint8
number uint16
number uint32
number uint64
number double
number float
bool bool

Examples

-- Set bullshark testosterone
script.globals(2672741):at(3694).bool = true

-- Disable timeouts for the MP drone
util.create_thread(function()
  if not script.is_running('am_mp_drone') then
    return
  end

  for i=0,7 do
    script.locals('am_mp_drone', 197):at(245 + (i * 2)).int32 = 0
  end
end)