[Help] Saving money after GMX-ing the server
#1

Yes I know its the wrong section but I was in a hurry :P

Okay so my friend asked me to open this topic because he has a Problem.

After /rcon GMX the money won't save (admin lvl does tho).
what can he add (or delete) to fix it?

thanks in advance.

P.S: here is the OnPlayerDisConnect (if needed):

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  new
      name[MAX_PLAYER_NAME],
      file[256];
  GetPlayerName(playerid, name, sizeof(name));
  format(file, sizeof(file), SERVER_USER_FILE, name);
  if(gPlayerLogged[playerid] == 1)
  {
    dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
    dini_IntSet(file, "Money", PlayerInfo[playerid][pCash]);
    dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    dini_IntSet(file, "Banned",PlayerInfo[playerid][pBanned]);
    dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills]);
    dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths]);
    dini_IntSet(file, "Jailed",PlayerInfo[playerid][pJailed]);
    dini_IntSet(file, "Muted",PlayerInfo[playerid][pMuted]);
  }
  gPlayerLogged[playerid] = 0;
  KillTimer( PlayerInfo[playerid][SpawnTimer] );
  new
      pname[MAX_PLAYER_NAME],
      string[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "|| youdonthavetoknow ||  %s has left the server. (Crashed)", pname);
        case 1: format(string, sizeof(string), "|| youdonthavetoknow ||  %s has left the server. (Leaving)", pname);
        case 2: format(string, sizeof(string), "|| youdonthavetoknow ||  %s has left the server. (Kicked /Banned)", pname);
    }
    SendClientMessageToAll(YELLOW, string);
    MidoStreamDisconnect(playerid);
  return 1;
}
Reply
#2

I think I had a similar problem. When a server is GMX'd it doesn't call the OnPlayerDisconnect. You should make a command called /gmx and have it save everyones money in a loop and restart the server or you could just have it kick everybody and it would do basically the same thing.
Reply
#3

can you please post the /gmx command with save please
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)