Change copyright, consts, and net events prefix
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// ===========================================================================
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/v-roleplay
|
||||
// ===========================================================================
|
||||
// FILE: business.js
|
||||
// DESC: Provides business functions and usage
|
||||
@@ -39,7 +38,7 @@ function initBusinessScript() {
|
||||
function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel, pickupModel, buyPrice, rentPrice, hasInterior, locked, hasItems, entranceFee) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Received business ${businessId} (${name}) from server`);
|
||||
|
||||
if (!areServerElementsSupported() || getGame() == AGRP_GAME_MAFIA_ONE || getGame() == AGRP_GAME_GTA_IV) {
|
||||
if (!areServerElementsSupported() || getGame() == V_GAME_MAFIA_ONE || getGame() == V_GAME_GTA_IV) {
|
||||
if (getBusinessData(businessId) != false) {
|
||||
let businessData = getBusinessData(businessId);
|
||||
businessData.name = name;
|
||||
@@ -54,12 +53,12 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
|
||||
businessData.entranceFee = entranceFee;
|
||||
|
||||
if (hasInterior && !hasItems) {
|
||||
businessData.labelInfoType = AGRP_PROPLABEL_INFO_ENTER;
|
||||
businessData.labelInfoType = V_PROPLABEL_INFO_ENTER;
|
||||
} else if (!hasInterior && hasItems) {
|
||||
businessData.labelInfoType = AGRP_PROPLABEL_INFO_BUY;
|
||||
businessData.labelInfoType = V_PROPLABEL_INFO_BUY;
|
||||
} else {
|
||||
if (businessData.buyPrice > 0) {
|
||||
businessData.labelInfoType = AGRP_PROPLABEL_INFO_BUYBIZ;
|
||||
businessData.labelInfoType = V_PROPLABEL_INFO_BUYBIZ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +66,7 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
|
||||
if (blipModel == -1) {
|
||||
if (businessData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been removed by the server`);
|
||||
if (getGame() == AGRP_GAME_GTA_IV) {
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.removeBlipAndClearIndex(getBusinessData(businessId).blipId);
|
||||
} else {
|
||||
destroyElement(getElementFromId(blipId));
|
||||
@@ -81,7 +80,7 @@ function receiveBusinessFromServer(businessId, name, entrancePosition, blipModel
|
||||
} else {
|
||||
if (businessData.blipId != -1) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Business] Business ${businessId}'s blip has been changed by the server`);
|
||||
if (getGame() == AGRP_GAME_GTA_IV) {
|
||||
if (getGame() == V_GAME_GTA_IV) {
|
||||
natives.setBlipCoordinates(businessData.blipId, businessData.entrancePosition);
|
||||
natives.changeBlipSprite(businessData.blipId, businessData.blipModel);
|
||||
natives.setBlipMarkerLongDistance(businessData.blipId, false);
|
||||
|
||||
Reference in New Issue
Block a user