use scriptinit for database

This commit is contained in:
Lorenc Pekaj 2018-09-11 03:19:21 +10:00
parent ef25eb8112
commit 896302c2be

View File

@ -34,7 +34,7 @@ stock dbHandle;
stock bool: serverLocked = false; stock bool: serverLocked = false;
/* ** Variables ** */ /* ** Variables ** */
hook OnGameModeInit( ) hook OnScriptInit( )
{ {
// Attempt to connect to database // Attempt to connect to database
if ( mysql_errno( ( dbHandle = mysql_connect( MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASS ) ) ) ) { if ( mysql_errno( ( dbHandle = mysql_connect( MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASS ) ) ) ) {