problem with ip address. - 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 ip address. (
/showthread.php?tid=279703)
problem with ip address. -
budelis - 28.08.2011
Hi all.Now i have problem with my ip address.The problem is here:
Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
dini_Set(pFiles, "IP address", pIP);
}
return 1;
}
Here when player register,then he get ip save,but ip don't save in player files:
Код:
IP address=(and here is nothing,no ip address.)
Re: problem with ip address. -
linuxthefish - 28.08.2011
pIP is to small!
Re: problem with ip address. -
Kaperstone - 28.08.2011
Quote:
Originally Posted by budelis
Hi all.Now i have problem with my ip address.The problem is here:
pawn Код:
new pFiles[ 40 ]; if(dialogid == 0) { if(response) { format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid)); dini_Create(pFiles); new pIP[16]; GetPlayerIp(playerid, pIP, sizeof(pIP)); dini_Set(pFiles, "IP address", pIP); } return 1; }
Here when player register,then he get ip save,but ip don't save in player files:
Код:
IP address=(and here is nothing,no ip address.)
|
250.250.250.250
123.456.789.123
13+3(dots) = 16

(its not too small..)
try : dini_IntSet(pFiles, "IP address", pIP);
(i dont have so big knowladge in dini..)
if it will not work too,than try :
pawn Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
dini_IntSet(pFiles, "IP address", pIP);
}
return 1;
}
or:
pawn Код:
new pFiles[ 40 ];
if(dialogid == 0)
{
if(response)
{
new pIP[16];
GetPlayerIp(playerid, pIP, sizeof(pIP));
format(pFiles, sizeof(pFiles), "saves/user/%s.ini", PlayerName(playerid));
dini_Create(pFiles);
dini_Set(pFiles, "IP address", pIP);
}
return 1;
}