14.01.2015, 23:37
On disconnect:
Which should save everything stored in this on disconnection:
It's not a problem with it saving, it's just giving the wrong banreason and bannedby as it seems..
pawn Код:
g_MysqlRaceCheck[playerid]++;
if(Player[playerid][IsLoggedIn] && Player[playerid][ID] > 0)
orm_save(Player[playerid][ORM_ID]); //if Player[playerid][ID] has a valid value, orm_save sends an UPDATE query, else an INSERT query
orm_destroy(Player[playerid][ORM_ID]);
pawn Код:
enum E_PLAYERS
{
ORM:ORM_ID,
ID,
Name[MAX_PLAYER_NAME],
Password[129],
Money,
Kills,
Deaths,
AdminLevel,
bool:IsLoggedIn,
bool:CanSellCar,
bool:IsRegistered,
LoginAttempts,
Banned,
BannedBy,
BanReason,
BanTime,
UnbanTime,
LoginTimer
};
new Player[MAX_PLAYERS][E_PLAYERS];