MySQL Issue
#1

Why does AccLock get a random value? Not really random, so far it got 110, 98 and 97.

This is how I save AccLock it is somewhere at the end.
Код:
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `USERS` SET `Sex` = '%d', `Age` = '%d', `Pos_x` = '%f', `Pos_y` = '%f', `Pos_z` = '%f', `Skin` = '%d', `Job` = '%d', `AccLock` = '%d' WHERE `USERNAME` = '%e'"
		, PlayerInfo[playerid][pSex], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pAccLock], pName);
	    mysql_tquery(Database, DB_Query);
This is the enum
Код:
enum pInfo
{
	ID,
    pPass[65],
    Salt[11],
    PasswordFails,
    Kills,
    Score,
    Deaths,
    pCash,
    pAdmin,
    pSex,
    pAge,
   	Float:pPos_x,
	Float:pPos_y,
	Float:pPos_z,
	pSkin,
	pTeam,
	pAccent,
	Cache: Player_Cache,
	LoggedIn,
	pEmail,
	pAccLock
}
This is how I load it:
Код:
cache_get_value_int(0, "AccLock", PlayerInfo[playerid][pAccLock]);
This checks if the account is locked:
Код:
if(PlayerInfo[playerid][pAccLock] == 1)
 	{
 	    new string[80];
 	    SendClientMessage(playerid, COLOR_GREEN, "SERVER: This account is locked, visit the forum to unlock it!");
 	    SendClientMessage(playerid, COLOR_GREEN, "> xxxxxxx");
 	    SetTimerEx("KickPlayer",500,false,"i",playerid);
 	    format(string, sizeof(string), "WARNING: %s tried to log into a locked account.", RPName(playerid));
		SendAdminMessage(COLOR_YELLOW, string);
		LockLog(string);
	}
Reply


Messages In This Thread
MySQL Issue - by AndreiWow - 30.01.2017, 17:09
Re: MySQL Issue - by DaniceMcHarley - 30.01.2017, 17:15
Re: MySQL Issue - by Vince - 30.01.2017, 17:21
Re: MySQL Issue - by AndreiWow - 30.01.2017, 17:32
Re: MySQL Issue - by DaniceMcHarley - 30.01.2017, 17:49
Re: MySQL Issue - by AndreiWow - 30.01.2017, 17:52
Re: MySQL Issue - by princejeet1510 - 31.01.2017, 03:00
Respuesta: MySQL Issue - by Eloy - 31.01.2017, 03:29
Re: MySQL Issue - by azzerking - 31.01.2017, 03:59
Re: MySQL Issue - by AndreiWow - 31.01.2017, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)