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.
This commit is contained in:
Jacob Schmidt 2025-04-05 14:24:34 -05:00
parent c87deec60b
commit a384881a01
2 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class CfgVehicles {
}; };
// class openCompanyGarage { // class openCompanyGarage {
// displayName = "Open Company Garage"; // 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[] = {}; // exceptions[] = {};
// statement = "[cursorObject] spawn forge_client_garage_fnc_openGarage"; // statement = "[cursorObject] spawn forge_client_garage_fnc_openGarage";
// icon = ""; // icon = "";
@ -53,7 +53,7 @@ class CfgVehicles {
}; };
// class openVirtualCompanyGarage { // class openVirtualCompanyGarage {
// displayName = "Virtual Company Garage"; // 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[] = {}; // exceptions[] = {};
// statement = "[cursorObject] spawn forge_client_arsenal_fnc_openGarage"; // statement = "[cursorObject] spawn forge_client_arsenal_fnc_openGarage";
// icon = ""; // icon = "";
@ -74,7 +74,7 @@ class CfgVehicles {
}; };
// class openCompanyLocker { // class openCompanyLocker {
// displayName = "Open Company Locker"; // 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[] = {}; // exceptions[] = {};
// statement = "[cursorObject] spawn forge_client_locker_fnc_openLocker"; // statement = "[cursorObject] spawn forge_client_locker_fnc_openLocker";
// icon = ""; // icon = "";
@ -88,7 +88,7 @@ class CfgVehicles {
}; };
// class openVirtualCompanyArmory { // class openVirtualCompanyArmory {
// displayName = "Virtual Company Armory"; // 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[] = {}; // exceptions[] = {};
// statement = "[cursorObject] spawn forge_client_arsenal_fnc_openArmory"; // statement = "[cursorObject] spawn forge_client_arsenal_fnc_openArmory";
// icon = ""; // icon = "";

View File

@ -50,7 +50,7 @@ FORGE_InteractionItems = [
[ [
["!(isNil { ["!(isNil {
cursorObject getVariable 'isCPOF' 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"] ["Access CPOF", "[cursorObject] spawn forge_client_admin_fnc_openAdmin"]
], ],
[ [
@ -78,7 +78,7 @@ if (FORGE_Team_Coord == 1) then {
[ [
["!(isNil { ["!(isNil {
cursorObject getVariable 'isGarage' 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"] ["Open Company Garage", "[cursorObject] spawn forge_client_garage_fnc_openGarage"]
] ]
]; ];