17.02.2014, 17:14
Quote:
You don't need to use inline functions, I just used them to keep example small. Normal mysql_(t/p)query is enough. And nobody said it won't be complex, it just massively improves your server boot time.
|
But they use callbacks and OnFilterScriptInit is finished before any of the queries are processed.
The callbacks are called after the server is online already.
I guess I'll just go for the mysql_query example you provided, to load data sequentially.
Some data must be loaded sequentially after all.
I'm loading vehicle-info, this holds all data related to maxfuel settings, fuel consumption and refuel times per vehicle-model.
This must be loaded before any vehicle is loaded, otherwise the fuel settings are messed up, causing the fuel textdraw to stay hidden (empty text).
I don't really care if the server needs only 5 seconds to boot, or 20 seconds.
My MMORPG server I had years ago took about 2 minutes to boot.
After all, a server is normally started once and should stay online for days or weeks, or even months.
Those 20 seconds won't matter that much.