diff --git a/scripts/server/native/connected.js b/scripts/server/native/connected.js index 02da8ee1..d8d669e5 100644 --- a/scripts/server/native/connected.js +++ b/scripts/server/native/connected.js @@ -7,6 +7,25 @@ // TYPE: Server (JavaScript) // =========================================================================== +class vPlayer { + constructor(id, name = "", object = null) { + object: null; + name: null; + id: -1; + } +} + +// =========================================================================== + +class vVehicle { + constructor(id, object = null) { + object: null; + id: -1; + } +} + +// =========================================================================== + let builtInCommands = [ "refresh", "restart", @@ -827,7 +846,7 @@ function connectToDatabase() { if (getDatabaseConfig().usePersistentConnection) { if (persistentDatabaseConnection == null) { logToConsole(LOG_DEBUG, `[V.RP.Database] Initializing database connection ...`); - persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); + persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port, getDatabaseConfig().useSSL); if (persistentDatabaseConnection.error) { logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); persistentDatabaseConnection = null; @@ -841,7 +860,7 @@ function connectToDatabase() { return persistentDatabaseConnection; } } else { - let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); + let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port, getDatabaseConfig().useSSL); if (databaseConnection.error) { logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); return false; diff --git a/scripts/server/native/ragemp.js b/scripts/server/native/ragemp.js index 33b2b84d..8faa0621 100644 --- a/scripts/server/native/ragemp.js +++ b/scripts/server/native/ragemp.js @@ -7,6 +7,26 @@ // TYPE: Server (JavaScript) // =========================================================================== +class vPlayer { + constructor(id, name = "", object = null) { + object: null; + name: null; + id: -1; + } +} + +// =========================================================================== + +class vVehicle { + constructor(id, object = null) { + object: null; + id: -1; + } +} + +// =========================================================================== + +// Needs updated for RAGEMP let builtInCommands = [ "refresh", "restart", @@ -743,7 +763,7 @@ function connectToDatabase() { if (getDatabaseConfig().usePersistentConnection) { if (persistentDatabaseConnection == null) { logToConsole(LOG_DEBUG, `[V.RP.Database] Initializing database connection ...`); - persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); + persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port, getDatabaseConfig().useSSL); if (persistentDatabaseConnection.error) { logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); persistentDatabaseConnection = null; @@ -757,7 +777,7 @@ function connectToDatabase() { return persistentDatabaseConnection; } } else { - let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port); + let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port, getDatabaseConfig().useSSL); if (databaseConnection.error) { logToConsole(LOG_ERROR, `[V.RP.Database] Database connection error: ${persistentDatabaseConnection.error}`); return false;