SA-MP Forums Archive
Problem with YINI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with YINI (/showthread.php?tid=577826)



Problem with YINI - DoMiNiK1310 - 14.06.2015

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;
}



Re: Problem with YINI - Yashas - 14.06.2015

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?


Re: Problem with YINI - DoMiNiK1310 - 15.06.2015

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.


Re: Problem with YINI - DoMiNiK1310 - 16.06.2015

REFRESH