Mysql ip login
#7

just update the IP in the mysql db when a player logs in (not on auto-login ofc)...

So the next time he enters with the same IP as he had on his last login, he gets logged in automatically << the actual idea of auto-login..

So just add a
pawn Код:
new ip[25], string[200], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerIp(playerid, ip, sizeof(ip));
format(string, sizeof(string), "UPDATE `tablename` SET `ip`='%s' WHERE `name`='%s'", ip, name);
mysql_query(string);
Reply


Messages In This Thread
Mysql ip login - by TheBluec0de - 06.11.2011, 20:51
Re: Mysql ip login - by Pinguinn - 06.11.2011, 20:55
Re: Mysql ip login - by TheBluec0de - 06.11.2011, 20:57
Re: Mysql ip login - by Pinguinn - 06.11.2011, 20:59
Re: Mysql ip login - by Sascha - 06.11.2011, 21:02
Re: Mysql ip login - by TheBluec0de - 06.11.2011, 21:06
Re: Mysql ip login - by Sascha - 06.11.2011, 21:11
Re: Mysql ip login - by TheBluec0de - 06.11.2011, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)