Owned Cars Disappear on GMX
#2

Make a custom restart command. GMX tends to lead to bugs. Here's an example of mine:

pawn Код:
CMD:restart(playerid, params[])
{
    #pragma unused params
    #pragma unused playerid
    new
        uFile[50],
        player_Name[MAX_PLAYER_NAME];

    foreach(Player, i)
    {
        GetPlayerName(i, player_Name, sizeof(player_Name));
        format(uFile, 50, USER_DIRECTORY, player_Name);

        new
            INI:playerFile = INI_Open(uFile);

        INI_WriteInt(playerFile, "AuthLvl", SInfo[i][AuthLvl]);
        INI_WriteInt(playerFile, "VIP", SInfo[i][VIP]);
        INI_WriteInt(playerFile, "Cash", GetPlayerMoney(i));
        INI_WriteInt(playerFile, "Score", GetPlayerScore(i));
        INI_WriteInt(playerFile, "Kills", SInfo[i][Kills]);
        INI_WriteInt(playerFile, "Skin", SInfo[i][CustomSkin]);
        INI_WriteInt(playerFile, "Deaths", SInfo[i][Deaths]);
        INI_WriteInt(playerFile, "CustomCarID", SInfo[i][CustomCarID]);
        INI_WriteInt(playerFile, "CustomCarC1", SInfo[i][CustomCarC1]);
        INI_WriteInt(playerFile, "CustomCarC2", SInfo[i][CustomCarC2]);
        INI_WriteString(playerFile, "CustomCarPlate", SInfo[i][CustomCarPlate]);
       
        printf("<User: System> Saved ID %d", i);

        INI_Close(playerFile);
    }
    GameModeExit();
    return 1;
}
May wish to create an administrator check in there somewhere.
Reply


Messages In This Thread
Owned Cars Disappear on GMX - by -CaRRoT - 02.08.2011, 17:03
Re: Owned Cars Disappear on GMX - by Skylar Paul - 02.08.2011, 17:10
Re: Owned Cars Disappear on GMX - by -CaRRoT - 02.08.2011, 17:17
Re: Owned Cars Disappear on GMX - by Skylar Paul - 02.08.2011, 17:21

Forum Jump:


Users browsing this thread: 1 Guest(s)