Add utils to remove all players from biz/house/vehs
This commit is contained in:
@@ -483,7 +483,28 @@ function updateAllPlayerWeaponDamageStates() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function removeAllPlayersFromProperties() {
|
function removeAllPlayersFromProperties() {
|
||||||
|
let clients = getClients();
|
||||||
|
for (let i in clients) {
|
||||||
|
if (isPlayerInAnyBusiness(clients[i])) {
|
||||||
|
removePlayerFromBusiness(clients[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isPlayerInAnyHouse(clients[i])) {
|
||||||
|
removePlayerFromHouse(clients[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function removeAllPlayersFromVehicles() {
|
||||||
|
let clients = getClients();
|
||||||
|
for (let i in clients) {
|
||||||
|
if (isPlayerInAnyVehicle(clients[i])) {
|
||||||
|
removePlayerFromVehicle(clients[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user