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
Do: 22 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

    Gas Station robbery aan news help

      • Altis Life
    • A r e a N
    • 20. August 2019 um 05:35
    • Erledigt
    • A r e a N
      Frischling
      Trophäen
      6
      Beiträge
      6
      • 20. August 2019 um 05:35
      • #1

      As in the picture below do I add my code and code ? I just want the message that the money was stolen after the robbery

      https://pasteboard.co/ItvydxW.jpg

      Code
      #include "..\..\script_macros.hpp"
      /*
      file: fn_robShops.sqf
      Author: MrKraken
      Description:
      Executes the rob shob action!
      */
      private["_shop","_robber","_action","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
      _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
      _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param;
      _action = [_this,2] call BIS_fnc_param;
      _rip = false;
      
      
      if (side _robber != civilian) exitWith { hint "You can not rob this Gas Station" };
      if (_robber distance _shop > 5) exitWith { hint "You need to be within 5m of the cashier to rob him!" };
      if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };
      if !(alive _robber) exitWith {};
      if (isNil {(group player) getVariable "gang_name"}) exitWith {hint localize "STR_ATM_NotInGang"};
      if (currentWeapon _robber isEqualTo "") exitWith { hint "you do not threaten me! Get out of here you hobo!" };
      if (_rip) exitWith { hint "Robbery already in progress" };
      if (west countSide playableUnits < (LIFE_SETTINGS(getNumber,"minimum_cop"))) exitWith {
          hint "There isnt enough Police to rob Gas Station!";
      };
      
      _rip = true;
      _kassa = 380000 + round(random 100000);
      _shop removeAction _action;
      _shop switchMove "AmovPercMstpSsurWnonDnon";
      _chance = random(100);
      
      if(_chance >= 10) then {
          hint "ALARM";
              [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",west];
              [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",civilian];
      };
      
      disableSerialization;
      71 cutRsc ["life_progress","PLAIN"];
      _ui = uiNameSpace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["Robbery in Progress, stay close (10m) (1%1)...","%"];
      _progress progressSetPosition 0.01;
      _cP = 0.0001;
      
      if(_rip) then {
          while{true} do {
          sleep 9*60;
          _cP = _cP + 0.01;
          _progress progressSetPosition _cP;
          _pgText ctrlSetText format["Robbery in Progress, stay close (10m) (%1%2)...",round(_cP * 100),"%"];
          _Pos = position player;
                  _marker = createMarker ["Marker200", _Pos];
                  "Marker200" setMarkerColor "ColorRed";
                  "Marker200" setMarkerText "!ATTENTION! robbery !ATTENTION!";
                  "Marker200" setMarkerType "mil_warning";
      
          if(_cP >= 1) exitWith {};
          if(_robber distance _shop > 10) exitWith { 
              deleteMarker "Marker200"; 
          };
      
          if!(alive _robber) exitWith {};
      };
      
      if!(alive _robber) exitWith { _rip = false; };
      if(_robber distance _shop > 10) exitWith {
          deleteMarker "Marker200"; 
          _shop switchMove ""; 
          hint "You need to stay within 10m to Rob registry!";
          71 cutText ["","PLAIN"]; 
          _rip = false; 
      };
      71 cutText ["","PLAIN"];
      
          titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText],"PLAIN"];
          deleteMarker "Marker200";
          life_nakitATP = life_nakitATP + _kassa;
          disableUserInput true;
          sleep 5;
          disableUserInput false;
          _rip = false;
          life_use_atm = false;
          sleep (30 + random(180));
          life_use_atm = true;
          if!(alive _robber) exitWith {};
          [getPlayerUID _robber,name _robber,"459"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
      };
      Alles anzeigen
    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 20. August 2019 um 14:10
      • #2

      Hi,

      i am a huge fan of DIY sooo.

      Code
      [_broadcastHeader,_broadcastMessage,profileName] remoteExec ['life_fnc_AAN',-2];

      Try a little bit with this code Snippet.

      That Snipped is from a standard Altis Life script.

      Its from the core\functions\fn_postNewsBroadcast.sqf.

      If you need help i will help you, but try some things out first.

      If i were you i would look at line 32-36.


      best regards

      Joe Barbaro

      Entwickler vom Arma 3 Batch Generator


    • A r e a N
      Frischling
      Trophäen
      6
      Beiträge
      6
      • 21. August 2019 um 17:55
      • #3
      Zitat von Joe Barbaro

      Hi,

      i am a huge fan of DIY sooo.

      Code
      [_broadcastHeader,_broadcastMessage,profileName] remoteExec ['life_fnc_AAN',-2];

      Try a little bit with this code Snippet.

      That Snipped is from a standard Altis Life script.

      Its from the core\functions\fn_postNewsBroadcast.sqf.

      If you need help i will help you, but try some things out first.

      If i were you i would look at line 32-36.


      best regards

      Joe Barbaro

      Alles anzeigen

      Like you said i Itried a few things but I couldn't do it yet. Canyou show me an example ?

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_postNewsBroadcast.sqf
          Author: Jesse "tkcjesse" Schultz
      
          Description:
          Handles actions after the broadcast button is clicked.
      */
      private ["_broadcastHeader","_broadcastMessage","_length","_badCharacter","_characterByte","_allowed","_allowedLength"];
      disableSerialization;
      _broadcastHeader = ctrlText (CONTROL(100100,100101));
      _broadcastMessage = ctrlText (CONTROL(100100,100102));
      _length = count (toArray (_broadcastHeader));
      _characterByte = toArray (_broadcastHeader);
      _allowed = toArray("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ");
      _allowedLength = LIFE_SETTINGS(getNumber,"news_broadcast_header_length");
      _badCharacter = false;
      
      if (_length > _allowedLength) exitWith {hint format [localize "STR_News_HeaderLength",_allowedLength];};
      
      {
          if (!(_x in _allowed)) exitWith {_badCharacter = true;};
      } forEach _characterByte;
      
      if (_badCharacter) exitWith {hint localize "STR_News_UnsupportedCharacter"};
      
      [_broadcastHeader,_broadcastMessage,profileName] remoteExec ['life_fnc_numberText',-2];
      titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText]
      
      CASH = CASH - LIFE_SETTINGS(getNumber,"news_broadcast_cost");
      [0] call SOCK_fnc_updatePartial;
      life_broadcastTimer = time;
      publicVariable "life_broadcastTimer";
      Alles anzeigen
    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 21. August 2019 um 18:55
      • #4

      U edited the wrong File.

      You should edit the Gas station Script.

      In line 32-36 you will see this:

      Code
      if(_chance >= 10) then {
       hint "ALARM";
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",west];
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",civilian];
      };

      This is the messaging Stuff from the Gas Station Script.

      Code
      if(_chance >= 10) then {
          ["Your Title Text", "Your Main Text"] remoteExec ["life_fnc_AAN", -2];
      };

      Try things out.

      If there are any furthur problems feel free to ask;)


      best regards

      Joe Barbaro

      Entwickler vom Arma 3 Batch Generator


    • A r e a N
      Frischling
      Trophäen
      6
      Beiträge
      6
      • 21. August 2019 um 19:54
      • #5
      Zitat von Joe Barbaro

      U edited the wrong File.

      You should edit the Gas station Script.

      In line 32-36 you will see this:

      Code
      if(_chance >= 10) then {
       hint "ALARM";
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",west];
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",civilian];
      };

      This is the messaging Stuff from the Gas Station Script.

      Code
      if(_chance >= 10) then {
          ["Your Title Text", "Your Main Text"] remoteExec ["life_fnc_AAN", -2];
      };

      Try things out.

      If there are any furthur problems feel free to ask;)


      best regards

      Joe Barbaro

      Alles anzeigen

      I know that. But that's not what we mean.

      Code
      if(_chance >= 10) then {
          hint "ALARM Casier";
          remoteExec ["life_fnc_AAN",-2];
       hint "ALARM";
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",west];
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",civilian];
      };

      I just want the AAN News to report the amount of money that comes out after a gas station is robbed. Not for start and I said the code below.

      Code
      line 77 ; titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText],"PLAIN"];
    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 21. August 2019 um 21:48
      • #6
      Zitat von A r e a N

      I know that. But that's not what we mean.

      Code
      if(_chance >= 10) then {
          hint "ALARM Casier";
          remoteExec ["life_fnc_AAN",-2];
       hint "ALARM";
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",west];
       [[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",civilian];
      };

      I just want the AAN News to report the amount of money that comes out after a gas station is robbed. Not for start and I said the code below.

      Code
      line 77 ; titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText],"PLAIN"];

      Yeah but when u put this into the ANN Function it´s not gonna work.

      You need to give the Script the right paramteres to work correct.

      Code
      [format["A Gas station has been robbed and the thieves got %1$ out of the cash register,[_kassa] call life_fnc_numberText]] remoteExec ["life_fnc_ANN",-2];


      best regards

      Joe Barbaro

      Entwickler vom Arma 3 Batch Generator


    • A r e a N
      Frischling
      Trophäen
      6
      Beiträge
      6
      • 22. August 2019 um 01:57
      • #7

      This time I tried to change the AAN.sqf key but this happened, but after the robbery. The money from the gas station after the robbery was not reflected in the news and did not happen.

      Code
      titleText[format["A Gas station has been robbed and the thieves got %1$ out of the cash register",[_kassa] call life_fnc_ANN",-2],"PLAIN"];

      ve

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_AAN.sqf
          Author: Karel Moricky
          Modified: Jesse "tkcjesse" Schultz
      
          Description:
          It's showtime!
      
          Parameter(s):
          _this select 0: STRUCTURED TEXT: Header text
          _this select 1: STRUCTURED TEXT: Bottom text (moving)
          _this select 2: PROFILENAME: Below Header text
      */
      private ["_header","_line","_sender","_display","_textHeader","_textLine","_textLinePos","_textClock"];
      _header = "Gas Station Robbery";
      _line = _this select 1;
      _sender = "AAN News";
      disableSerialization;
      
      if (!life_settings_enableNewsBroadcast || isStreamFriendlyUIEnabled) exitWith {};
      
      30 cutRsc ["rscAAN","plain"];
      _display = uiNamespace getVariable "BIS_AAN";
      _textHeader = _display displayCtrl 3001;
      _textHeader ctrlSetStructuredText parseText format [localize "STR_News_BroadcastedBy",_header,_sender];
      _textHeader ctrlCommit 0;
      
      _textLine = _display displayCtrl 3002;
      _textLine ctrlSetStructuredText parseText format ["                         %1                         %1                         %1                         %1",_line];
      _textLine ctrlCommit 0;
      _textLinePos = ctrlPosition _textLine;
      _textLinePos set [0,-100];
      _textLine ctrlSetPosition _textLinePos;
      _textLine ctrlCommit 1500;
      
      _textClock = _display displayctrl 3003;
      _textClock ctrlSetText ([daytime,"HH:MM"] call bis_fnc_timetostring);
      _textClock ctrlCommit 0;
      
      sleep 30;
      30 cutText ["","plain"];
      Alles anzeigen
      Spoiler anzeigen


    • Joe Barbaro
      Nerd
      Reaktionen
      199
      Trophäen
      8
      Beiträge
      688
      • 22. August 2019 um 07:23
      • #8
      Zitat von A r e a N

      This time I tried to change the AAN.sqf key but this happened, but after the robbery. The money from the gas station after the robbery was not reflected in the news and did not happen.

      Code
      titleText[format["A Gas station has been robbed and the thieves got %1$ out of the cash register",[_kassa] call life_fnc_ANN",-2],"PLAIN"];

      ve

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_AAN.sqf
          Author: Karel Moricky
          Modified: Jesse "tkcjesse" Schultz
      
          Description:
          It's showtime!
      
          Parameter(s):
          _this select 0: STRUCTURED TEXT: Header text
          _this select 1: STRUCTURED TEXT: Bottom text (moving)
          _this select 2: PROFILENAME: Below Header text
      */
      private ["_header","_line","_sender","_display","_textHeader","_textLine","_textLinePos","_textClock"];
      _header = "Gas Station Robbery";
      _line = _this select 1;
      _sender = "AAN News";
      disableSerialization;
      
      if (!life_settings_enableNewsBroadcast || isStreamFriendlyUIEnabled) exitWith {};
      
      30 cutRsc ["rscAAN","plain"];
      _display = uiNamespace getVariable "BIS_AAN";
      _textHeader = _display displayCtrl 3001;
      _textHeader ctrlSetStructuredText parseText format [localize "STR_News_BroadcastedBy",_header,_sender];
      _textHeader ctrlCommit 0;
      
      _textLine = _display displayCtrl 3002;
      _textLine ctrlSetStructuredText parseText format ["                         %1                         %1                         %1                         %1",_line];
      _textLine ctrlCommit 0;
      _textLinePos = ctrlPosition _textLine;
      _textLinePos set [0,-100];
      _textLine ctrlSetPosition _textLinePos;
      _textLine ctrlCommit 1500;
      
      _textClock = _display displayctrl 3003;
      _textClock ctrlSetText ([daytime,"HH:MM"] call bis_fnc_timetostring);
      _textClock ctrlCommit 0;
      
      sleep 30;
      30 cutText ["","plain"];
      Alles anzeigen
      Spoiler anzeigen


      Dude i sent you enough examples how to run remoteexec. Plus I told you to set the aan function to standard and remove all of your changes. So listen to me and use remoteexec the right way.

      Entwickler vom Arma 3 Batch Generator


    • A r e a N
      Frischling
      Trophäen
      6
      Beiträge
      6
      • 25. August 2019 um 14:03
      • #9
      Zitat von Joe Barbaro

      Dude i sent you enough examples how to run remoteexec. Plus I told you to set the aan function to standard and remove all of your changes. So listen to me and use remoteexec the right way.

      I'il try again

    Registrieren oder Einloggen

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

    Registrieren

    Benutzer online in diesem Thema

    • 1 Besucher

    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™