Stats command, ZCMD +rep.
#2

"PlayerInfo" is the name of the enum, not of the array. So use the name of the array. An example:
pawn Код:
enum PlayerInfo
{
    Pass[129], //User's password
    Adminlevel, //User's admin level
    VIPlevel, //User's vip level
    Money, //User's money
    Scores, //User's scores
    Kills, //User's kills
    Deaths //User's deaths
};

new pInfo[MAX_PLAYERS][PlayerInfo];
and you use this instead:
pawn Код:
CMD:stats(playerid, params[])
{
    new string[128];
    format(string, sizeof(string), "Name: %s | ID: %d | Score: %d | Kills: %i | Deaths: %i | Money: %d | Adminlevel: %d", GetName(playerid), playerid, GetPlayerScore(playerid), pInfo[playerid][Kills], pInfo[playerid][Deaths], GetPlayerMoney(playerid), pInfo[playerid][Adminlevel]);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Reply


Messages In This Thread
Stats command, ZCMD +rep. - by DemME - 04.05.2014, 12:37
Re: Stats command, ZCMD +rep. - by Konstantinos - 04.05.2014, 12:42
Re: Stats command, ZCMD +rep. - by DemME - 04.05.2014, 12:51

Forum Jump:


Users browsing this thread: 1 Guest(s)