/stats command
#1

Can someone help me with /stats command?
Currently i have
Quote:

enum pInfo
{
pAdminLevel,
pCash,
pScore,
}

Can someone tell me how to do /stats command so it'll show Adminlevel , cash and score?
Please don't use ZCMD or others, normal one.
Thanks all
Reply
#2

pawn Code:
new admin = PlayerInfo[playerid][pAdminLevel];
new cash = PlayerInfo[playerid][pCash];
new score = PlayerInfo[playerid][pScore];


new stats[144];
format(stats,sizeof(stats),"Admin: %i | Cash: $%i | Score: %i |",admin,cash,score);
SendClientMessage(playerid, COLOR_WHITE, stats);
Should be OK. Untested.
Reply
#3

Maybe something like this?
Code:
CMD:stats(playerid,params[])
{
new id = playerid;
if(!isnull(params)) id = strval(params);
format(megastr, sizeof(megastr, "Name: %s /n Score: %i/n Cash: %i/nAdminLevel: %i",PlayerName(id),GetPlayerScore(id),PlayerInfo[id][pCash],PlayerInfo[id][pAdmin]);
ShowPlayerDialog(playerid, DIALOG_TEXT, DIALOG_STYLE_MSGBOX, "COL_YELLOW"" Player Stats", megastr, "Close", "");
return 1;
}
Reply
#4

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)