RedM Natives

GET_CURRENT_GAME_NAME

This native returns the currently used game's name.

Hash0xACA18ECD
Runtime nameGetCurrentGameName
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

char* GET_CURRENT_GAME_NAME();

Returns char* — The game name as a string, one of the following values: gta4, gta5, rdr3

Description

Cfx.re native reference

This native returns the currently used game's name.

Usage

Lua
local retval = GetCurrentGameName()

-- always works, by hash
local retval = Citizen.InvokeNative(0xaca18ecd, Citizen.ResultAsString())
JavaScript and C#
JavaScript
const retval = GetCurrentGameName();

// by hash
const retval = Citizen.invokeNative('0xaca18ecd', Citizen.returnResultAnyway(), Citizen.resultAsString());
C#
string retval = Function.Call<string>((Hash)0xaca18ecd);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.