Help with dini - 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: Help with dini (
/showthread.php?tid=374012)
Help with dini -
CoDeZ - 01.09.2012
Ehm hello , i got a fast question
let's say i got this file :
CoDeZ.ini
and inside it there is
Код:
Kill=1
Death=0
IP=127.0.0.1
how do i fetch the ip from inside this file and store it into a variable?
Re: Help with dini -
Cjgogo - 01.09.2012
Considering the fact that there's a dot in the IP's structure(obviusly,there's a dot in every IP's structure),you could try dini_SetString,yet I am not sure if it'll work.Alternatively you can use GetPlayerIP,wich would be easier :P.Or just save the IP as different coordinates,1,2,3 and 4th(127,0,0,1).Use a string formated as:%d.%d.%d.%d,and use dini_Int.
Re: Help with dini -
CoDeZ - 01.09.2012
Erm sir , i want to get the player ip while he is offline , anyways thanks i'll try
Re: Help with dini -
Kirollos - 01.09.2012
pawn Код:
new pip[30], file[100];
format(file, sizeof(file), "%s.ini", THE_PLAYER_NAME);
format(pip, sizeof(pip), "%s", dini_Get(file, "IP");
printf("the ip is %s", pip);
i think that's like what you want.
Re: Help with dini -
CoDeZ - 01.09.2012
Yes that's it thanks bro

RP++