Check if player is actually in biz before forcing exit
This commit is contained in:
@@ -2281,11 +2281,13 @@ function deleteBusiness(businessId, whoDeleted = 0) {
|
|||||||
* @return {Boolean} Whether or not the players were forced to exit
|
* @return {Boolean} Whether or not the players were forced to exit
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function removePlayersFromBusiness(businessId) {
|
function removePlayersFromBusiness(businessIndex) {
|
||||||
getClients().forEach(function (client) {
|
getClients().forEach(function (client) {
|
||||||
if (doesBusinessHaveInterior(businessId)) {
|
if (doesBusinessHaveInterior(businessIndex)) {
|
||||||
if (getPlayerBusiness(client) == businessId) {
|
if (getPlayerBusiness(client) == businessIndex) {
|
||||||
exitBusiness(client);
|
if (getPlayerInterior(client) == getBusinessData(businessIndex).exitInterior && getPlayerDimension(client) == getBusinessData(businessIndex).exitDimension) {
|
||||||
|
exitBusiness(client);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user