06.01.2016, 10:05
Hello i working at a admin script and i remade the stats and now it's not working when i go in game and i type /stats it doesn't work and when i compile no error.
Here's the code.
And ignore the second part of the stats.
Command: /stats
And the Function ShowStats.
Here's the code.
And ignore the second part of the stats.
Command: /stats
Quote:
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", ""); } |
Quote:
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; } |