/stats command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /stats command (
/showthread.php?tid=511161)
/stats command -
zohartrejx - 04.05.2014
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
Re: /stats command -
PrivatioBoni - 04.05.2014
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.
Re: /stats command -
Ghazal - 04.05.2014
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;
}
Re: /stats command -
zohartrejx - 04.05.2014
Thanks
!