/stats command
#4

Well if you have something like:
pawn Код:
enum pInfo
{
    pCash,
    pKills,
    pDeaths,
    pRank,
    pGameTime,
    pVisits
}
new PlayerInfo[MAX_PLAYERS][pInfo];
You can make something like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/stats", cmdtext, true, 10) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new statstring[128];
            format(statstring, sizeof(statstring), "| Your Stats | Kills: %d | Deaths: %d | Money: $%d | Rank: %d | GamePoints: %d | Visits: %d |",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],GetPlayerMoney(playerid),PlayerInfo[playerid][pRank],PlayerInfo[playerid][pGameTime],PlayerInfo[playerid][pVisits]);
            SendClientMessage(playerid,-1, statstring);
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
/stats command - by Champ - 12.11.2011, 12:28
Re: /stats command - by Stigg - 12.11.2011, 12:36
Re: /stats command - by Champ - 12.11.2011, 13:11
Re: /stats command - by Stigg - 12.11.2011, 13:19
Re: /stats command - by Champ - 12.11.2011, 13:38
Re: /stats command - by Stigg - 12.11.2011, 13:43
Re: /stats command - by Champ - 12.11.2011, 13:47
Re: /stats command - by Stigg - 12.11.2011, 13:52
Re: /stats command - by Kostas' - 12.11.2011, 14:04
Re: /stats command - by Champ - 12.11.2011, 18:03

Forum Jump:


Users browsing this thread: 2 Guest(s)