1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Downloads
  4. Galerie
    1. Alben
  5. Toolbox
    1. Passwort Generator
    2. Portchecker
  6. Mitglieder
    1. Mitgliedersuche
    2. Benutzer online
    3. Trophäen
    4. Team
Mi: 21 Mai 2025
  • Anmelden oder registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Forum
  • Dateien
  • Seiten
  • Bilder
  • Erweiterte Suche

Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.

Anmelden oder registrieren
    1. Nodezone.net Community
    2. Forum
    3. Gameserver & Hosting
    4. ArmA Series - ArmA 3 / Reforger
    5. Hilfeforum

    Infoleiste verschwindet beim Tankstellenraub

      • Altis Life
    • Claas_Fan_92
    • 1. Februar 2021 um 16:16
    • Geschlossen
    • Erledigt
    • Claas_Fan_92
      Schüler
      Reaktionen
      2
      Trophäen
      6
      Beiträge
      127
      • 1. Februar 2021 um 22:33
      • #21

      Habs hin bekommen

      Code
            {
              _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
              "TankeMarker" setMarkerColor "ColorRed";
              "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
              "TankeMarker" setMarkerType "mil_warning";
            } forEach playableUnits;

      Aber jetzt hab ich noch eine Letzte Frage und zwar nimmt der Tankwärter tank wärter die Hände hoch ob wohl nicht genügend cobs da sind, wie ändere ich das?

    • Deathman
      Profi
      Reaktionen
      259
      Trophäen
      10
      Beiträge
      676
      Dateien
      12
      Bilder
      106
      • 1. Februar 2021 um 22:42
      • #22

      wieso den überhaupt foreach für eine Tanke die Ausgeraubt wird

      Zitat von Claas_Fan_92

      Habs hin bekommen

      Code
            {
              _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
              "TankeMarker" setMarkerColor "ColorRed";
              "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
              "TankeMarker" setMarkerType "mil_warning";
            } forEach playableUnits;

      Aber jetzt hab ich noch eine Letzte Frage und zwar nimmt der Tankwärter tank wärter die Hände hoch ob wohl nicht genügend cobs da sind, wie ändere ich das?

      Da blick ich irgendwie nicht durch.

      Ich habe es so gemacht es funktioniert :*

      Code
      _CreatMarkerName = "TankRob";
      _Pos = position player; // by ehno: get player pos
      _marker = createMarker [_CreatMarkerName, _Pos]; //by ehno: Place a Maker on the map
      _CreatMarkerName setMarkerColor _MarkerColor;
      _CreatMarkerName setMarkerText _MarkerText;
      _CreatMarkerName setMarkerType _MarkerType;

      Oder sehe ich hier was flasch.

    • Claas_Fan_92
      Schüler
      Reaktionen
      2
      Trophäen
      6
      Beiträge
      127
      • 1. Februar 2021 um 22:45
      • #23
      Zitat von Deathman

      wieso den überhaupt foreach für eine Tanke die Ausgeraubt wird

      Da blick ich irgendwie nicht durch.

      Ich habe es so gemacht es funktioniert :*

      Code
      _CreatMarkerName = "TankRob";
      _Pos = position player; // by ehno: get player pos
      _marker = createMarker [_CreatMarkerName, _Pos]; //by ehno: Place a Maker on the map
      _CreatMarkerName setMarkerColor _MarkerColor;
      _CreatMarkerName setMarkerText _MarkerText;
      _CreatMarkerName setMarkerType _MarkerType;

      Oder sehe ich hier was flasch.

      Ja das lag am createMarkerlocal hab das local weg gemacht und jetzt geht es.

    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 1. Februar 2021 um 22:47
      • #24
      Zitat von Claas_Fan_92

      Ja das lag am createMarkerlocal hab das local weg gemacht und jetzt geht es.

      Du hättest es auch mit local und foreach machen können.

      Aber du kannst in dem Fall natürlich auch direkt die Globale Funktion CreateMarker nutzen.

      Entwickler vom Arma 3 Batch Generator


    • Claas_Fan_92
      Schüler
      Reaktionen
      2
      Trophäen
      6
      Beiträge
      127
      • 1. Februar 2021 um 22:52
      • #25

      Jap jetzt hab ich es so, aber ich danke euch für die Hilfe

      Code
            {
              _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
              "TankeMarker" setMarkerColor "ColorRed";
              "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
              "TankeMarker" setMarkerType "mil_warning";
            } forEach playableUnits;

      Weißt du wie ich es machen muss damit der Typ nicht die hände hoch nimmt wenn nicht soviele Polizisten da sind?

    • Deathman
      Profi
      Reaktionen
      259
      Trophäen
      10
      Beiträge
      676
      Dateien
      12
      Bilder
      106
      • 1. Februar 2021 um 22:53
      • #26

      Ich kapier noch immer nicht was forech damit zu tun hat

    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 1. Februar 2021 um 22:54
      • #27

      Setze das

      Code
      _cops = (west countSide playableUnits);
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch keinen Spaß :D";};

      oben zu den anderen If Abfragen.

      Entwickler vom Arma 3 Batch Generator


    • Claas_Fan_92
      Schüler
      Reaktionen
      2
      Trophäen
      6
      Beiträge
      127
      • 1. Februar 2021 um 22:56
      • #28
      Zitat von Joe Barbaro

      Setze das

      Code
      _cops = (west countSide playableUnits);
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch keinen Spaß :D";};

      oben zu den anderen If Abfragen.

      C
      /*
      Author: ? edited by Joe Barbaro
      Description: Tankstellenraub Script
      */
      
      #include "..\..\script_macros.hpp"
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      private _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
      private _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
      private _action = [_this,2] call BIS_fnc_param;//Action name
      private _kassa = 10000 + round(random 10000); //The amount the shop has to rob, you could make this a parameter of the call (community.bistudio.com/wiki/addAction). Give it a try and post below
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      if(side _robber != civilian) exitWith { hintSilent "Ich melde dich lieber deinem Vorgesetzten" };
      if(_robber distance _shop > 5) exitWith { hintSilent "Was willst du denn den aus nem Kilometer bedrohen?" };
      if (vehicle player != _robber) exitWith { hintSilent "Was solln das werden Drive-by?" };
      if !(alive _robber) exitWith {};
      if (currentWeapon _robber == "") exitWith { hintSilent "Was willst du pisser von mir hau ab!" };
      if (_kassa == 0) exitWith {hintSilent "Kein Geld keine Beute!"};
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      _rip = true;
      _shop removeAction _action;
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";};
      [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      _chance = random(100);
      _cops = (west countSide playableUnits);
      if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; };
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      disableSerialization;
      250 cutRsc ["life_progress","PLAIN"];
      _ui = uiNameSpace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%1)...","%"];
      _progress progressSetPosition 0.01;
      _cP = 0.01;
      if(_rip) then
        {
          while{true} do
          {
            uiSleep 0.85;
            _cP = _cP + 0.01;
            _progress progressSetPosition _cP;
            _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%2)...",round(_cP * 100),"%"];
            _Pos = position player; // by ehno: get player pos
      
            {
              _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
              "TankeMarker" setMarkerColor "ColorRed";
              "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
              "TankeMarker" setMarkerType "mil_warning";
            } forEach playableUnits;
      
            if(_cP >= 1) exitWith {};
            if(_robber distance _shop > 5) exitWith { };
            if!(alive _robber) exitWith {};
      
            /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
            };
            if(_robber getVariable "restrained") exitWith {_rip = false; hint "Tja festgenomen scheiße gelaufen..."; 250 cutText ["","PLAIN"];};      //Player got arrested, or restrained by another player!
            if(life_istazed) exitWith {_rip = false; hint "Du wurdest getazert RIP!"; 250 cutText ["","PLAIN"];};                                     //Player was tazed
            if!(alive _robber) exitWith {_rip = false; 250 cutText ["","PLAIN"];};
      
            if(_robber distance _shop > 5) exitWith {
            deleteMarker "TankeMarker";
            [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
            hintSilent "Du hast den Kassierer nicht im Auge gehabt";
            250 cutText ["","PLAIN"];
            _rip = false;
            };
      
      250 cutText ["","PLAIN"];
      titleText[format["Du hast %1$, geklaut! Hau ab bevor die Cops kommen!",[_kassa] call life_fnc_numberText],"PLAIN"];
      [_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0];
      deleteMarker "TankeMarker"; // by ehno delete maker
      life_cash = life_cash + _kassa;
      _rip = false;
      life_use_atm = false;
      uiSleep (30 + random(180));
      life_use_atm = true;
      if!(alive _robber) exitWith {};
      [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
      };
      uiSleep 300;
      _action = _shop addAction["Tankstelle ausrauben",life_fnc_robShops];
      [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      Alles anzeigen

      Meinst du so?

      Code
      _rip = true;
      _shop removeAction _action;
      _cops = (west countSide playableUnits);
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";};
      [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      _chance = random(100);
      if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; };
    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 1. Februar 2021 um 23:00
      • #29
      C
      /*
      Author: ? edited by Joe Barbaro
      Description: Tankstellenraub Script
      */
      
      #include "..\..\script_macros.hpp"
      
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      private _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
      private _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
      private _action = [_this,2] call BIS_fnc_param;//Action name
      private _kassa = 10000 + round(random 10000); //The amount the shop has to rob, you could make this a parameter of the call (community.bistudio.com/wiki/addAction). Give it a try and post below
      private _cops = (west countSide playableUnits);
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      if(side _robber != civilian) exitWith { hintSilent "Ich melde dich lieber deinem Vorgesetzten" };
      if(_robber distance _shop > 5) exitWith { hintSilent "Was willst du denn den aus nem Kilometer bedrohen?" };
      if (vehicle player != _robber) exitWith { hintSilent "Was solln das werden Drive-by?" };
      if !(alive _robber) exitWith {};
      if (currentWeapon _robber == "") exitWith { hintSilent "Was willst du pisser von mir hau ab!" };
      if (_kassa == 0) exitWith {hintSilent "Kein Geld keine Beute!"};
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";};
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      _rip = true;
      _shop removeAction _action;
      [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      _chance = random(100);
      if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; };
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      disableSerialization;
      250 cutRsc ["life_progress","PLAIN"];
      _ui = uiNameSpace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%1)...","%"];
      _progress progressSetPosition 0.01;
      _cP = 0.01;
      if(_rip) then
        {
          while{true} do
          {
            uiSleep 0.85;
            _cP = _cP + 0.01;
            _progress progressSetPosition _cP;
            _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%2)...",round(_cP * 100),"%"];
            _Pos = position player; // by ehno: get player pos
      
            {
              _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
              "TankeMarker" setMarkerColor "ColorRed";
              "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
              "TankeMarker" setMarkerType "mil_warning";
            } forEach playableUnits;
      
            if(_cP >= 1) exitWith {};
            if(_robber distance _shop > 5) exitWith { };
            if!(alive _robber) exitWith {};
      
            /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
            };
            if(_robber getVariable "restrained") exitWith {_rip = false; hint "Tja festgenomen scheiße gelaufen..."; 250 cutText ["","PLAIN"];};      //Player got arrested, or restrained by another player!
            if(life_istazed) exitWith {_rip = false; hint "Du wurdest getazert RIP!"; 250 cutText ["","PLAIN"];};                                     //Player was tazed
            if!(alive _robber) exitWith {_rip = false; 250 cutText ["","PLAIN"];};
      
            if(_robber distance _shop > 5) exitWith {
            deleteMarker "TankeMarker";
            [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
            hintSilent "Du hast den Kassierer nicht im Auge gehabt";
            250 cutText ["","PLAIN"];
            _rip = false;
            };
      
      250 cutText ["","PLAIN"];
      titleText[format["Du hast %1$, geklaut! Hau ab bevor die Cops kommen!",[_kassa] call life_fnc_numberText],"PLAIN"];
      [_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0];
      deleteMarker "TankeMarker"; // by ehno delete maker
      life_cash = life_cash + _kassa;
      _rip = false;
      life_use_atm = false;
      uiSleep (30 + random(180));
      life_use_atm = true;
      if!(alive _robber) exitWith {};
      [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
      };
      uiSleep 300;
      _action = _shop addAction["Tankstelle ausrauben",life_fnc_robShops];
      [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      Alles anzeigen

      Entwickler vom Arma 3 Batch Generator


    • Claas_Fan_92
      Schüler
      Reaktionen
      2
      Trophäen
      6
      Beiträge
      127
      • 1. Februar 2021 um 23:28
      • #30
      Zitat von Joe Barbaro
      C
      /*
      Author: ? edited by Joe Barbaro
      Description: Tankstellenraub Script
      */
      
      #include "..\..\script_macros.hpp"
      
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      private _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
      private _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
      private _action = [_this,2] call BIS_fnc_param;//Action name
      private _kassa = 10000 + round(random 10000); //The amount the shop has to rob, you could make this a parameter of the call (community.bistudio.com/wiki/addAction). Give it a try and post below
      private _cops = (west countSide playableUnits);
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      if(side _robber != civilian) exitWith { hintSilent "Ich melde dich lieber deinem Vorgesetzten" };
      if(_robber distance _shop > 5) exitWith { hintSilent "Was willst du denn den aus nem Kilometer bedrohen?" };
      if (vehicle player != _robber) exitWith { hintSilent "Was solln das werden Drive-by?" };
      if !(alive _robber) exitWith {};
      if (currentWeapon _robber == "") exitWith { hintSilent "Was willst du pisser von mir hau ab!" };
      if (_kassa == 0) exitWith {hintSilent "Kein Geld keine Beute!"};
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";};
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      _rip = true;
      _shop removeAction _action;
      [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      _chance = random(100);
      if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; };
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      disableSerialization;
      250 cutRsc ["life_progress","PLAIN"];
      _ui = uiNameSpace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%1)...","%"];
      _progress progressSetPosition 0.01;
      _cP = 0.01;
      if(_rip) then
        {
          while{true} do
          {
            uiSleep 0.85;
            _cP = _cP + 0.01;
            _progress progressSetPosition _cP;
            _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%2)...",round(_cP * 100),"%"];
            _Pos = position player; // by ehno: get player pos
      
            {
              _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
              "TankeMarker" setMarkerColor "ColorRed";
              "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
              "TankeMarker" setMarkerType "mil_warning";
            } forEach playableUnits;
      
            if(_cP >= 1) exitWith {};
            if(_robber distance _shop > 5) exitWith { };
            if!(alive _robber) exitWith {};
      
            /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
            };
            if(_robber getVariable "restrained") exitWith {_rip = false; hint "Tja festgenomen scheiße gelaufen..."; 250 cutText ["","PLAIN"];};      //Player got arrested, or restrained by another player!
            if(life_istazed) exitWith {_rip = false; hint "Du wurdest getazert RIP!"; 250 cutText ["","PLAIN"];};                                     //Player was tazed
            if!(alive _robber) exitWith {_rip = false; 250 cutText ["","PLAIN"];};
      
            if(_robber distance _shop > 5) exitWith {
            deleteMarker "TankeMarker";
            [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
            hintSilent "Du hast den Kassierer nicht im Auge gehabt";
            250 cutText ["","PLAIN"];
            _rip = false;
            };
      
      250 cutText ["","PLAIN"];
      titleText[format["Du hast %1$, geklaut! Hau ab bevor die Cops kommen!",[_kassa] call life_fnc_numberText],"PLAIN"];
      [_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0];
      deleteMarker "TankeMarker"; // by ehno delete maker
      life_cash = life_cash + _kassa;
      _rip = false;
      life_use_atm = false;
      uiSleep (30 + random(180));
      life_use_atm = true;
      if!(alive _robber) exitWith {};
      [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
      };
      uiSleep 300;
      _action = _shop addAction["Tankstelle ausrauben",life_fnc_robShops];
      [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      Alles anzeigen

      Ich danke euch, es funkt jetzt alles.

      Ich wünsche euch denn noch einen schönen Abend.

    • Basti0208
      Schüler
      Reaktionen
      58
      Trophäen
      10
      Beiträge
      138
      Dateien
      1
      • 1. Februar 2021 um 23:37
      • #31
      Zitat von Joe Barbaro

      Du hättest es auch mit local und foreach machen können.

      Nein hätte man nicht. Du hättest es auf jedem Client einzeln ausführen müssen via remoteExecCall.
      Ein foreach-Loop geht nur die Items im Array durch, es wird trotzdem lokal bei dir ausgeführt.

      Hier eine überarbeitete Version:

      C
      /*
      Author: ? edited by Joe Barbaro
      Description: Tankstellenraub Script
      */
      
      #include "..\..\script_macros.hpp"
      
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      private _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
      private _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
      private _action = [_this,2] call BIS_fnc_param;//Action name
      private _kassa = 10000 + round(random 10000); //The amount the shop has to rob, you could make this a parameter of the call (community.bistudio.com/wiki/addAction). Give it a try and post below
      private _cops = (west countSide playableUnits);
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      if(side _robber != civilian) exitWith { hintSilent "Ich melde dich lieber deinem Vorgesetzten" };
      if(_robber distance _shop > 5) exitWith { hintSilent "Was willst du denn den aus nem Kilometer bedrohen?" };
      if (vehicle player != _robber) exitWith { hintSilent "Was solln das werden Drive-by?" };
      if !(alive _robber) exitWith {};
      if (currentWeapon _robber == "") exitWith { hintSilent "Was willst du pisser von mir hau ab!" };
      if (_kassa == 0) exitWith {hintSilent "Kein Geld keine Beute!"};
      if(_cops < 1) exitWith {hintSilent "Ohne Polizei macht so ein Überfall doch gar keinen Spaß :D";};
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      _rip = true;
      _shop removeAction _action;
      [_shop,"AmovPercMstpSsurWnonDnon",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      _chance = random(100);
      if(_chance >= 1) then {[1,format["ALARM! - Tankstelle: %1 wird ausgeraubt!", _shop]] remoteExec ["life_fnc_broadcast",west]; };
      /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
      disableSerialization;
      250 cutRsc ["life_progress","PLAIN"];
      _ui = uiNameSpace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%1)...","%"];
      _progress progressSetPosition 0.01;
      _cP = 0.01;
      if(_rip) then {
          _Pos = position player; // by ehno: get player pos
          _marker = createMarker ["TankeMarker", _Pos]; //by ehno: Place a Maker on the map
          "TankeMarker" setMarkerColor "ColorRed";
          "TankeMarker" setMarkerText "!LAUFENDER ÜBERFALL!";
          "TankeMarker" setMarkerType "mil_warning";
          while {true} do {
              uiSleep 0.85;
              _cP = _cP + 0.01;
              _progress progressSetPosition _cP;
              _pgText ctrlSetText format["Überfall läuft... Behalt den Kassierer im Griff (%1%2)...",round(_cP * 100),"%"];
      
              if(_cP >= 1) exitWith {};
              if(_robber distance _shop > 5) exitWith { };
              if!(alive _robber) exitWith {};
      
              /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
          };
          if(_robber getVariable "restrained") exitWith {_rip = false; hint "Tja festgenomen scheiße gelaufen..."; 250 cutText ["","PLAIN"];};      //Player got arrested, or restrained by another player!
          if(life_istazed) exitWith {_rip = false; hint "Du wurdest getazert RIP!"; 250 cutText ["","PLAIN"];};                                     //Player was tazed
          if!(alive _robber) exitWith {_rip = false; 250 cutText ["","PLAIN"];};
      
          if(_robber distance _shop > 5) exitWith {
              deleteMarker "TankeMarker";
              [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
              hintSilent "Du hast den Kassierer nicht im Auge gehabt";
              250 cutText ["","PLAIN"];
              _rip = false;
          };
      
          250 cutText ["","PLAIN"];
          titleText[format["Du hast %1$, geklaut! Hau ab bevor die Cops kommen!",[_kassa] call life_fnc_numberText],"PLAIN"];
          [_shop,"robberyalarm"] remoteExec ["life_fnc_say3D",0];
          deleteMarker "TankeMarker"; // by ehno delete maker
          life_cash = life_cash + _kassa;
          _rip = false;
          life_use_atm = false;
          uiSleep (30 + random(180));
          life_use_atm = true;
          if!(alive _robber) exitWith {};
          [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
      };
      uiSleep 300;
      _action = _shop addAction["Tankstelle ausrauben",life_fnc_robShops];
      [_shop,"",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
      Alles anzeigen

      Ich habe den foreach-Loop entfernt und die Marker-Erstellung aus dem while-Loop entfernt, da dies nicht nötig ist und nur Performance frisst.

      Mit freundlichen Grüßen

      Basti

    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 1. Februar 2021 um 23:42
      • #32

      Ja du hast recht....

      Bin schon länger nicht mehr in SQF unterwegs...

      Aber gut dann können wir hier zu machen.

      Zitat von Claas_Fan_92

      Ich danke euch, es funkt jetzt alles.

      Ich wünsche euch denn noch einen schönen Abend.

      Entwickler vom Arma 3 Batch Generator


    • Claas_Fan_92
      Schüler
      Reaktionen
      2
      Trophäen
      6
      Beiträge
      127
      • 1. Februar 2021 um 23:53
      • #33
      Zitat von Joe Barbaro

      Ja du hast recht....

      Bin schon länger nicht mehr in SQF unterwegs...

      Aber gut dann können wir hier zu machen.

      Jap kann zu.

    • Joe Barbaro 1. Februar 2021 um 23:56

      Hat das Thema geschlossen.

    Registrieren oder Einloggen

    Du bist noch kein Mitglied von NodeZone.net? Registriere dich kostenlos und werde Teil einer großartigen Community!

    Registrieren

    Wichtige Links & Informationen

    Server & Hosting-Ressourcen

      Server Administration & Hosting Basics

      Windows Server Support & Guides

      Linux Server Configuration & Help

      Setting up TeamSpeak 3 & VoIP Servers

      Domains & Web Hosting for Beginners & Professionals

      Cloud Hosting, Docker & Kubernetes Tutorials

    Gameserver & Modding-Ressourcen

      ArmA 3 Tutorials & Script Collection

      Renting & Operating Gameservers

      DayZ Server Management & Help

      FiveM (GTA V) Server & Script Development

      Rust Server Modding & Administration

      Setting up & Optimizing ARK Survival Servers

    NodeZone.net – Deine Community für Gameserver, Server-Hosting & Modding

      NodeZone.net ist dein Forum für Gameserver-Hosting, Rootserver, vServer, Webhosting und Modding. Seit 2015 bietet unsere Community eine zentrale Anlaufstelle für Server-Admins, Gamer und Technikbegeisterte, die sich über Server-Management, Hosting-Lösungen und Spielemodding austauschen möchten.


      Ob Anleitungen für eigene Gameserver, Hilfe bei Root- und vServer-Konfigurationen oder Tipps zu Modding & Scripting – bei uns findest du fundiertes Wissen und praxisnahe Tutorials. Mit einer stetig wachsenden Community findest du hier Antworten auf deine Fragen, Projektpartner und Gleichgesinnte für deine Gaming- und Serverprojekte. Schließe dich NodeZone.net an und werde Teil einer aktiven Community rund um Server-Hosting, Gameserver-Management und Modding-Ressourcen.

    Wer jetzt nicht teilt ist selber Schuld:
    1. Nutzungsbestimmungen
    2. Datenschutzerklärung
    3. Impressum
    4. Urheberrechts- oder Lizenzverstoß melden
  • Trimax Design coded & layout by Gino Zantarelli 2023-2025©
    Community-Software: WoltLab Suite™