Stats dialog
#1

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 ErrorMessages(playerid,2);
        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;
}
when in press /stats 0 it says unkown cmd
Reply


Messages In This Thread
Stats dialog - by vassilis - 04.04.2014, 11:29
Re: Stats dialog - by ChandraLouis - 04.04.2014, 11:34
Re: Stats dialog - by vassilis - 04.04.2014, 11:35
Re: Stats dialog - by ChandraLouis - 04.04.2014, 11:37
Re: Stats dialog - by vassilis - 04.04.2014, 11:41
Re: Stats dialog - by ChandraLouis - 04.04.2014, 11:48
Re: Stats dialog - by vassilis - 04.04.2014, 11:49
Re: Stats dialog - by EiresJason - 04.04.2014, 11:55
Re: Stats dialog - by biker122 - 04.04.2014, 11:56
Re: Stats dialog - by vassilis - 04.04.2014, 11:58

Forum Jump:


Users browsing this thread: 2 Guest(s)