14.06.2015, 13:34
Problem:: When you load a player who is offline get his stats.
Part:
Part:
pawn Code:
stock ShowPlayer(playerid,targetname[])
{
new path[150],string[500], id;
new dani, god, mje;
getdate(god, mje, dani);
format(path,sizeof(path),"Players/%s.ini",targetname);
INI_ParseFile(path, "LoadUser_%s", .bExtra = true, .extra = id);
if(PlayerInfo[id][BanMjesec] > 99)
{
format(string,sizeof(string),"{00FFFF}Admin bana:\t\t{ff0000}%s\n{00FFFF}Razlog bana:\t\t{ff0000}%s\n{00FFFF}Datum unbana:\t\t{ff0000}Nikad\n\n{FFFF00}Pritisnite na tipku 'Obrisi ban' da unbanate igraca.",PlayerInfo[id][AdminBana],PlayerInfo[id][RazlogBana]);
}
else
{
format(string,sizeof(string),"{00FFFF}Admin bana:\t\t{ff0000}%s\n{00FFFF}Razlog bana:\t\t{ff0000}%s\n{00FFFF}Datum unbana:\t\t{ff0000}%d.%d.%d.\n\nPritisnite na tipku 'Obrisi ban' da unbanate igraca.",PlayerInfo[id][AdminBana],PlayerInfo[id][RazlogBana],PlayerInfo[id][BanDan], mje, god);
}
format(Igrac[playerid],MAX_PLAYER_NAME,"%s",targetname);
ShowPlayerDialog(playerid, DIALOG_BANS4, DIALOG_STYLE_MSGBOX,targetname,string, "Obrisi ban", "Uredu");
return 1;
}