BUD (editing variable for whole offline players)
#9

First go to include script and find these lines :
Код:
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]
;
Then remove DB:g_dbKeptAlive = INVALID_DB, line from above script and add the following line after the ";"
Код:
global DB:g_dbKeptAlive = INVALID_DB;
Now when you have done this run the query like this :
Код:
db_query(g_dbKeptAlive, "UPDATE `players` SET `VIPExpire`= -1");
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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)