GET_GAME_NAME
Returns the current game being executed.
Signature
char* GET_GAME_NAME();Returns char* — The game the script environment is running in.
Description
Returns the current game being executed.
Possible values:
| Return value | Meaning |
|---|---|
fxserver |
Server-side code ('Duplicity') |
fivem |
FiveM for GTA V |
libertym |
LibertyM for GTA IV |
redm |
RedM for Red Dead Redemption 2 |
Usage
local retval = GetGameName()
-- always works, by hash
local retval = Citizen.InvokeNative(0xe8eaa18b, Citizen.ResultAsString())JavaScript and C#
const retval = GetGameName();
// by hash
const retval = Citizen.invokeNative('0xe8eaa18b', Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0xe8eaa18b);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.