diff --git a/scripts/server/utilities.js b/scripts/server/utilities.js index a558c4af..173f0961 100644 --- a/scripts/server/utilities.js +++ b/scripts/server/utilities.js @@ -8,6 +8,20 @@ // TYPE: Server (JavaScript) // =========================================================================== +let disconnectReasons = [ + "Lost Connection", + "Disconnected", + "Unsupported Client", + "Wrong Game", + "Incorrect Password", + "Unsupported Executable", + "Disconnected", + "Banned", + "Failed", + "Invalid Name", + "Crashed" +]; + // --------------------------------------------------------------------------- let policeStations = [ @@ -1770,4 +1784,21 @@ async function waitUntil(condition) { resolve(); }, 1) }); -} \ No newline at end of file +} + +// ---------------------------------------------------------------------------- + +function resetClientStuff(client) { + if(isClientOnJobRoute(client)) { + stopJobRoute(client); + } + + if(getClientData(client).rentingVehicle) { + stopRentingVehicle(client); + } + + getClientData(client).lastVehicle = null; +} + +// ---------------------------------------------------------------------------- +