Skip to content
shukari edited this page Jun 6, 2020 · 22 revisions

Weitere Skripte: https://github.com/TacticalBaconDevs/TBMod/blob/master/infos/debugCode.sqf


SafeStart

#safe-> in den Chat on/off toggle oder #safe 1 für an #safe 0 für aus


ZeusGruppe von der Karte verschwinden (Bluefortrack)

-> Ausblenden - LOKAL ausführen:

(group player) setVariable ["ace_map_hideBlueForceMarker", true, true]

-> (Wieder)Einblenden - LOKAL ausführen:

(group player) setVariable ["ace_map_hideBlueForceMarker", false, true]

GruppenID setzen

-> Person direkt anschauen und davorstehen - LOKAL ausführen:

cursorObject setGroupIdGlobal ["Alpha"]

Als Tier spawnen

-> LOKAL ausführen - TIER außer Fische -> https://community.bistudio.com/wiki/Arma_3_CfgVehicles_Animals

_tier = createAgent ["Fin_random_F", getPos player, [], 5, "CAN_COLLIDE"]; 
_tier setVariable ["BIS_fnc_animalBehaviour_disable", true]; 
BACK = player; selectPlayer _tier;

-> wieder zurück LOKAL ausführen:

selectPlayer BACK

Aktive Spielerradare erkennen

-> Starten - LOKAL ausführen:

[] spawn {TB_checkRadar = true;
    waitUntil {
        private _msg = "Aktiver Radar:";
        {
            if (isVehicleRadarOn (vehicle player)) then {
                _msg = format ["%1\n%2 - %3", _msg, name _x, getText (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "displayName")];
            };
       } forEach allPlayers;
        if (_msg != "Aktiver Radar:") then {hintSilent _msg} else {hintSilent ""};
        uiSleep 2;
        !TB_checkRadar
    }};

-> ENDE - LOKAL ausführen:

TB_checkRadar = false

KI nicht fliehen lassen

{_x allowFleeing 0} forEach allGroups;

Heli Missions Start

if(isServer) then {
    private _groups = [alpha,bravo,charlie,delta];
    private _helis = [alphaheli,bravoheli,charlieheli,deltaheli];
    if (count _groups != count _helis) then {
        (format ["[TBMod] Anzahl Groups/Heli unterschiedlich"]) remoteExecCall ["systemChat"];
    }else{
        {
            _index = _forEachIndex;
            {_x moveInCargo (_helis # _index)} forEach units (_groups # _index); 
        } forEach _helis;
    };
};

YOLO System

Du musst Admin sein und die Console im Escapemenü haben ODER du nutzt den Wellencounter

Sobald du den Code ausführst ist das System scharf (LOKAL):

TB_yolo = true;
publicVariable "TB_yolo";

Um alle wieder aus dem Zuschauer zu holen einfach (LOKAL AUSFÜHREN): {[_x] call TB_delete} forEach allPlayers ODER ABER GLOBAL: [player] call TB_delete

if (isNil "TB_yolo") then
{
    TB_yolo = false;
    publicVariable "TB_yolo";
};

if (isNil "TB_delete") then
{
    TB_delete = {
        params [["_unit", player]];
        
        if (getPlayerUid _unit in TB_dead) then
        {
            TB_dead = TB_dead - [getPlayerUid _unit];
            publicVariable "TB_dead";
            [false] remoteExec ["ace_spectator_fnc_setSpectator", _unit];
        };
    };
    publicVariable "TB_delete";
};

if (isNil "TB_dead") then
{
    TB_dead = [];
    publicVariable "TB_dead";
}
else
{
    if (TB_yolo && getPlayerUid player in TB_dead) then
    {
        [true] call ace_spectator_fnc_setSpectator;
        systemChat "Du wurdest wieder in den Spectator gesetzt, da du noch Tod bist!";
    };
};

[
    "CAManBase",
    "Killed",
    {
        params ["_unit"];

        if (local _unit && isPlayer _unit) then
        {
            if (TB_yolo && !(getPlayerUid _unit in TB_dead)) then
            {
                TB_dead pushBackUnique (getPlayerUid _unit);
                publicVariable "TB_dead";
                
                [true] remoteExec ["ace_spectator_fnc_setSpectator", _unit]
                //[true] call ace_spectator_fnc_setSpectator;
            };
        };
    },
    true,
    [],
    true
] call CBA_fnc_addClassEventHandler;
Clone this wiki locally