Help with dini
#1

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?
Reply
#2

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.
Reply
#3

Erm sir , i want to get the player ip while he is offline , anyways thanks i'll try
Reply
#4

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.
Reply
#5

Yes that's it thanks bro
RP++
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)