12.02.2013, 08:12
Hello,
My server is connecting to my corresponding MySQL server each time I restart my server from my host's control panel (a mass restart), however, when I restart my server via. rcon gmx, it never reloads the SQL.
It's a strange bug but I was wondering if anyone could help me with it. Here is my OnGameModeInit and OnGameModeExit parts of my code:
Defines.. (all the SQL_Host and blah blah below are filled in, in my game mode)
Cheers
My server is connecting to my corresponding MySQL server each time I restart my server from my host's control panel (a mass restart), however, when I restart my server via. rcon gmx, it never reloads the SQL.
It's a strange bug but I was wondering if anyone could help me with it. Here is my OnGameModeInit and OnGameModeExit parts of my code:
Код:
public OnGameModeInit() { mainconnection = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS); sqlconnection = mysql_connect(HOUSE_HOST, HOUSE_USER, HOUSE_NAME, HOUSE_PASSWORD); .....
Код:
//Server database #define SQL_HOST "N/A" // The SQL host that the game mode will connect to. #define SQL_USER "N/A" #define SQL_PASS "N/A" #define SQL_DB "N/A" #define HOUSE_TABLE_NAME "Houses" //House database #define HOUSE_HOST "N/A" #define HOUSE_USER "N/A" #define HOUSE_PASSWORD "N/A" #define HOUSE_NAME "N/A"
Код:
public OnGameModeExit() { for(new i=1; i < MAX_DVEHICLES; i++) { if(VehicleCreated[i]) { DestroyVehicle(VehicleID[i]); if(VehicleCreated[i] == VEHICLE_DEALERSHIP) { Delete3DTextLabel(VehicleLabel[i]); } } } for(new i=1; i < MAX_DEALERSHIPS; i++) { if(DealershipCreated[i]) { Delete3DTextLabel(DealershipLabel[i]); } } TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawHideForAll(Textdraw1); TextDrawDestroy(Textdraw1); FadeExit(); Delete3DTextLabel(Text3D:armysupplies); return 1; }