Mysql close in r38
#1

Hi,

When i do mysql close, can i do that?

mysql_close();
SendRconCommand("exit");

I meen sendrconcommand("exit).
Reply
#2

If you're asking to close the MySQL connection when the gamemode is exiting, then you can do this by using the OnGameModeExit() callback, which also calls when the server is shutting down.

pawn Код:
public OnGameModeExit() {
    mysql_close();
    return 1;
}
Make sure you use the handle for mysql_close if you use mysql_connect more than once.
Reply
#3

No.. I mean can i close mysql connection, and then exit from gm, does mysql will be closed? i give codes in first post..
Reply
#4

UP TRHRAD
Reply
#5

Whatever you put in OnGameModeExit() will be called before the gamemode shuts down. So yes, the connection wil be closed.
Reply
#6

Quote:
Originally Posted by audriuxxx
Посмотреть сообщение
No.. I mean can i close mysql connection, and then exit from gm, does mysql will be closed? i give codes in first post..
As I said, OnGameModeExit is a callback. It is called when the gamemode exits, so basically anything you add there will execute as soon as the gamemode is exiting.

http://www.computerhope.com/jargon/e/event.htm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)