22.11.2014, 00:31
pawn Code:
CMD:stats(playerid, params[])
{
if(!PlayerAcc[playerid][Log]) return SendClientMessage(playerid, COLOR_ORANGE, "You are not logged in, please login first.");
new coordsstring[290], statsstring[144], h, m, s, admin = PlayerAcc[playerid][Admin],
warn = PlayerAcc[playerid][Warn], skin = PlayerAcc[playerid][SaveSkin],
score = GetPlayerScore(playerid), money = GetPlayerMoney(playerid), arank[18],
kill = PlayerAcc[playerid][Kills], death = PlayerAcc[playerid][Deaths];
TotalGameTime(playerid, h, m, s);
switch(admin)
{
case 3: arank = "Tester";
case 4: arank = "CO Moderator";
case 5: arank = "Moderator";
case 6: arank = "CO Administrator";
case 7: arank = "Administrator";
case 8: arank = "Head Admin";
case 9: arank = "Manager";
case 10: arank = "Owner";
default: arank = "Unknown";
}
format(statsstring, sizeof(statsstring), "* Admin: [%i - %s]\n* Warning: [%i/%i] | Score: [%i] | Money: [$%i] | Kills: [%d] | Deaths: [%d]", admin, arank, warn, MAX_WARNINGS, score, money, kill, death);
format(coordsstring, sizeof(coordsstring), "\n* SaveSkin: [%i] | Ratio: [%0.2f] | Location: [%s] | Hours: [%i] | Minutes: [%i] | Seconds: [%i]", skin, (kill / death), MAX_WARNINGS, /*Location*/, h, m, s);
strcat(statsstring, coordsstring);
ShowPlayerDialog(playerid, 5234, DIALOG_STYLE_MSGBOX, "Your stats:", statsstring, "Ok", "");
return 1;
}
Also, you are missing a 'location' parameter in this string:
pawn Code:
\n* SaveSkin: [%i] | Ratio: [%0.2f] | Location: [%s] Hours: [%i] | Minutes: [%i] | Seconds: [%i]