06.11.2011, 21:11
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
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);