SA-MP Forums Archive
Problem with registred IP saving. :) - 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 registred IP saving. :) (/showthread.php?tid=549922)



Problem with registred IP saving. :) - TiXz0r - 09.12.2014

Код:
    new plrIP[16];
    GetPlayerIp(playerid,plrIP, sizeof(plrIP));
    rInfo[playerid][rIP] = plrIP;
Код:
 error 006: must be assigned to an array
i want to make when player making accaount, to save in .ini file registring ip


Re: Problem with registred IP saving. :) - HY - 09.12.2014

Create new enums:

pawn Код:
enum iInfo
{
    IP
}
new IpInfo[MAX_PLAYERS][iInfo];
Then save his IP:

pawn Код:
new IPP[20];
GetPlayerIp(playerid, IPP, sizeof(IPP));
IpInfo[playerid][IP] = IP;
Save and Load him like a file. Put under LoadUser_%s, under OnPlayerDisconnect, etc.


Re: Problem with registred IP saving. :) - TiXz0r - 09.12.2014

Код:
error 006: must be assigned to an array
Код:
IpInfo[playerid][IP] = IP;



Re: Problem with registred IP saving. :) - Schneider - 09.12.2014

pawn Код:
GetPlayerIp(playerid, rInfo[playerid][rIP] , 16);
Be aware: GetPlayerIp does not work @ OnPlayerDisconnect. It will return Invalid_ip


Re: Problem with registred IP saving. :) - TiXz0r - 09.12.2014

This is on when player registred


Re: Problem with registred IP saving. :) - Schneider - 09.12.2014

Good!


Re: Problem with registred IP saving. :) - TiXz0r - 09.12.2014

thanks bro