From a384881a014c43a93b38a0fa295a7ad51858efc6 Mon Sep 17 00:00:00 2001 From: Jacob Schmidt Date: Sat, 5 Apr 2025 14:24:34 -0500 Subject: [PATCH] Fix: Update interaction conditions to use companyShareholders This commit fixes an issue where interaction conditions were incorrectly using `companyGenerals` instead of `companyShareholders`. This change ensures that the correct group of players can interact with company assets like the CPOF, garage, and locker. The following changes were made: * Updated `fnc_initInteraction.sqf` to use `companyShareholders` in the interaction conditions for CPOF and garage access. * Updated `CfgVehicles.hpp` to use `companyShareholders` in the interaction conditions for company garage and locker access. --- addons/interaction/CfgVehicles.hpp | 8 ++++---- addons/interaction/functions/fnc_initInteraction.sqf | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 47284b2..219034d 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -39,7 +39,7 @@ class CfgVehicles { }; // class openCompanyGarage { // displayName = "Open Company Garage"; - // condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyShareholders"; // exceptions[] = {}; // statement = "[cursorObject] spawn forge_client_garage_fnc_openGarage"; // icon = ""; @@ -53,7 +53,7 @@ class CfgVehicles { }; // class openVirtualCompanyGarage { // displayName = "Virtual Company Garage"; - // condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // condition = "!(isNil {cursorObject getVariable 'isGarage'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyShareholders"; // exceptions[] = {}; // statement = "[cursorObject] spawn forge_client_arsenal_fnc_openGarage"; // icon = ""; @@ -74,7 +74,7 @@ class CfgVehicles { }; // class openCompanyLocker { // displayName = "Open Company Locker"; - // condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyShareholders"; // exceptions[] = {}; // statement = "[cursorObject] spawn forge_client_locker_fnc_openLocker"; // icon = ""; @@ -88,7 +88,7 @@ class CfgVehicles { }; // class openVirtualCompanyArmory { // displayName = "Virtual Company Armory"; - // condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyGenerals"; + // condition = "!(isNil {cursorObject getVariable 'isLocker'}) && (player distance cursorObject) <= 5 && FORGE_VA_Enable == 1 && FORGE_Team_Coord == 1 && (getPlayerUID player) in companyShareholders"; // exceptions[] = {}; // statement = "[cursorObject] spawn forge_client_arsenal_fnc_openArmory"; // icon = ""; diff --git a/addons/interaction/functions/fnc_initInteraction.sqf b/addons/interaction/functions/fnc_initInteraction.sqf index 9cf2bed..70148fa 100644 --- a/addons/interaction/functions/fnc_initInteraction.sqf +++ b/addons/interaction/functions/fnc_initInteraction.sqf @@ -50,7 +50,7 @@ FORGE_InteractionItems = [ [ ["!(isNil { cursorObject getVariable 'isCPOF' - })", "(player distance cursorObject) <= 5 && (getPlayerUID player) in companyGenerals"], + })", "(player distance cursorObject) <= 5 && (getPlayerUID player) in companyShareholders"], ["Access CPOF", "[cursorObject] spawn forge_client_admin_fnc_openAdmin"] ], [ @@ -78,7 +78,7 @@ if (FORGE_Team_Coord == 1) then { [ ["!(isNil { cursorObject getVariable 'isGarage' - })", "(player distance cursorObject) <= 5 && (getPlayerUID player) in companyGenerals"], + })", "(player distance cursorObject) <= 5 && (getPlayerUID player) in companyShareholders"], ["Open Company Garage", "[cursorObject] spawn forge_client_garage_fnc_openGarage"] ] ];