Add disconnect reasons to utils
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user