Different method for removing players from veh
This commit is contained in:
@@ -1874,9 +1874,14 @@ function getVehicleTrunkPosition(vehicle) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function removeAllOccupantsFromVehicle(vehicle) {
|
function removeAllOccupantsFromVehicle(vehicle) {
|
||||||
for (let i = 0; i <= 16; i++) {
|
let clients = getClients();
|
||||||
if (vehicle.getOccupant(i) != null) {
|
for (let i in clients) {
|
||||||
removePlayerFromVehicle(vehicle.getOccupant(i));
|
if (clients[i].player != null) {
|
||||||
|
if (clients[i].player.vehicle != null) {
|
||||||
|
if (clients[i].player.vehicle == vehicle) {
|
||||||
|
removePlayerFromVehicle(clients[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user