Page cover

๐Ÿ•น๏ธGame Mode

The GameMode features allow easy access to certain parts of the current mission.

Global Variables

These variables are updated every second.

PlayerPed = PlayerPedId()
PlayerPosition = GetEntityCoords(PlayerPed)
PlayerGameId = PlayerId()

Helper = table

Usage

In the mission stage you can use a normal LUA variable:

local whileFunc = function()
    local dist = math.floor(#(PlayerPosition - vec3(1,1,1)))
    if dist > 5 then
        print("Not Hello!")
    end
    
    print("Hello")
end

Global Functions

GM().GetGameVariales()

This function allows quick access to game variables at runtime.

GM().SyncGameVariable()

[NETWORKING] This option allows synchronization with all players ONLY when doing a mission in cooperative mode.

Last updated

Was this helpful?