Add disconnect reasons to utils

This commit is contained in:
Vortrex
2020-12-27 21:29:02 -06:00
parent a11062e079
commit e2d2aac6ad

View File

@@ -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)
});
}
}
// ----------------------------------------------------------------------------
function resetClientStuff(client) {
if(isClientOnJobRoute(client)) {
stopJobRoute(client);
}
if(getClientData(client).rentingVehicle) {
stopRentingVehicle(client);
}
getClientData(client).lastVehicle = null;
}
// ----------------------------------------------------------------------------