14.02.2014, 20:53
pawn Код:
ocmd:stats(playerid,params[])
{
new pID;
if(!sscanf(params,"r",pID))
{
if (!IsPlayerConnected(pID)) return SCM(playerid,grau,"Invalid player.");
new str[64];
format(str,sizeof(str),"Level: %d Money: %d\n",Player[pID][Level],Player[pID][Money]);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"caption",str,"OK","");
}
else
{
if (!strlen(params))
{
new str[64];
format(str,sizeof(str),"Level: %d Money: %d\n",Player[playerid][Level],Player[playerid][Money]);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"caption",str,"OK","");
}
else SCM(playerid,grau,"Admin: /stats [playerid/name].")
}
return 1;
}