25.04.2016, 21:42
(
Last edited by Unte99; 26/04/2016 at 04:20 AM.
)
I finally updated my gamemode from R5 to R39-5. Was not that easy. I am still having hard time understanding how the latest version works. But there is one thing that I do not understand. When the server starts loading house data from the mysql server it takes ~10 seconds to load up the data and after that the server fully starts. Could there be something wrong with the code? This is an idea of what the code looks like:
EDIT: Nevermind. Everything is working perfectly now. A BIG tip: don't log everything
Code:
forward LoadHouseInfo(); OnGameModeInit { for(new i; i<27; i++) { mysql_format(...); // format the query mysql_tquery(...); // send the query to a forwarded function for(new j; j<20; j++) { mysql_format(...); // format the query mysql_tquery(...); // send the query to a forwarded function } } } public LoadHouseInfo() { // Load house data here if(rows==27) { HouseCreationFunction(0,...); HouseCreationFunction(1,...); HouseCreationFunction(2,...); HouseCreationFunction(3,...); // ... } } HouseCreationFunction() { }