Hallo Native-Network Nutzer!
In diesem Beitrag möchte ich euch mein Arma 3 Team im Dienst Script zu verfügen stellen.
Bilder:
Die anderes könnt ihr selber austesten
Einrichten:
1. Geht in den Ordner core\functions\functions und erstellt dort die Datei fn_admin.sqf mit dem Code.
#include "..\..\script_macros.hpp"
private["_mode","_team"];
_mode = _this select 0;
switch (_mode) do {
case "PROJEKTLEITER": {
if(player getVariable ["zl_adminimdienst",true] || player getVariable ["zl_entwicklerimdienst",true] || player getVariable ["zl_teamimdienst",true]) exitWith { ["Du hast noch einen anderen Modus aktiviert!", false, "fast", "orange", "Information"] spawn zl_fnc_msg; };
if(player getVariable ["zl_leitungimdienst",true]) then {
player setVariable ["zl_leitungimdienst", false, true];
_team = false;
} else {
player setVariable ["zl_leitungimdienst", true, true];
_team = true;
};
};
case "ADMIN": {
if(player getVariable ["zl_leitungimdienst",true] || player getVariable ["zl_entwicklerimdienst",true] || player getVariable ["zl_teamimdienst",true]) exitWith { ["Du hast noch einen anderen Modus aktiviert!", false, "fast", "orange", "Information"] spawn zl_fnc_msg; };
if(player getVariable ["zl_adminimdienst",true]) then {
player setVariable ["zl_adminimdienst", false, true];
_team = false;
} else {
player setVariable ["zl_adminimdienst", true, true];
_team = true;
};
};
case "ENTWICKLER": {
if(player getVariable ["zl_leitungimdienst",true] || player getVariable ["zl_adminimdienst",true] || player getVariable ["zl_teamimdienst",true]) exitWith { ["Du hast noch einen anderen Modus aktiviert!", false, "fast", "orange", "Information"] spawn zl_fnc_msg; };
if(player getVariable ["zl_entwicklerimdienst",true]) then {
player setVariable ["zl_entwicklerimdienst", false, true];
_team = false;
} else {
player setVariable ["zl_entwicklerimdienst", true, true];
_team = true;
};
};
case "SUPPORTER": {
if(player getVariable ["zl_leitungimdienst",true] || player getVariable ["zl_adminimdienst",true] || player getVariable ["zl_entwicklerimdienst",true]) exitWith { ["Du hast noch einen anderen Modus aktiviert!", false, "fast", "orange", "Information"] spawn zl_fnc_msg; };
if(player getVariable ["zl_teamimdienst",true]) then {
player setVariable ["zl_teamimdienst", false, true];
_team = false;
} else {
player setVariable ["zl_teamimdienst", true, true];
_team = true;
};
};
};
if(_team) then {
_team = true;
AdminGear = life_gear;
publicVariable "AdminGear";
player allowDamage false;
[] call ZL_fnc_stripDownPlayer;
player addUniform "U_B_CombatUniform_mcam";
[] call ZL_fnc_playerSkins;
[format["Du bist nun im %1 Modus!",_mode], false, "fast", "orange", "Information"] spawn zl_fnc_msg;
} else {
_team = false;
player allowDamage true;
life_gear = AdminGear;
[] spawn ZL_fnc_loadGear;
[] call ZL_fnc_playerSkins;
[format["Du bist nun nichtmehr im %1 Modus!",_mode], false, "fast", "orange", "Information"] spawn zl_fnc_msg;
};
Alles anzeigen
2. Geht in eure Functions.hpp und fügt dort unter Functions class admin {}; ein.
3. Öffnet nun eure fn_playerTags.sqf in dem Ordner core\functions\functions und fügt den Code über der Zeile _idc ctrlSetStructuredText parseText _text; ein.
if(_x getVariable ["zl_entwicklerimdienst",true]) then {
_text = format ["<img image='\a3\ui_f\data\gui\Cfg\UnitInsignia\curator_ca.paa' color='#5EFF33' /><t color='#5EFF33'> Entwickler</t><br/><t color='#FFFFFF'>%1</t>",(_x getVariable ["realname",name _x])];
};
if(_x getVariable ["zl_leitungimdienst",true]) then {
_text = format ["<img image='\a3\ui_f\data\gui\Cfg\UnitInsignia\curator_ca.paa' color='#FF0000' /><t color='#FF0000'> Projektleiter im Dienst</t><br/><t color='#FFFFFF'>%1</t>",(_x getVariable ["realname",name _x])];
};
if(_x getVariable ["zl_adminimdienst",true]) then {
_text = format ["<img image='\a3\ui_f\data\gui\Cfg\UnitInsignia\curator_ca.paa' color='#FF0000' /><t color='#FF0000'> Admin im Dienst</t><br/><t color='#FFFFFF'>%1</t>",(_x getVariable ["realname",name _x])];
};
if(_x getVariable ["zl_teamimdienst",true]) then {
_text = format ["<img image='\a3\ui_f\data\gui\Cfg\UnitInsignia\curator_ca.paa' color='#FFFD00' /><t color='#FFFD00'> Supporter im Dienst</t><br/><t color='#FFFFFF'>%1</t>",(_x getVariable ["realname",name _x])];
};
Alles anzeigen
4. Geht nun in eure fn_playerSkins.sqf in dem Ornder core\functions\functions und fügt ganz unten den Code ein natürlich noch den Path anpassen.
if(player getVariable ["zl_leitungimdienst",true]) then {
if (uniform player isEqualTo "U_B_CombatUniform_mcam") then {
player setObjectTextureGlobal [0, "Images\team\admin.jpg"];
};
};
if(player getVariable ["zl_entwicklerimdienst",true]) then {
if (uniform player isEqualTo "U_B_CombatUniform_mcam") then {
player setObjectTextureGlobal [0, "Images\team\entwickler.jpg"];
};
};
if(player getVariable ["zl_adminimdienst",true]) then {
if (uniform player isEqualTo "U_B_CombatUniform_mcam") then {
player setObjectTextureGlobal [0, "Images\team\admin.jpg"];
};
};
if(player getVariable ["zl_teamimdienst",true]) then {
if (uniform player isEqualTo "U_B_CombatUniform_mcam") then {
player setObjectTextureGlobal [0, "Images\team\supporter.jpg"];
};
};
Alles anzeigen
5. Und als letztes geh in eure init in dem Ordner core und fügt über player setVariable ["restrained", false, true]; den Code ein.
player setVariable ["zl_leitungimdienst", false, true];
player setVariable ["zl_adminimdienst", false, true];
player setVariable ["zl_entwicklerimdienst", false, true];
player setVariable ["zl_teamimdienst", false, true];
6. Danach braucht ihr einfach noch ein Button oder sowas und ruft das ganze so auf.
["PROJEKTLEITER"] spawn life_fnc_admin;
["ADMIN"] spawn life_fnc_admin;
["ENTWICKLER"] spawn life_fnc_admin;
["SUPPORTER"] spawn life_fnc_admin;
Kontakt:
Discord: Joshuaaa#1451
MfG - Joshua