CMDtats(playerid, params[]) { if(!sscanf(params, "u", giveid)) { if(IsPlayerConnected(giveid)) { ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX, "{D1D1D1}Player Stats", ShowStats(giveid), "Ok", ""); return 1; } else return SendClientMessage(playerid, red, "ERROR: Player not connected!"); } else return ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "{D1D1D1}Player Stats", ShowStats(playerid), "Ok", ""); } |
stock ShowStats(playerid) { //Killer Rank's new KRank[29]; if(PlayerInfo[playerid][Kills] < 100) KRank = "Begginer"; else if(PlayerInfo[playerid][Kills] >= 100 && PlayerInfo[playerid][Kills] < 250) { KRank = "Recruit"; } else if(PlayerInfo[playerid][Kills] >= 250 && PlayerInfo[playerid][Kills] < 400) { KRank = "Thug"; } else if(PlayerInfo[playerid][Kills] >= 400 && PlayerInfo[playerid][Kills] < 700) { KRank = "No Heart"; } else if(PlayerInfo[playerid][Kills] >= 700 && PlayerInfo[playerid][Kills] < 1000) { KRank = "Savage"; } else if(PlayerInfo[playerid][Kills] >= 1000 && PlayerInfo[playerid][Kills] < 1500) { KRank = "Beast"; } else if(PlayerInfo[playerid][Kills] >= 1500 && PlayerInfo[playerid][Kills] < 3000) { KRank = "Murderer"; } else if(PlayerInfo[playerid][Kills] >= 3000) { KRank = "Hitman"; } //================================================== ============================ new ADMIN[166]; if(PlayerInfo[playerid][Level] > 1) { ADMIN = "Yes"; } else if(PlayerInfo[playerid][Level] < 10000) { ADMIN = "No"; } //================================================== ============================ new statstr[700],statstrbig[4000],playername[24]; GetPlayerName(playerid, playername, sizeof(playername)); //Stats First Part format(statstr, 700, "{FF0000}%s's {CBC8C8}Stats\n\n\ Kills:{FF0000} %d\n\ {CBC8C8}Killer Rank:{FF0000} %s\n\ {CBC8C8}Deaths:{FF0000} %d\n\ {CBC8C8}Ratio:{FF0000} %0.2f\n\ {CBC8C8}Money:{FF0000} $%d\n\ {CBC8C8}Admin:{FF0000} %s {CBC8C8}- Level:{FF0000} %d", playername, PlayerInfo[playerid][Kills],KRank, PlayerInfo[playerid][Deaths], Float:PlayerInfo[playerid][Deaths]/Float:PlayerInfo[playerid][Deaths], GetPlayerMoney(playerid),ADMIN,PlayerInfo[playerid][Level]); //Stats Second Part /*format(statstr[1], 700, "\n\n\ Kills:{FF0000} %d\n\ {CBC8C8}Deaths:{FF0000} %d\n\ {CBC8C8}Ratio:{FF0000} %0.2f\n\ {CBC8C8}Money:{FF0000} $%d\n\ {CBC8C8}Admin:{FF0000} %s {CBC8C8}- Level:{FF0000} %d", playername, PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], Float:PlayerInfo[playerid][Deaths]/Float:PlayerInfo[playerid][Deaths], GetPlayerMoney(playerid),ADMIN,PlayerInfo[playerid][Level]);*/ //================================================== ============================ //format(statstrbig, 4000, "%s", statstr[0]); return statstr; } |
CMD:stats(playerid, params[]) { new giveid; if(!sscanf(params, "u", giveid)) { if(IsPlayerConnected(giveid)) { ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX, "{D1D1D1}Player Stats", ShowStats(giveid), "Ok", ""); } else { SendClientMessage(playerid, red, "ERROR: Player not connected!"); } } else { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "{D1D1D1}Player Stats", ShowStats(playerid), "Ok", ""); } return 1; }
Float:PlayerInfo[playerid][Deaths]/Float:PlayerInfo[playerid][Deaths],
PlayerInfo[playerid][Kills]/PlayerInfo[playerid][Deaths],
if(PlayerInfo[playerid][Kills] < 100){ format(KRank,sizeof(KRank),"Begginer"); } else if(PlayerInfo[playerid][Kills] >= 100 && PlayerInfo[playerid][Kills] < 250) { format(KRank,sizeof(KRank),"Recruit"); } else if(PlayerInfo[playerid][Kills] >= 250 && PlayerInfo[playerid][Kills] < 400) { format(KRank,sizeof(KRank),"Thug"); } else if(PlayerInfo[playerid][Kills] >= 400 && PlayerInfo[playerid][Kills] < 700) { format(KRank,sizeof(KRank),"No Heart"); } else if(PlayerInfo[playerid][Kills] >= 700 && PlayerInfo[playerid][Kills] < 1000) { format(KRank,sizeof(KRank),"Savage"); } else if(PlayerInfo[playerid][Kills] >= 1000 && PlayerInfo[playerid][Kills] < 1500) { format(KRank,sizeof(KRank),"Beast"); } else if(PlayerInfo[playerid][Kills] >= 1500 && PlayerInfo[playerid][Kills] < 3000) { format(KRank,sizeof(KRank),"Murderer"); } else if(PlayerInfo[playerid][Kills] >= 3000) { format(KRank,sizeof(KRank),"Hitman"); } //================================================== ============================ new ADMIN[3]; if(PlayerInfo[playerid][Level] > 1) { format(ADMIN,sizeof(ADMIN),"Yes"); } else if(PlayerInfo[playerid][Level] < 10000) { format(ADMIN,sizeof(ADMIN),"No"); }