21.11.2014, 23:53
Hi Everyone,
I tried to make a /stats command in dialog. I type /stats ingame and I see the dialog but I dont see the stats I see weird icons and its bugging like hell, whats wrong with it?
This is the /stats command in pawn.
Almost ty
I tried to make a /stats command in dialog. I type /stats ingame and I see the dialog but I dont see the stats I see weird icons and its bugging like hell, whats wrong with it?
This is the /stats command in pawn.
Almost ty
pawn Code:
CMD:stats(playerid, params[])
{
new coordsstring[128], statsstring[1024];
new id;
if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "You are not logged in, please login first.");
id = playerid;
new h, m, s,
admin = PlayerAcc[id][Admin],
warn = PlayerAcc[id][Warn],
skin = PlayerAcc[id][SaveSkin],
score = GetPlayerScore(id),
money = GetPlayerMoney(id),
kill = PlayerAcc[id][Kills],
death = PlayerAcc[id][Deaths];
TotalGameTime(id, h, m, s);
switch(admin)
{
case 3: AdminRank = "Tester";
case 4: AdminRank = "CO Moderator";
case 5: AdminRank = "Moderator";
case 6: AdminRank = "CO Administrator";
case 7: AdminRank = "Administrator";
case 8: AdminRank = "Head Admin";
case 9: AdminRank = "Manager";
case 10: AdminRank = "Owner";
}
format(coordsstring, sizeof(coordsstring),"* Admin: [%i - %s]", AdminRank, admin, Admin2);
strcat(statsstring,coordsstring);
format(coordsstring, sizeof(coordsstring),"\n* Warning: [%i/%i] | Score: [%i] Money: [$%i] | Kills: [%d] | Deaths: [%d]", warn, MAX_WARNINGS, score, money, kill, death);
strcat(statsstring,coordsstring);
format(coordsstring, sizeof(coordsstring),"\n* SaveSkin: [%i] | Ratio: [%0.2f] | Location: [%s] Hours: [%i] | Minutes: [%i] | Seconds: [%i]", skin, Float:kill/Float:death, h, m, s);
strcat(statsstring,coordsstring);
//--
ShowPlayerDialog(playerid, 5234, DIALOG_STYLE_MSGBOX, "Your stats:", statsstring, "Ok", "");
//
return 1;
}