stats
#4

pawn Код:
#define PATH "/Users/%s.ini"

stock UserPath(playerid)
    {
        new string[128],playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid,playername,sizeof(playername));
        format(string,sizeof(string),PATH,playername);
        return string;
    }


public OnPlayerDisconnect(playerid, reason)
    {
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
        INI_WriteInt(File,"money",GetPlayerMoney(playerid));
        INI_WriteInt(File,"admin",PlayerInfo[playerid][pAdmin]);
        INI_WriteInt(File,"kills",PlayerInfo[playerid][pKills]);
        INI_WriteInt(File,"deaths",PlayerInfo[playerid][pDeaths]);
        INI_WriteInt(File,"score",PlayerInfo[playerid][pScore]);
            INI_WriteInt(File,"vip",PlayerInfo[playerid][pVIP]);
            INI_WriteInt(File,"killpoints",PlayerInfo[playerid][pKillPoints]);
        INI_Close(File);
        return 1;
    }
Create ''Users'' directory on your scriptfiles folder.
Reply


Messages In This Thread
stats - by UfsDev - 05.04.2014, 17:30
Re: stats - by Mario' - 05.04.2014, 17:33
Re: stats - by UfsDev - 05.04.2014, 17:39
Re: stats - by Equuuuin0X - 05.04.2014, 17:45
Re: stats - by UfsDev - 05.04.2014, 17:46
Re: stats - by Equuuuin0X - 05.04.2014, 17:47
Re: stats - by UfsDev - 05.04.2014, 20:29
Re: stats - by Equuuuin0X - 06.04.2014, 01:16
Re: stats - by superrobot48 - 06.04.2014, 01:49
Re: stats - by Equuuuin0X - 06.04.2014, 01:52

Forum Jump:


Users browsing this thread: 5 Guest(s)