SA-MP Forums Archive
Problem OnGameModeExit - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem OnGameModeExit (/showthread.php?tid=661031)



Problem OnGameModeExit - KamilPolska - 19.11.2018

I have a question. As typing "exit" or "gmx" on the CMD console in Windows, not it saves me nothing. Why?


Re: Problem OnGameModeExit - JaskaranSingh - 20.11.2018

Can you show your code?


Re: Problem OnGameModeExit - KamilPolska - 20.11.2018

Код:
public OnGameModeExit()
{
    new name[35 + 3];
    for(new i, j = sizeof(TurfInfo); i < j; i++)
    {
        format(name, sizeof(name), "%s%i", TurfInfo[i][TurfName], i);
        dini_IntSet("turfs.ini", name, TurfInfo[i][TurfOwner]);
    }
    return 1;
}



Re: Problem OnGameModeExit - Riddick94 - 20.11.2018

Those commands don't call OnGameModeExit callback. Ctrl + C (which is for closing Windows Console shortcut) does.

Quote:
Originally Posted by Wiki
Description:
This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or GameModeExit.
But using GMX should call it too. So maybe your code is wrong. Would have to do tests.