Problem with YINI
#1

Problem:: When you load a player who is offline get his stats.
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;
}
Reply
#2

You need to go through this first
https://sampforum.blast.hk/showthread.php?tid=574754

INI_ParseFile will call LoadUser_%s function, is your LoadUser actually loading the data?
Reply
#3

Quote:
Originally Posted by Yashas
View Post
You need to go through this first
https://sampforum.blast.hk/showthread.php?tid=574754

INI_ParseFile will call LoadUser_%s function, is your LoadUser actually loading the data?
Yes.
Reply
#4

REFRESH
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)