Move return to allow enter while inside biz/house
This commit is contained in:
@@ -147,8 +147,8 @@ function enterExitPropertyCommand(command, params, client) {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}, 1100);
|
}, 1100);
|
||||||
removeEntityData(client, "ag.inHouse");
|
removeEntityData(client, "ag.inHouse");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isPlayerInAnyBusiness(client)) {
|
if(isPlayerInAnyBusiness(client)) {
|
||||||
@@ -179,13 +179,13 @@ function enterExitPropertyCommand(command, params, client) {
|
|||||||
}, 1100);
|
}, 1100);
|
||||||
removeEntityData(client, "ag.inBusiness");
|
removeEntityData(client, "ag.inBusiness");
|
||||||
logToConsole(LOG_DEBUG, `[Asshat.Misc] ${getPlayerDisplayForConsole(client)} entered business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`);
|
logToConsole(LOG_DEBUG, `[Asshat.Misc] ${getPlayerDisplayForConsole(client)} entered business ${inBusiness.name}[${inBusiness.index}/${inBusiness.databaseId}]`);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getServerData().businesses.length > 0) {
|
if(getServerData().businesses.length > 0) {
|
||||||
let closestBusinessId = getClosestBusinessEntrance(getPlayerPosition(client));
|
let closestBusinessId = getClosestBusinessEntrance(getPlayerPosition(client));
|
||||||
let closestBusiness = getBusinessData(closestBusinessId)
|
let closestBusiness = getBusinessData(closestBusinessId);
|
||||||
if(getDistance(closestBusiness.entrancePosition, getPlayerPosition(client)) <= getGlobalConfig().enterPropertyDistance) {
|
if(getDistance(closestBusiness.entrancePosition, getPlayerPosition(client)) <= getGlobalConfig().enterPropertyDistance) {
|
||||||
if(!doesBusinessHaveInterior(closestBusinessId)) {
|
if(!doesBusinessHaveInterior(closestBusinessId)) {
|
||||||
messagePlayerAlert(client, "This business does not have an interior.");
|
messagePlayerAlert(client, "This business does not have an interior.");
|
||||||
|
|||||||
Reference in New Issue
Block a user