Uhmm player that logs on gets my stats?
#7

Quote:
Originally Posted by Michael@Belgium
Посмотреть сообщение
Reset the variables also when the player leaves (OnPlayerDisconnect()) - After the player stats get saved.
Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",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,"Rank",PlayerInfo[playerid][pRank]);
    INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVip]);
    INI_WriteInt(File,"Warns",PlayerInfo[playerid][pWarn]);
    INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
    INI_Close(File);
    KillStreak[playerid] = 0;
    return 1;


}
Already done :/

EDIT: I fixed it, thx a lot for your help
Reply


Messages In This Thread
Uhmm player that logs on gets my stats? - by Blast3r - 18.01.2013, 20:42
Re: Uhmm player that logs on gets my stats? - by JaKe Elite - 18.01.2013, 20:59
Re: Uhmm player that logs on gets my stats? - by AaronKillz - 18.01.2013, 21:08
Re: Uhmm player that logs on gets my stats? - by Pizzy - 18.01.2013, 21:47
Re: Uhmm player that logs on gets my stats? - by Blast3r - 19.01.2013, 07:38
Re: Uhmm player that logs on gets my stats? - by Michael@Belgium - 19.01.2013, 07:40
Re: Uhmm player that logs on gets my stats? - by Blast3r - 19.01.2013, 07:45

Forum Jump:


Users browsing this thread: 2 Guest(s)