Statistic's arent updating. (Y_ini)
#1

Hi. So I have a few commands that just aren't working. The first one is /stats which shows the players statistics, and the second is /check, which will get the selected players statistics. Kills, Deaths, any of that, that required PlayerInfo is not updating for some reason. I'm really confused.

Here's my current enumerator.
pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pVip,
    pKills,
    pDeaths,
    pBan,
    pScore,
    pTalent
}
new PlayerInfo[MAX_PLAYERS][pInfo];
And my /check command for administrators.
pawn Код:
CMD:check(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >=1 )
    {
        new target;
        if(sscanf(params, "u",target)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /check [ID].");
        if(!IsPlayerConnected(target)) return SendClientMessage(playerid,COLOR_RED, "Player is not connected.");
        new Float:health;
        GetPlayerHealth(target, health);
        new Float:armour;
        GetPlayerArmour(target, armour);
        new money;
        money = GetPlayerMoney(target);
        new score;
        score = GetPlayerScore(target);
        new stats[1280];
        format(stats, sizeof(stats), "{44A1D0}Score: %d\nHealth: %f\nArmour: %f\nMoney: %d\nVIP: %s\nAdmin Level: %s\nKills: %d\nDeaths: %d\n",
        score, health, armour, money, GetVipLvlName(target), GetAdminLvlName(target), PlayerInfo[target][pKills], PlayerInfo[target][pDeaths]);
        ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Information",stats,"Ok","");
    }
    else return SendClientMessage(playerid,COLOR_GREY, ERROR);
    return 1;
Do I need to add a timer or something, that will re-read the stats, or what? I completely have no idea.

I also have this under onplayerdeath.
pawn Код:
PlayerInfo[killerid][pKills]++;
    PlayerInfo[playerid][pDeaths]++;
Any help would be appreciated. Thank you.
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: 2 Guest(s)