04.04.2014, 11:56
pawn Code:
CMD:stats(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_RED," (Error): /stats [id]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"(Error): Player ID is not valid.
new gname[MAX_PLAYER_NAME];
GetPlayerName(id,gname,sizeof(gname));
new str[20][1900];
format(str[0],1900,"| ------ | %s 's Status | ------- | \n", gname);
strcat(str[1],str[0]);
format(str[2],1900,""COL_WHITE"Score: "COL_LIGHTBLUE"%d \n "COL_WHITE"Money: "COL_LIGHTBLUE"$ %d \n"COL_WHITE"Kills: "COL_LIGHTBLUE"%d \n "COL_WHITE"Deaths: "COL_LIGHTBLUE"%d \n", pinfo[id][Score], pinfo[id][Money], pinfo[id][Kills], pinfo[id][Deaths]);
strcat(str[1],str[2]);
format(str[3],1900,""COL_WHITE"Admin Level: "COL_LIGHTBLUE"%d \n"COL_WHITE"VIP Level: "COL_LIGHTBLUE"%d \n "COL_WHITE"Total Robberies: "COL_LIGHTBLUE"%d \n ", pinfo[id][Admin], pinfo[id][VIP], pinfo[id][TotalRobs]);
strcat(str[1],str[3]);
format(str[4],1900,""COL_WHITE"Robbery Skill: "COL_LIGHTBLUE"%d \n, "COL_WHITE"Hitman Skill: "COL_LIGHTBLUE"%d \n,"COL_WHITE"Terrorist Skill: "COL_LIGHTBLUE"%d \n "COL_WHITE"Total Time Played: "COL_LIGHTBLUE" [%d : %d ] \n", pinfo[id][Robskill], pinfo[id][Hitmanskill], pinfo[id][Terskill],pinfo[id][Hours],pinfo[id][Minutes]);
strcat(str[1],str[4]);
format(str[5],1900,"| ---------------------------------------------------- |");
strcat(str[1],str[5]);
ShowPlayerDialog(playerid,dialog_stats,DIALOG_STYLE_MSGBOX,"Statistics",str[1],"OK","");
return 1;
}