MySQL IP not saving correctly
#11

pawn Code:
public OnPlayerConnect(playerid)
{
        GetPlayerIp(playerid, pInfo[playerid][pIP], 16);
}
Then save it.

pawn Code:
stock MySQL_Save(playerid)
{    
new query[3000];    format(query, sizeof(query), "UPDATE `playerdata` SET ip = '%s', adminlevel = '%d' WHERE username = '%s'",  
pInfo[playerid][pIP],
PlayerData[playerid][pAdminLevel],    
GetPlayerNameEx(playerid));    
mysql_query(query);  
 return 1;
}
Make sure you define the IP Variable.

EDIT:

Why is your query 3000?
Reply


Messages In This Thread
.... - by Ryan_Bowe - 25.12.2013, 19:14
Re: MySQL IP not saving correctly - by Aprezt - 25.12.2013, 19:18
Re: MySQL IP not saving correctly - by Ryan_Bowe - 25.12.2013, 19:19
Re : MySQL IP not saving correctly - by [HRD]Mar1 - 25.12.2013, 19:23
Re: MySQL IP not saving correctly - by Ryan_Bowe - 25.12.2013, 19:23
Re : Re: MySQL IP not saving correctly - by [HRD]Mar1 - 25.12.2013, 19:28
Re: Re : MySQL IP not saving correctly - by Ryan_Bowe - 25.12.2013, 19:30
Re : Re: Re : MySQL IP not saving correctly - by [HRD]Mar1 - 25.12.2013, 19:35
Re: MySQL IP not saving correctly - by SilentSoul - 25.12.2013, 19:37
Re: MySQL IP not saving correctly - by HardRock - 25.12.2013, 19:38
Re: MySQL IP not saving correctly - by Keyhead - 25.12.2013, 19:42
Re : Re: MySQL IP not saving correctly - by [HRD]Mar1 - 25.12.2013, 19:51
Re: MySQL IP not saving correctly - by SilentSoul - 25.12.2013, 19:56

Forum Jump:


Users browsing this thread: 2 Guest(s)