25.12.2013, 19:37
How did you insert the ip in your database ? if you insert it as 'int' change to `ip` varchar(16) NOT NULL
@ Originally Posted by [HRD]Mar1 View Post
Use GetPlayerIp(playerid, ip, 50); Directly
No that's wrong the ip can't exceed 16 letters. https://sampwiki.blast.hk/wiki/GetPlayerIp
EDIT:
@ Originally Posted by [HRD]Mar1 View Post
Use GetPlayerIp(playerid, ip, 50); Directly
No that's wrong the ip can't exceed 16 letters. https://sampwiki.blast.hk/wiki/GetPlayerIp
EDIT:
pawn Code:
stock MySQL_Save(playerid) {
new query[200],pIP[16];//query size too much and you check for small variables.
format(query, sizeof(query), "UPDATE `playerdata` SET ip = '%s', adminlevel = '%d' WHERE username = '%s'",
GetPlayerIp(playerid,pIP,16),
PlayerData[playerid][pAdminLevel],
GetPlayerNameEx(playerid));
mysql_query(query);
return 1;
}