10.03.2015, 05:02
First go to include script and find these lines :
Then remove DB:g_dbKeptAlive = INVALID_DB, line from above script and add the following line after the ";"
Now when you have done this run the query like this :
This code will set all players expire to -1 both online and offline players. But for changing the variable for online players in script you have to loop through all online player's enum and set it to -1.
Код:
private bool:g_bIsInitialized = false, g_szDatabaseName[BUD::MAX_DATABASE_NAME] = "bud.db", g_iColumnCount, g_szColumnName[BUD::MAX_COLUMNS][BUD::MAX_COLUMN_NAME], DB:g_dbKeptAlive = INVALID_DB, g_iKeepAlive = 2000, g_iKeepAliveTimer = -1, bool:g_bAsynchronous = true, g_iIntEntryDefault = 0, Float:g_fFloatEntryDefault = 0.0, g_iDatabaseOpenTimeOut = 3000, bool:g_bCheckForUpdates = true, g_szBuffer[BUD::BUFFER_SIZE] ;
Код:
global DB:g_dbKeptAlive = INVALID_DB;
Код:
db_query(g_dbKeptAlive, "UPDATE `players` SET `VIPExpire`= -1");