Registry help?
#4

Place this in the register command

Код:
new IP[16];
GetPlayerIp(playerid,IP,sizeof(IP));
dini_IntSet(file,"PlayerIP",IP);
This saves the players IP in the dini


under onplayerconnect

Код:
//Make sure it has checked if it has checked if the file exists at this point
new IP[16],IP2[16];
GetPlayerIP(playerid,IP,sizeof(ip));
IP2 = dini_Int(file,"PlayerIP");
if(IP == IP2)
{
//Add the auto login stuff here from before
return 1;
}
else return SendClientMessage(playerid,0xFFFFFF,"You have already registered an account. But IP did not match! Please login");
}
Now i would recommend changing IP at login if case the player got a new PC or moved or any other reason he got a new IP. Use the same as in the register command for this
Reply


Messages In This Thread
Registry help? - by -Rebel Son- - 04.03.2010, 16:23
Re: Registry help? - by Desert - 04.03.2010, 16:56
Re: Registry help? - by -Rebel Son- - 04.03.2010, 17:46
Re: Registry help? - by Desert - 04.03.2010, 18:10
Re: Registry help? - by -Rebel Son- - 04.03.2010, 18:18
Re: Registry help? - by -Rebel Son- - 04.03.2010, 19:15
Re: Registry help? - by Desert - 04.03.2010, 19:19
Re: Registry help? - by -Rebel Son- - 04.03.2010, 19:26
Re: Registry help? - by -Rebel Son- - 09.03.2010, 01:51

Forum Jump:


Users browsing this thread: 4 Guest(s)