SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 27/09/2010, 03:39 PM   #1
alpha500delta
High-roller
 
alpha500delta's Avatar
 
Join Date: Feb 2010
Posts: 1,301
Reputation: 91
Default [Help] Saving money after GMX-ing the server

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 Code:
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;
}
__________________
Skype: Alpha500delta | Steam: Alpha500delta

Last edited by alpha500delta; 27/09/2010 at 04:01 PM.
alpha500delta is offline  
Old 28/09/2010, 01:22 AM   #2
MisterTickle
Huge Clucker
 
MisterTickle's Avatar
 
Join Date: Jul 2007
Posts: 375
Reputation: 52
Default Re: [Help] Saving money after GMX-ing the server

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.
__________________
MisterTickle is offline  
Old 28/09/2010, 07:15 AM   #3
Leeroy.
Big Clucker
 
Leeroy.'s Avatar
 
Join Date: Sep 2010
Posts: 192
Reputation: 0
Default Re: [Help] Saving money after GMX-ing the server

can you please post the /gmx command with save please
Leeroy. is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Again problem with saving money Flashy Help Archive 3 02/06/2010 04:09 PM
Money Saving Problem NiiRV4N4 Help Archive 0 08/05/2010 06:11 PM
How do I make money saving. Studio Help Archive 1 12/12/2009 01:53 AM
Help with saving stats (Money and Score) V3nuZ Help Archive 3 23/02/2009 06:51 PM
/admins command & money saving max007 Help Archive 15 15/02/2009 09:06 AM


All times are GMT. The time now is 02:27 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.