if (playerSide isEqualTo west) then {
{
_curObjCheck = (_x select 1);
missionNamespace setVariable [format ["entreprise_%1",(_x select 0)],true];
{
if (_x isEqualType objNull) then {
switch (typeOf _x) do {
case "Land_InfoStand_V1_F" : {
_x addAction ["Voir le matériel stocké",life_fnc_infoStorageCompany,"",0,false,false,"",'playerSide isEqualTo west'];
_x setVariable ["company_object",_curObjCheck];
if ((call life_coplevel) >= 7) then {...
if (playerSide isEqualTo west) then {
{
_curObjCheck = (_x select 1);
missionNamespace setVariable [format ["entreprise_%1",(_x select 0)],true];
{
if (_x isEqualType objNull) then {
switch (typeOf _x) do {
case "Land_InfoStand_V1_F" : {
_x addAction ["Voir le matériel stocké",life_fnc_infoStorageCompany,"",0,false,false,"",'playerSide isEqualTo west'];
_x setVariable ["company_object",_curObjCheck];
if ((call life_coplevel) >= 7) then {
_x addAction ["Dissoudre l'entreprise",{[] spawn life_fnc_forceDisbandCompany},"",0,false,false,"",'playerSide isEqualTo west'];
};
};
case "Land_InfoStand_V2_F" : {};
default {};
};
};
} forEach (_curObjCheck getVariable ["entreprise_objects",[]]);
} forEach maxence_all_entreprises;
};
/*
Author: Maxence for The Programmer Forum
*/
_entreprise = cursorObject getVariable ["company_object",objNull];
if (isNull _entreprise) exitWith {hint "Un problème s'est produit, veuillez mieux viser le panneau.";};
_structuredResult = "";
_structuredResult = _structuredResult + "Liste des objets dans le stockage commun :";
{
_name = getText (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "displayName");
_val = (_x select 1);
if (_val > 0) then {
_structuredResult = _structuredResult + format ["<br/>%1 (%2)",_name,_val];
};
} forEach (_entreprise getVariable ["entreprise_items",[]]);
_structuredResult = _structuredResult + "<br/>Liste des objets dans le stockage privé :";
{
_name = getText (missionConfigFile >> "VirtualItems" >> (_x select 0) >> "displayName");
_val = (_x select 1);
if (_val > 0) then {
_structuredResult = _structuredResult + format ["<br/>%1 (%2)",_name,_val];
};
} forEach (_entreprise getVariable ["entreprise_items_2",[]]);
hint parseText _structuredResult;
/*
Author: Maxence for The Programmer Forum
*/
_entreprise = cursorObject getVariable ["company_object",objNull];
if (isNull _entreprise) exitWith {hint "Un problème s'est produit, veuillez mieux viser le panneau.";};
_action = [
"Vous êtes sur le point de supprimer définitivement cette entreprise. Êtes vous sûr ?",
"Suppression de l'entreprise",
"Oui",
"Non"
] call BIS_fnc_guiMessage;
if !(_action) exitWith {};
_id = _entreprise getVariable ["entreprise_id",0];
if (_id isEqualTo 0) exitWith {};
[(_entreprise getVariable ["entreprise_id",0]),2,0] remoteExecCall ["max_entreprise_fnc_updateEntreprise",2];
maxence_all_entreprises deleteAt (maxence_all_entreprises find [_id,_entreprise]);
publicVariable "maxence_all_entreprises";
_marker = _entreprise getVariable ["entreprise_position",""];
if !(_marker isEqualTo "") then {
_markerVar = getText (_curConfig >> "positions_entreprises" >> _marker >> "markerVar");
_markerVar setMarkerAlpha 0;
};
_members = _entreprise getVariable ["entreprise_members",[]];
if ((count _members) > 0) then {
{
_curCheck = _x;
{
if ((getPlayerUID _curCheck) isEqualTo (_x select 0)) then {
[player,_entreprise] remoteExecCall ["max_entreprise_fnc_entrepriseBeKicked",_curCheck];
};
} forEach _members;
} forEach playableUnits;
};
{
if (_x isEqualType objNull) then {
deleteVehicle _x;
} else {
deleteMarker _x;
};
} forEach (_entreprise getVariable ["entreprise_objects",[]]);
hint format ["Vous avez définitivement supprimer l'entreprise %1.",(_entreprise getVariable ["entreprise_name",""])];
deleteVehicle _entreprise;
class infoStorageCompany {};
class forceDisbandCompany {};