Skip to content

game


get_global_int

int game.get_global_int(int global)

Returns the current value of the provided global
Example Usage
local value = game.get_global_int(--[[global]])

set_global_int

void game.set_global_int(int global, int value)

Sets the current value of the provided global
Example Usage
game.set_global_int(--[[global]], --[[value]])

get_global_float

float game.get_global_float(int global)

Returns the current value of the provided global
Example Usage
local value = game.get_global_float(--[[global]])

set_global_float

void game.set_global_float(int global, float value)

Sets the current value of the provided global
Example Usage
game.set_global_float(--[[global]], --[[value]])

get_local_int

int game.get_local_int(int script_hash, int local)

Returns the current value of the provided local
Example Usage
local value = game.get_local_int(--[[script_hash]], --[[local]])

set_local_int

void game.set_local_int(int script_hash, int local, int value)

Sets the current value of the provided local
Example Usage
game.set_local_int(--[[script_hash]], --[[local]], --[[value]])

get_local_float

float game.get_local_float(int script_hash, int local)

Returns the current value of the provided local
Example Usage
local value = game.get_local_float(--[[script_hash]], --[[local]])

set_local_float

void game.set_local_float(int script_hash, int local, float value)

Sets the current value of the provided local
Example Usage
game.set_local_float(--[[script_hash]], --[[local]], --[[value]])

get_world_peds

int[] game.get_world_peds()

Returns an array of world peds as script guids
Example Usage
for i, ped in ipairs(game.get_world_peds()) do
    -- do something with ped
end

get_world_vehicles

int[] game.get_world_vehicles()

Returns an array of world vehicles as script guids
Example Usage
for i, vehicle in ipairs(game.get_world_vehicles()) do
    -- do something with vehicle
end

get_world_objects

int[] game.get_world_objects()

Returns an array of world objects as script guids
Example Usage
for i, object in ipairs(game.get_world_objects()) do
    -- do something with object
end

get_world_blips

int[] game.get_world_blips()

Returns an array of world blips
Example Usage
for i, blip in ipairs(game.get_world_blips()) do
    -- do something with blip
end