Statistic's arent updating. (Y_ini)
#5

I'm positive.
OnPlayerDeath:
pawn Код:
PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
My /setadmin command.
pawn Код:
PlayerInfo[target][pAdmin] = 1;
<-- Just a example of what I have under it.

I also implemented a /savestats command, which still doesn't save there kills/deaths.
pawn Код:
CMD:savestats(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >=4)
    {
        new string[128], reason[75];
        if(sscanf(params, "s[75]",reason)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /savestats [reason]");
        {
            foreach (Player, i)
            {
                new INI:File = INI_Open(UserPath(i));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Cash",GetPlayerMoney(i));
                INI_WriteInt(File,"Admin",PlayerInfo[i][pAdmin]);
                INI_WriteInt(File,"Vip",PlayerInfo[i][pVip]);
                INI_WriteInt(File,"Kills",PlayerInfo[i][pKills]);
                INI_WriteInt(File,"Deaths",PlayerInfo[i][pDeaths]);
                INI_WriteInt(File,"Ban",PlayerInfo[i][pBan]);
                INI_WriteInt(File,"Score",PlayerInfo[i][pScore]);
                INI_WriteInt(File,"Talent",PlayerInfo[i][pTalent]);
                INI_Close(File);
            }
            format(string,sizeof(string), "AdmCmd: %s %s has Saved everyones stats. Reason: %s",GetAdminLvlName(playerid),GetName(playerid),reason);
            SendClientMessageToAll(COLOR_ORANGE, string);
        }
    }
    else return SendClientMessage(playerid, COLOR_GREY, ERROR);
    return 1;
}
Reply


Messages In This Thread
Statistic's arent updating. (Y_ini) - by rangerxxll - 16.03.2013, 18:40
Re: Statistic's arent updating. (Y_ini) - by Mystique - 16.03.2013, 18:58
Re: Statistic's arent updating. (Y_ini) - by rangerxxll - 16.03.2013, 19:12
Re: Statistic's arent updating. (Y_ini) - by Da_Noob - 16.03.2013, 19:18
Re: Statistic's arent updating. (Y_ini) - by rangerxxll - 16.03.2013, 19:21

Forum Jump:


Users browsing this thread: 3 Guest(s)