Check if we are running on RedM with C# when the script can run on both FiveM and RedM

Some scripts like spawnmanager have both GTA V and RDR2 declared:

games { 'rdr3', 'gta5' }

In LUA, is possible to check if RDR2 is being used by throwing a native in an if statement:

-- RDR3 player model bits
if N_0x283978a15512b2fe then
    N_0x283978a15512b2fe(PlayerPedId(), true)

On C#, how can you check for something like this?

Not too sure how the whole if statement would work in C# cause not sure if that native returns a bool, but you would do something like

Function.Call((Hash)0x283978A15512B2FE, API.GetPlayerPedId(), true)

The return type on ‘https://www.mod-rdr.com/nativedb/search/?s=0x283978a15512b2fe&’ says it’s a void return, but that is how you call a native function in C#.
If you had a function call that had a return type of a bool this is how you would get the return.

bool plyInvincible = Function.Call<bool>((Hash)0x0CBBCB2CCFA7DC4E, _player)

There is now the GET_GAME_NAME native that returns the name of the current game. We can check if the script is running in RedM like this:

if (API.GetGameName() == "redm")
{
    // We are running RedM!
}