30.05.2010, 12:24
Hello again,
I have a little problem with my /stats command. I use dcmd for it and I want to change some things.
So, as you can see when I type /stats it shows me "You have died xy times and you have killed..." So in this way it is very confusing and I wanna change it in this way:
Kills: xy | Deaths; xy | Ratio: xy
For those guys who think I am to lazy to do it: I really donґt know how >.> I get errors and nothings results.
So, try to help
I have a little problem with my /stats command. I use dcmd for it and I want to change some things.
Код:
dcmd_stats(playerid, params[]) { new pName[24], PlayerFile[50], str[128], pDeaths[50], pKills[50]; GetPlayerName(playerid, pName, sizeof(pName)); format(PlayerFile, sizeof(PlayerFile), "/users/%s.ini", pName); if(!dini_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You aren't registered! Use /register to create an account."); if(dini_Exists(PlayerFile)) { pDeaths[24] = dini_Int(PlayerFile, "Deaths"); pKills[24] = dini_Int(PlayerFile, "Kills"); new Float:Ratio=floatdiv(pKills[24], pDeaths[24]); format(str, sizeof(str), "You have died %d times and killed somebody %d times. That makes your ratio %.2f .", pDeaths[24], pKills[24], Ratio); SendClientMessage(playerid, COLOR_WHITE, str); if(PlayerInfo[playerid][AdminLevel] == 0) { SendClientMessage(playerid, COLOR_WHITE, "You are a player on the server."); } if(PlayerInfo[playerid][AdminLevel] == 1) { SendClientMessage(playerid, COLOR_WHITE, "You are a moderator on the server."); } if(PlayerInfo[playerid][AdminLevel] == 2) { SendClientMessage(playerid, COLOR_WHITE, "You are an administrator on the server."); } if(PlayerInfo[playerid][AdminLevel] == 3) { SendClientMessage(playerid, COLOR_WHITE, "You are a management member on the server."); } } #pragma unused params return 1; }
Kills: xy | Deaths; xy | Ratio: xy
For those guys who think I am to lazy to do it: I really donґt know how >.> I get errors and nothings results.
So, try to help