SA-MP Forums Archive
INI_WriteStringEx - 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: INI_WriteStringEx (/showthread.php?tid=343891)



INI_WriteStringEx - Twisted_Insane - 19.05.2012

I'm tryin' to do this:

pawn Код:
format(string, sizeof string, "%d|%d|%d|%s|%s|Banned by *SYSTEM* for %s", day, month, year, ip, giveplayer, reason);
INI_WriteStringEx("LuxAdmin/Config/TempBans.ban", ip, string);
But this function isn't declared, as I thought it is! So what shall I do now; how to declare it? Or if not, how could I use the same just with INI_"WriteString"?


Re: INI_WriteStringEx - HDFord - 19.05.2012

pawn Код:
format(string, sizeof string, "%d|%d|%d|%s|%s|Banned by *SYSTEM* for %s", day, month, year, GetPlayerIP(playerid), giveplayer, reason);
INI_WriteString("LuxAdmin/Config/TempBans.ban", string);
The format does everything for you if you just make it right.


Re: INI_WriteStringEx - Twisted_Insane - 19.05.2012

Thanks, good way, but now I'm gettin' this error:

pawn Код:
error 017: undefined symbol "GetPlayerIP"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
At the line with "GetPlayerIP"...


Re: INI_WriteStringEx - fordawinzz - 19.05.2012

pawn Код:
stock GetPlayerIP(playerid)
{
    new szLen[16];
    GetPlayerIp(playerid, szLen, sizeof szLen);
    return szLen;
}
because the native function is GetPlayerIp.


Re: INI_WriteStringEx - Twisted_Insane - 19.05.2012

Thanks guys, shit's workin' now, I gave y'all reputation...