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
Fr: 06 Juni 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

    Verkausshop erstellen ?

    • AvirexDE
    • 31. Oktober 2017 um 12:32
    • Geschlossen
    • Erledigt
    • AvirexDE
      Meister
      Reaktionen
      784
      Beiträge
      1.917
      Dateien
      1
      Bilder
      39
      • 31. Oktober 2017 um 12:32
      • #1

      Guten Morgen,

      ich würde gerne einen Ilegallen Waffenankäufer Shop machen. Wo man NUR sachen VERKAUFEN kann.

      Ich habe folgends schon probiert aber leider hat es nicht funktioniert.

      Code
      name = "Mohammadi's Illegaler Waffenankauf";
              side = "civ";
              conditions = "license_civ_rebel";
              items[] = {
                  { "hgun_Rook40_F", "", -1, 7500, "" },
                  { "hgun_Pistol_01_F", "", -1, 10000, "" },
                  { "hgun_Pistol_heavy_02_F", "", -1, 20150, "" }

      Ich dachte man kann es mit -1 verbieten zum kaufen, genau wie beim verkauf aber es klappt nicht. Man kann die waffen wie davor kaufen.

      Also wie unterbinde ich es das im Shop das Ladeninventar angezeigt wird da man ja nur dort Waffen verkaufen soll.

      Danke für die Hilfe;)

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      ▀ Freundliche Grüße ▀

      giphy.gif

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

    • Speedo
      Anfänger
      Reaktionen
      32
      Trophäen
      9
      Beiträge
      67
      • 31. Oktober 2017 um 12:59
      • #2

      Soweit ich das sehe klappt das mit dem -1 nur beim Verkaufen. Du musst warscheinlich dafür die fn_virt_update.sqf anpassen. Dort steht z.B. das wenn der Preis -1 ist das Item garnicht geladen wird.

      Mit freundlichen Grüßen

      Speedo

      Kontaktdaten

      Ts3: ts3.project-valkyrie.eu

      Discord: Speedo#3492

      Sonstige Links

      Steam: http://steamcommunity.com/profiles/76561198131176226/

      Twitch: https://www.twitch.tv/speedo97

    • Brizi Jaeger
      Profi
      Reaktionen
      291
      Trophäen
      11
      Beiträge
      1.025
      • 31. Oktober 2017 um 13:01
      • #3

      Kopier die Daten die für einen Shop wichtig sind, bennene die um trage alle wieder ein erstell nen neuen Dialog ohne Kaufbutton würde ich machen wenn ich jz gar nicht wüsste wie das geht :P

    • moeck
      Erleuchteter
      Reaktionen
      632
      Trophäen
      9
      Beiträge
      3.160
      Bilder
      9
      • 31. Oktober 2017 um 13:07
      • #4

      Wie so blendest Du nicht einfach bei dem Laden den Kaufen Button aus ^^ , ich denke das wäre die einfachste Lösung

      Signatur? Was ist eine Signatur? Kann man das essen?

      Bitte beachten: Ich gebe keinen Support über private Nachrichten!


      Ganz wichtig: [Leitfaden] Wie frage Ich richtig um Hilfe?

      Nicht zu vergessen [Tutorial/Selbst-Test] Sollte ich einen Life Server eröffnen ?

    • AvirexDE
      Meister
      Reaktionen
      784
      Beiträge
      1.917
      Dateien
      1
      Bilder
      39
      • 31. Oktober 2017 um 13:12
      • #5
      Zitat von moeck

      Wie so blendest Du nicht einfach bei dem Laden den Kaufen Button aus ^^ , ich denke das wäre die einfachste Lösung

      Danke dir. Hab leider nicht nachgedacht :D

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      ▀ Freundliche Grüße ▀

      giphy.gif

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

    • AvirexDE
      Meister
      Reaktionen
      784
      Beiträge
      1.917
      Dateien
      1
      Bilder
      39
      • 31. Oktober 2017 um 14:48
      • #6
      Zitat von moeck

      Wie so blendest Du nicht einfach bei dem Laden den Kaufen Button aus ^^ , ich denke das wäre die einfachste Lösung

      Wo blende ich den den aus ?

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      ▀ Freundliche Grüße ▀

      giphy.gif

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

    • moeck
      Erleuchteter
      Reaktionen
      632
      Trophäen
      9
      Beiträge
      3.160
      Bilder
      9
      • 31. Oktober 2017 um 15:07
      • #7

      Also folgendes müsstest Du dafür tun.

      1. in Mission (sorry habe das gerade per Notepad++ aus der Mission geholt

      this addAction[localize ""STR_MAR_Rebel_Weapon_Shop"",life_fnc_weaponShopMenu,""sale"",0,false,false,"""",' license_civ_rebel && playerSide isEqualTo civilian'];

      Dann den Shop anlegen

      Code
      class sale {
              name = "Mohammadi's Illegaler Waffenankauf";
              side = "civ";
              conditions = "license_civ_rebel";
              items[] = {
                  { "arifle_TRG20_F", "", 0, 12500, "" },
                  { "arifle_Katiba_F", "", 0, 15000, "" },
                  { "srifle_DMR_01_F", "", 0, 25000, "" },
                  { "arifle_SDAR_F", "", 0, 10000, "" },
                  { "arifle_AK12_F", "", 0, 11000, "" }, //Apex DLC
                  { "arifle_AKS_F", "", 0, 11000, "" }, //Apex DLC
                  { "arifle_AKM_F", "", 0, 11000, "" }, //Apex DLC
                  { "arifle_ARX_blk_F", "", 0, 11000, "" }, //Apex DLC
                  { "arifle_SPAR_01_blk_F", "", 0, 16500, "" }, //Apex DLC
                  { "arifle_CTAR_blk_F", "", 0, 15000, "" } //Apex DLC
              };
          };
      Alles anzeigen

      Bin gerade am suchen wie der Shop in der 5.x funzt.

      Signatur? Was ist eine Signatur? Kann man das essen?

      Bitte beachten: Ich gebe keinen Support über private Nachrichten!


      Ganz wichtig: [Leitfaden] Wie frage Ich richtig um Hilfe?

      Nicht zu vergessen [Tutorial/Selbst-Test] Sollte ich einen Life Server eröffnen ?

    • moeck
      Erleuchteter
      Reaktionen
      632
      Trophäen
      9
      Beiträge
      3.160
      Bilder
      9
      • 31. Oktober 2017 um 15:15
      • #8

      schau mal in zeile 104. Damit sollte der Button nicht mehr funktionieren bei diesem Shop

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_weaponShopFilter.sqf
          Author: Bryan "Tonic" Boardwine
          Edit: Added level checks - BoGuu
      
          Description:
          Applies the filter selected and changes the list.
      */
      
      private _index = (lbCurSel 38402);
      private _shop = uiNamespace getVariable ["Weapon_Shop",""];
      
      if (_index isEqualTo -1 || {_shop isEqualTo ""}) exitWith {systemChat "Bad Data Filter"; closeDialog 0;}; //Bad data passing.
      
      uiNamespace setVariable ["Weapon_Shop_Filter",_index];
      //Setup List Control & Purge it.
      
      private _priceTag = ((findDisplay 38400) displayCtrl 38404);
      _priceTag ctrlSetStructuredText parseText "";
      
      private _itemList = ((findDisplay 38400) displayCtrl 38403);
      lbClear _itemList;
      
      private "_config";
      
      if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1 || {(uiNamespace getVariable ["Weapon_Accessories",0]) isEqualTo 1}) then {
      
          if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1) then {
          
              _config = M_CONFIG(getArray,"WeaponShops",_shop,"mags");
              {
                  _bool = [_x] call life_fnc_levelCheck;
                  if (_bool) then {
                      _x params ["_var"];
                      _count = {_x == _var} count (uiNamespace getVariable ["Magazine_Array",[]]);
                      if (_count > 0) then {
                          _itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
                          _itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
                          _itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
                          _itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
                      };
                  };
                  true
              } count _config;
              
              ((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Weapons";
              
              ctrlShow [38406,true];
              ctrlShow [38407,false];
              
          } else {
          
              _config = M_CONFIG(getArray,"WeaponShops",_shop,"accs");
              {
                  _bool = [_x] call life_fnc_levelCheck;
                  if (_bool) then {
                      _x params ["_var"];
                      _count = {_x == _var} count (uiNamespace getVariable ["Accessories_Array",[]]);
                      if (_count > 0) then {
                          _itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
                          _itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
                          _itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
                          _itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
                      };
                  };
                  true
              } count _config;
              
              ((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Weapons";
              
              ctrlShow [38406,false];
              ctrlShow [38407,true];
          };
      
          ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
          ctrlShow [38402,false];
      
      } else {
      
          switch (_index) do {
      
              case 0: {
                  _config = M_CONFIG(getArray,"WeaponShops",_shop,"items");
                  {
                      _bool = [_x] call life_fnc_levelCheck;
                      if (_bool) then {
                          _itemInfo = [_x select 0] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {_x select 1} else {_itemInfo select 1}];
                          _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
                          _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
                          _itemList lbSetValue[(lbSize _itemList)-1,_x select 2];
                      };
                      true
                  } count _config;
      
                  ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
                  ((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Mags";
                  ((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Accs";
                  
                  ctrlShow [38402,true];
                  if (_shop isEqualTo "sale") then {ctrlEnable [38405,false]};
                  ctrlShow [38406,true];
                  ctrlShow [38407,true];
              };
      
              case 1: {
                  _config = [];
                  private _listedItems = [];
                  //Go through weapons
                  if (primaryWeapon player != "") then {_config pushBack primaryWeapon player;};
                  if (secondaryWeapon player != "") then {_config pushBack secondaryWeapon player;};
                  if (handgunWeapon player != "") then {_config pushBack handgunWeapon player;};
      
                  //Go through items
                  _config = _config + primaryWeaponItems player;
                  _config = _config + (assignedItems player);
                  _config = _config + (uniformItems player);
                  _config = _config + (vestItems player);
                  _config = _config + (backpackItems player);
      
                  ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Sell";
                  ctrlShow [38402,true];
                  ctrlShow [38406,false];
                  ctrlShow [38407,false];
      
                  private _itemArray = [];
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"items");
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"mags");
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"accs");
                  {
                      _y = _x;
                      {
                          if (!(_x in _listedItems) && _x != "") then {
                              _iS = [_x,_y] call TON_fnc_index;
                              if !(_iS isEqualTo -1) then {
                              _z = _y select _iS;
                                  if (!((_z select 3) isEqualTo -1)) then {
      
                                      _bool = [_z] call life_fnc_levelCheck;
                                      if (_bool) then {
      
                                          _itemInfo = [_x] call life_fnc_fetchCfgDetails;
                                          _listedItems pushBack _x;
      
                                          _itemCount = {_x == (_itemInfo select 0)} count _config;
                                          if (_itemCount > 1) then {
                                              _itemList lbAdd format ["[%2] %1",_itemInfo select 1,_itemCount];
                                          } else {
                                              _itemList lbAdd format ["%1",_itemInfo select 1];
                                          };
                                          _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
                                          _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
      
      
                                      };
                                  };
                              };
                          };
                          true
                      } count _config;
                      true
                  } count _itemArray;
              };
          };
      };
      
      ((findDisplay 38400) displayCtrl 38403) lbSetCurSel 0;
      Alles anzeigen

      Ich hoffe ich habe den richtigen erwischt ^^

      Signatur? Was ist eine Signatur? Kann man das essen?

      Bitte beachten: Ich gebe keinen Support über private Nachrichten!


      Ganz wichtig: [Leitfaden] Wie frage Ich richtig um Hilfe?

      Nicht zu vergessen [Tutorial/Selbst-Test] Sollte ich einen Life Server eröffnen ?

    • AvirexDE
      Meister
      Reaktionen
      784
      Beiträge
      1.917
      Dateien
      1
      Bilder
      39
      • 31. Oktober 2017 um 15:41
      • #9

      moeck gute Idee ich danke dir, aber der Verkauf-Button geht somit auch nicht mehr :rolleyes:

      Kann man das nicht ausstellen das er das Normale Shop Inventar aufruft , sondern nur dein eigenes Inventar.

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      ▀ Freundliche Grüße ▀

      giphy.gif

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      Einmal editiert, zuletzt von AvirexDE (31. Oktober 2017 um 15:57)

    • moeck
      Erleuchteter
      Reaktionen
      632
      Trophäen
      9
      Beiträge
      3.160
      Bilder
      9
      • 31. Oktober 2017 um 16:02
      • #10

      hier mal noch die änderung, damit sollte es gehen, das entfernen des Kaufens geht sonst leider nicht so ohne.

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_weaponShopFilter.sqf
          Author: Bryan "Tonic" Boardwine
          Edit: Added level checks - BoGuu
      
          Description:
          Applies the filter selected and changes the list.
      */
      
      private _index = (lbCurSel 38402);
      private _shop = uiNamespace getVariable ["Weapon_Shop",""];
      
      if (_index isEqualTo -1 || {_shop isEqualTo ""}) exitWith {systemChat "Bad Data Filter"; closeDialog 0;}; //Bad data passing.
      
      uiNamespace setVariable ["Weapon_Shop_Filter",_index];
      //Setup List Control & Purge it.
      
      private _priceTag = ((findDisplay 38400) displayCtrl 38404);
      _priceTag ctrlSetStructuredText parseText "";
      
      private _itemList = ((findDisplay 38400) displayCtrl 38403);
      lbClear _itemList;
      
      private "_config";
      
      if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1 || {(uiNamespace getVariable ["Weapon_Accessories",0]) isEqualTo 1}) then {
      
          if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1) then {
          
              _config = M_CONFIG(getArray,"WeaponShops",_shop,"mags");
              {
                  _bool = [_x] call life_fnc_levelCheck;
                  if (_bool) then {
                      _x params ["_var"];
                      _count = {_x == _var} count (uiNamespace getVariable ["Magazine_Array",[]]);
                      if (_count > 0) then {
                          _itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
                          _itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
                          _itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
                          _itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
                      };
                  };
                  true
              } count _config;
              
              ((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Weapons";
              
              ctrlShow [38406,true];
              ctrlShow [38407,false];
              
          } else {
          
              _config = M_CONFIG(getArray,"WeaponShops",_shop,"accs");
              {
                  _bool = [_x] call life_fnc_levelCheck;
                  if (_bool) then {
                      _x params ["_var"];
                      _count = {_x == _var} count (uiNamespace getVariable ["Accessories_Array",[]]);
                      if (_count > 0) then {
                          _itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
                          _itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
                          _itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
                          _itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
                      };
                  };
                  true
              } count _config;
              
              ((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Weapons";
              
              ctrlShow [38406,false];
              ctrlShow [38407,true];
          };
      
          ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
          ctrlShow [38402,false];
      
      } else {
      
          switch (_index) do {
      
              case 0: {
                  _config = M_CONFIG(getArray,"WeaponShops",_shop,"items");
                  {
                      _bool = [_x] call life_fnc_levelCheck;
                      if (_bool) then {
                          _itemInfo = [_x select 0] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {_x select 1} else {_itemInfo select 1}];
                          _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
                          _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
                          _itemList lbSetValue[(lbSize _itemList)-1,_x select 2];
                      };
                      true
                  } count _config;
      
                  ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
                  ((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Mags";
                  ((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Accs";
                  
                  ctrlShow [38402,true];
                  if (_shop isEqualTo "sale") then {ctrlEnable [38405,false]};
                  ctrlShow [38406,true];
                  ctrlShow [38407,true];
              };
      
              case 1: {
                  _config = [];
                  private _listedItems = [];
                  //Go through weapons
                  if (primaryWeapon player != "") then {_config pushBack primaryWeapon player;};
                  if (secondaryWeapon player != "") then {_config pushBack secondaryWeapon player;};
                  if (handgunWeapon player != "") then {_config pushBack handgunWeapon player;};
      
                  //Go through items
                  _config = _config + primaryWeaponItems player;
                  _config = _config + (assignedItems player);
                  _config = _config + (uniformItems player);
                  _config = _config + (vestItems player);
                  _config = _config + (backpackItems player);
      
                  ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Sell";
                  ctrlShow [38402,true];
                  if (_shop isEqualTo "sale") then {ctrlEnable [38405,true]};
                  ctrlShow [38406,false];
                  ctrlShow [38407,false];
      
                  private _itemArray = [];
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"items");
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"mags");
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"accs");
                  {
                      _y = _x;
                      {
                          if (!(_x in _listedItems) && _x != "") then {
                              _iS = [_x,_y] call TON_fnc_index;
                              if !(_iS isEqualTo -1) then {
                              _z = _y select _iS;
                                  if (!((_z select 3) isEqualTo -1)) then {
      
                                      _bool = [_z] call life_fnc_levelCheck;
                                      if (_bool) then {
      
                                          _itemInfo = [_x] call life_fnc_fetchCfgDetails;
                                          _listedItems pushBack _x;
      
                                          _itemCount = {_x == (_itemInfo select 0)} count _config;
                                          if (_itemCount > 1) then {
                                              _itemList lbAdd format ["[%2] %1",_itemInfo select 1,_itemCount];
                                          } else {
                                              _itemList lbAdd format ["%1",_itemInfo select 1];
                                          };
                                          _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
                                          _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
      
      
                                      };
                                  };
                              };
                          };
                          true
                      } count _config;
                      true
                  } count _itemArray;
              };
          };
      };
      
      ((findDisplay 38400) displayCtrl 38403) lbSetCurSel 0;
      Alles anzeigen

      Signatur? Was ist eine Signatur? Kann man das essen?

      Bitte beachten: Ich gebe keinen Support über private Nachrichten!


      Ganz wichtig: [Leitfaden] Wie frage Ich richtig um Hilfe?

      Nicht zu vergessen [Tutorial/Selbst-Test] Sollte ich einen Life Server eröffnen ?

    • AvirexDE
      Meister
      Reaktionen
      784
      Beiträge
      1.917
      Dateien
      1
      Bilder
      39
      • 31. Oktober 2017 um 17:38
      • #11
      Zitat von moeck

      hier mal noch die änderung, damit sollte es gehen, das entfernen des Kaufens geht sonst leider nicht so ohne.

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_weaponShopFilter.sqf
          Author: Bryan "Tonic" Boardwine
          Edit: Added level checks - BoGuu
      
          Description:
          Applies the filter selected and changes the list.
      */
      
      private _index = (lbCurSel 38402);
      private _shop = uiNamespace getVariable ["Weapon_Shop",""];
      
      if (_index isEqualTo -1 || {_shop isEqualTo ""}) exitWith {systemChat "Bad Data Filter"; closeDialog 0;}; //Bad data passing.
      
      uiNamespace setVariable ["Weapon_Shop_Filter",_index];
      //Setup List Control & Purge it.
      
      private _priceTag = ((findDisplay 38400) displayCtrl 38404);
      _priceTag ctrlSetStructuredText parseText "";
      
      private _itemList = ((findDisplay 38400) displayCtrl 38403);
      lbClear _itemList;
      
      private "_config";
      
      if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1 || {(uiNamespace getVariable ["Weapon_Accessories",0]) isEqualTo 1}) then {
      
          if ((uiNamespace getVariable ["Weapon_Magazine",0]) isEqualTo 1) then {
          
              _config = M_CONFIG(getArray,"WeaponShops",_shop,"mags");
              {
                  _bool = [_x] call life_fnc_levelCheck;
                  if (_bool) then {
                      _x params ["_var"];
                      _count = {_x == _var} count (uiNamespace getVariable ["Magazine_Array",[]]);
                      if (_count > 0) then {
                          _itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
                          _itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
                          _itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
                          _itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
                      };
                  };
                  true
              } count _config;
              
              ((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Weapons";
              
              ctrlShow [38406,true];
              ctrlShow [38407,false];
              
          } else {
          
              _config = M_CONFIG(getArray,"WeaponShops",_shop,"accs");
              {
                  _bool = [_x] call life_fnc_levelCheck;
                  if (_bool) then {
                      _x params ["_var"];
                      _count = {_x == _var} count (uiNamespace getVariable ["Accessories_Array",[]]);
                      if (_count > 0) then {
                          _itemInfo = [(_x select 0)] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {(_x select 1)} else {(_itemInfo select 1)}];
                          _itemList lbSetData[(lbSize _itemList)-1,(_itemInfo select 0)];
                          _itemList lbSetPicture[(lbSize _itemList)-1,(_itemInfo select 2)];
                          _itemList lbSetValue[(lbSize _itemList)-1,(_x select 2)];
                      };
                  };
                  true
              } count _config;
              
              ((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Weapons";
              
              ctrlShow [38406,false];
              ctrlShow [38407,true];
          };
      
          ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
          ctrlShow [38402,false];
      
      } else {
      
          switch (_index) do {
      
              case 0: {
                  _config = M_CONFIG(getArray,"WeaponShops",_shop,"items");
                  {
                      _bool = [_x] call life_fnc_levelCheck;
                      if (_bool) then {
                          _itemInfo = [_x select 0] call life_fnc_fetchCfgDetails;
                          _itemList lbAdd format ["%1",if (!((_x select 1) isEqualTo "")) then {_x select 1} else {_itemInfo select 1}];
                          _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
                          _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
                          _itemList lbSetValue[(lbSize _itemList)-1,_x select 2];
                      };
                      true
                  } count _config;
      
                  ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Buy";
                  ((findDisplay 38400) displayCtrl 38406) ctrlSetText localize "STR_Global_Mags";
                  ((findDisplay 38400) displayCtrl 38407) ctrlSetText localize "STR_Global_Accs";
                  
                  ctrlShow [38402,true];
                  if (_shop isEqualTo "sale") then {ctrlEnable [38405,false]};
                  ctrlShow [38406,true];
                  ctrlShow [38407,true];
              };
      
              case 1: {
                  _config = [];
                  private _listedItems = [];
                  //Go through weapons
                  if (primaryWeapon player != "") then {_config pushBack primaryWeapon player;};
                  if (secondaryWeapon player != "") then {_config pushBack secondaryWeapon player;};
                  if (handgunWeapon player != "") then {_config pushBack handgunWeapon player;};
      
                  //Go through items
                  _config = _config + primaryWeaponItems player;
                  _config = _config + (assignedItems player);
                  _config = _config + (uniformItems player);
                  _config = _config + (vestItems player);
                  _config = _config + (backpackItems player);
      
                  ((findDisplay 38400) displayCtrl 38405) ctrlSetText localize "STR_Global_Sell";
                  ctrlShow [38402,true];
                  if (_shop isEqualTo "sale") then {ctrlEnable [38405,true]};
                  ctrlShow [38406,false];
                  ctrlShow [38407,false];
      
                  private _itemArray = [];
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"items");
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"mags");
                  _itemArray pushBack M_CONFIG(getArray,"WeaponShops",_shop,"accs");
                  {
                      _y = _x;
                      {
                          if (!(_x in _listedItems) && _x != "") then {
                              _iS = [_x,_y] call TON_fnc_index;
                              if !(_iS isEqualTo -1) then {
                              _z = _y select _iS;
                                  if (!((_z select 3) isEqualTo -1)) then {
      
                                      _bool = [_z] call life_fnc_levelCheck;
                                      if (_bool) then {
      
                                          _itemInfo = [_x] call life_fnc_fetchCfgDetails;
                                          _listedItems pushBack _x;
      
                                          _itemCount = {_x == (_itemInfo select 0)} count _config;
                                          if (_itemCount > 1) then {
                                              _itemList lbAdd format ["[%2] %1",_itemInfo select 1,_itemCount];
                                          } else {
                                              _itemList lbAdd format ["%1",_itemInfo select 1];
                                          };
                                          _itemList lbSetData[(lbSize _itemList)-1,_itemInfo select 0];
                                          _itemList lbSetPicture[(lbSize _itemList)-1,_itemInfo select 2];
      
      
                                      };
                                  };
                              };
                          };
                          true
                      } count _config;
                      true
                  } count _itemArray;
              };
          };
      };
      
      ((findDisplay 38400) displayCtrl 38403) lbSetCurSel 0;
      Alles anzeigen

      Ich danke dir moeck hat funktioniert.:thumbup: Thema kann geschlossen werden blackfisch  Shadow l Eagle

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

      ▀ Freundliche Grüße ▀

      giphy.gif

      ●●●▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄●●●

    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

    • 6 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™