07.01.2018, 23:22
So everything is okay with the data in game, i tested it with stats command, Also updates when i manually change it from the database, but just when i change something ingame and relog, its gone.
On player disconnect.
On player disconnect.
Код:
Corrupt_Check[playerid]++; new DB_Query[550]; mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `accounts` SET `Level` = %d, `VIP` = %d, `KILLS` = %d, `DEATHS` = %d, `BANNED` = %d WHERE `ID` = %d LIMIT 1", PlayerInfo[playerid][Level], PlayerInfo[playerid][VIP], PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], PlayerInfo[playerid][Banned], PlayerInfo[playerid][ID]); mysql_tquery(Database, DB_Query); if(cache_is_valid(PlayerInfo[playerid][Player_Cache])) { cache_delete(PlayerInfo[playerid][Player_Cache]); PlayerInfo[playerid][Player_Cache] = MYSQL_INVALID_CACHE; }