25.12.2013, 19:14
(
Last edited by Ryan_Bowe; 02/01/2015 at 01:59 PM.
)
....
stock MySQL_Save(playerid) {
GetPlayerIp(playerid, PlayerData[playerid][pIP], 50);
new query[3000];
format(query, sizeof(query), "UPDATE `playerdata` SET ip = '%s', adminlevel = '%d' WHERE username = '%s'",
GetPlayerIp(playerid,pIP,32),
PlayerData[playerid][pAdminLevel],
GetPlayerNameEx(playerid));
mysql_query(query);
return 1;
}
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;
}
public OnPlayerConnect(playerid)
{
GetPlayerIp(playerid, pInfo[playerid][pIP], 16);
}
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;
}
@ 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 |