Fix clientside biz stuff

This commit is contained in:
Vortrex
2022-09-29 11:08:15 -05:00
parent 7ff030727a
commit cf5fb4d8f9
2 changed files with 45 additions and 29 deletions

View File

@@ -22,6 +22,7 @@ class BusinessData {
this.hasItems = hasItems;
this.blipId = -1;
this.labelInfoType = 0;
this.locked = false;
}
}
@@ -34,7 +35,7 @@ function initBusinessScript() {
// ===========================================================================
function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, hasItems) {
function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, locked, hasItems) {
logToConsole(LOG_DEBUG, `[AGRP.Business] Received business ${businessId} (${name}) from server`);
if (!areServerElementsSupported() || getGame() == AGRP_GAME_MAFIA_ONE) {
@@ -48,6 +49,7 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
businessData.buyPrice = buyPrice;
businessData.rentPrice = rentPrice;
businessData.hasItems = hasItems;
businessData.locked = locked;
if (hasInterior && !hasItems) {
businessData.labelInfoType = AGRP_PROPLABEL_INFO_ENTER;