30.10.2010, 23:12
Hi there,
I am currently developing my TF2 server as you can see in my signature, and it's MySQL. The problem here is that when I leave, or 'update' my account with my function, my field 'ip' changes to 0.
Here is my function:
And the logs say that it correctly queries my IP (or local).
But when I check in the table, our ip's are 0.
I am currently developing my TF2 server as you can see in my signature, and it's MySQL. The problem here is that when I leave, or 'update' my account with my function, my field 'ip' changes to 0.
Here is my function:
pawn Код:
function SavePlayerAccount(playerid)
{
new ip2[24];
GetPlayerIp(playerid, ip2, 24);
format(str, sizeof(str), "UPDATE `playerinfo` SET `ip` = '%s' AND `admin` = %d WHERE `user` = '%s'", ip2, pInfo[playerid][Admin], pName(playerid));
mysql_query(str);
printf("%s has just updated their account!", pName(playerid));
return 1;
}
But when I check in the table, our ip's are 0.