Hello I have a question about /stats command....
#2

This is my stats command from my CnR Gamemode:

pawn Код:
CMD:stats(playerid, params[])
{
    new str[128], formatit[256], id;
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "Syntax: /stats (id)");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Player not connected!");
    format(str, sizeof(str), "%s account status", GetName(id));
    SendClientMessage(playerid, COLOR_LIME, str);
    format(formatit, sizeof(formatit), ""white"%s account status:\n\nAdminLvl: %i\nVipLvl: %i\nMoney: $%i\nScore: %i\nKills: %i\nDeaths: %i\nWantedLvl: %i\nWeed: %i", GetName(id), pInfo[id][pAdmin], pInfo[id][pVip], GetPlayerMoney(id), GetPlayerScore(id), pInfo[id][pKills], pInfo[id][pDeaths], pInfo[id][pWanted], pInfo[id][pWeed]);
    ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, ""white"Status:", formatit, "Ok", "");
    return 1;
}
Note: It uses sscanf and zcmd.
Reply


Messages In This Thread
Hello I have a question about /stats command.... - by Scrillex - 31.08.2012, 09:20
Re: Hello I have a question about /stats command.... - by JaKe Elite - 31.08.2012, 09:25
Re: Hello I have a question about /stats command.... - by ThePrograme - 31.08.2012, 09:25
Re: Hello I have a question about /stats command.... - by Scrillex - 31.08.2012, 09:28

Forum Jump:


Users browsing this thread: 1 Guest(s)