Returns the current value of the provided global
function game.get_global_int(global: int): int
-- example usage
local value = game.get_global_int(--[[global]])
Sets the current value of the provided global
function game.set_global_int(global: int, value: int): void
-- example usage
game.set_global_int(--[[global]], --[[value]])
Returns the current value of the provided global
function game.get_global_float(global: int): float
-- example usage
local value = game.get_global_float(--[[global]])
Sets the current value of the provided global
function game.set_global_float(global: int, value: float): void
-- example usage
game.set_global_float(--[[global]], --[[value]])
Returns the current value of the provided local
function game.get_local_int(script_hash: int, local: int): int
-- example usage
local value = game.get_local_int(--[[script_hash]], --[[local]])
Sets the current value of the provided local
function game.set_local_int(script_hash: int, local: int, value: int): void
-- example usage
game.set_local_int(--[[script_hash]], --[[local]], --[[value]])
Returns the current value of the provided local
function game.get_local_float(script_hash: int, local: int): float
-- example usage
local value = game.get_local_float(--[[script_hash]], --[[local]])
Sets the current value of the provided local
function game.set_local_float(script_hash: int, local: int, value: float): void
-- example usage
game.set_local_float(--[[script_hash]], --[[local]], --[[value]])
Returns an array of world peds as script guids
function game.get_world_peds(): int[]
-- example usage
for i, ped in ipairs(game.get_world_peds()) do
-- do something with ped
end
Returns an array of world vehicles as script guids
function game.get_world_vehicles(): int[]
-- example usage
for i, vehicle in ipairs(game.get_world_vehicles()) do
-- do something with vehicle
end
Returns an array of world objects as script guids
function game.get_world_objects(): int[]
-- example usage
for i, object in ipairs(game.get_world_objects()) do
-- do something with object
end
Returns an array of world blips
function game.get_world_blips(): int[]
-- example usage
for i, blip in ipairs(game.get_world_blips()) do
-- do something with blip
end
Returns the player index that owns the provided entity
function game.get_entity_owner(script_guid: int): int
-- example usage
local owner = game.get_entity_owner(--[[script_guid]])
Returns the gameplay camera's coordinates
function game.get_gameplay_camera_coords(): vec3
-- example usage
local coords = game.get_gameplay_camera_coords()
Returns the gameplay camera's up vector
function game.get_gameplay_camera_up(): vec3
-- example usage
local up_vector = game.get_gameplay_camera_up()
Returns the gameplay camera's right vector
function game.get_gameplay_camera_right(): vec3
-- example usage
local right_vector = game.get_gameplay_camera_right()
Returns the gameplay camera's right vector
function game.get_gameplay_camera_forward(): vec3
-- example usage
local forward_vector = game.get_gameplay_camera_forward()
Returns the screen position of the provided world coordinates
function game.world_to_screen(world_coords: vec3): bool, float, float
-- example usage
local on_screen, x, y = game.world_to_screen(--[[world_coords]])