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
Sa: 17 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
    6. Archiv

    Brauche Hilfe bei einbinden in die Datenbank SCHLIEßFACH

    • chris89
    • 17. Mai 2016 um 06:13
    • Geschlossen
    • chris89
      Schüler
      Reaktionen
      15
      Trophäen
      10
      Beiträge
      108
      • 17. Mai 2016 um 06:13
      • #1

      Hallo zusammen,

      ich benötige Hilfe bei diesen Script.

      Ich möchte ein Schließfach erstellen in Game funktioniert alles soweit Menue usw geht auf etc.

      Mein Problem ist das einbinden in die Datenbank extDB2 brauche ich Hilfe bzw jemand die mir sagt wie.

      Ich stelle die Scripte hier rein das ihr euch mal rein lesen könnt.

      Ich bitte um Konstruktive Beiträge :)

      Brainfuck: SchliessfachMenu.hpp
      class SchliessfachMenu
      {
      	idd = 40000;
      	name = "SchliessfachMenu";
      	movingEnable = false;
      	enableSimulation = true;
      	class controlsBackground
      	{
      		class RscTitleBackground : life_RscText
      		{
      			colorBackground[] = {0, 0, 0, 1};
      			idc = -1;
      			x = 0.05;
      			y = 0.2;
      			w = 0.86;
      			h = (1 / 25);
      		};
      		class RscBackground : life_RscText
      		{
      			colorBackground[] = {0, 0, 0, 0.7};
      			idc = -1;
      			x = 0.05;
      			y = 0.2 + (11 / 250);
      			w = 0.86;
      			h = 0.7 - (22 / 250);
      		};
      		class RscTitleText : life_RscTitle
      		{
      			colorBackground[] = {0, 0, 0, 0};
      			idc = 40001;
      			text = "";
      			x = 0.05;
      			y = 0.2;
      			w = 0.7;
      			h = (1 / 25);
      		};
      		class VehicleWeight : RscTitleText
      		{
      			idc = 40004;
      			style = 1;
      			text = "";
      		};
      		class RscTrunkText : life_RscText
      		{
      			idc = -1;
      			colorBackground[] = {0, 0, 0, 0.7};
      			text = "Schliessfach";
      			sizeEx = 0.04;
      			x = 0.07; y = 0.25;
      			w = 0.4; h = 0.04;
      		};
      		class RscPlayerText : life_RscText
      		{
      			idc = -1;
      			colorBackground[] = {0, 0, 0, 0.7};
      			text = "$STR_Trunk_PInventory";
      			sizeEx = 0.04;
      			x = 0.49; y = 0.25;
      			w = 0.4; h = 0.04;
      		};	
      	};
      	class Controls
      	{
      		class TrunkGear : life_RscListBox
      		{
      			idc = 40002;
      			text = "";
      			sizeEx = 0.030;
      			x = 0.07; y = 0.29;
      			w = 0.4; h = 0.42;
      		};
      		class PlayerGear : life_RscListBox
      		{
      			idc = 40003;
      			text = "";
      			sizeEx = 0.030;
      			x = 0.49; y = 0.29;
      			w = 0.4; h = 0.42;
      		};
      		class TrunkEdit : life_RscEdit
      		{
      			idc = 40005;
      			text = "1";
      			sizeEx = 0.030;
      			x = 0.07; y = 0.72;
      			w = 0.4; h = 0.03;
      		};
      		class PlayerEdit : life_RscEdit
      		{
      			idc = 40006;
      			text = "1";
      			sizeEx = 0.030;
      			x = 0.49; y = 0.72;
      			w = 0.4; h = 0.03;
      		};
      		class TakeItem : life_RscButtonMenu
      		{
      			idc = -1;
      			text = "$STR_Trunk_Take";
      			colorBackground[] = {0, 0, 0, 0.7};
      			onButtonClick = "[] call life_fnc_schliessfach_TakeItem;";
      			x = 0.20; y = 0.78;
      			w = (6.25 / 40);
      			h = (1 / 25);
      		};
      		class StoreItem : life_RscButtonMenu
      		{
      			idc = -1;
      			text = "$STR_Trunk_Store";
      			colorBackground[] = {0, 0, 0, 0.7};
      			onButtonClick = "[] call life_fnc_schliessfach_StoreItem;";
      			x = 0.60; y = 0.78;
      			w = (6.25 / 40);
      			h = (1 / 25);
      		};
      		class ButtonClose : life_RscButtonMenu 
      		{
      			idc = -1;
      			shortcuts[] = {0x00050000 + 2};
      			text = "$STR_Global_Close";
      			onButtonClick = "closeDialog 0;";
      			x = 0.05;
      			y = 0.9 - (1 / 25);
      			w = (6.25 / 40);
      			h = (1 / 25);
      		};
      		class footer : life_RscText 
      		{
      			idc = -1;
      			text = "Random Text";
      			x = 0.3;
      			y = 0.9 - (1 / 25);
      			w = (8.25 / 30);
      			h = (1 / 25);
      		};
      		class footer2 : life_RscText 
      		{
      			idc = -1;
      			text = "Random Text";
      			x = 0.3;
      			y = 0.91;
      			w = (8.25 / 30);
      			h = (1 / 25);
      		};
      	};
      };
      Alles anzeigen


      Brainfuck: fn_schliessfach_StoreItem.sqf
      disableSerialization;
      _ctrl = lbData[40003,(lbCurSel 40003)];
      _num = ctrlText 40006;
      if(!([_num] call TON_fnc_isnumber)) exitWith {hint "Invalid Number format";};
      _num = parseNumber(_num);
      if(_num < 1) exitWith {hint "You can't enter anything below 1!";};
      _totalWeight = [schliessfach] call life_fnc_vehicleWeight;
      _itemWeight = ([_ctrl] call life_fnc_itemWeight) * _num;
      _veh_data = schliessfach getVariable ["Trunk",[[],0]];
      _inv = _veh_data select 0;
      	if(((_totalWeight select 1) + _itemWeight) > (_totalWeight select 0)) exitWith {hint "The vehicle is either full or cannot hold that much."};
      	if(!([false,_ctrl,_num] call life_fnc_handleInv)) exitWith {hint "Couldn't remove the items from your inventory to put in the vehicle.";};
      	_index = [_ctrl,_inv] call TON_fnc_index;
      	if(_index == -1) then
      	{
      		_inv pushBack [_ctrl,_num];
      	}
      		else
      	{
      		_val = _inv select _index select 1;
      		_inv set[_index,[_ctrl,_val + _num]];
      	};
      	schliessfach setVariable["Trunk",[_inv,(_veh_data select 1) + _itemWeight],false];
      	[schliessfach] call life_fnc_schliessfachfenster;
      Alles anzeigen
      Brainfuck: fn_schliessfachfenster.sqf
      /*
      	File: fn_vehInventory.sqf
      	Author: Bryan "Tonic" Boardwine
      	Description:
      	Used a refresher for the vehicle inventory / trunk menu items.
      */
      #include <macro.h>
      private["_veh","_tInv","_pInv","_veh_data"];
      _veh = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
      
      
      
      
      disableSerialization;
      
      
      
      
      _tInv = (findDisplay 40000) displayCtrl 40002;
      _pInv = (findDisplay 40000) displayCtrl 40003;
      lbClear _tInv;
      lbClear _pInv;
      
      
      
      
      _mWeight = 500000;
      
      
      
      
      _veh_data = [_mWeight,(schliessfach getVariable["Trunk",[[],0]]) select 1];
      
      
      
      
      
      
      
      ctrlSetText[40004,format[(localize "STR_MISC_Weight")+ " %1/%2",_veh_data select 1,_veh_data select 0]];
      _data = schliessfach getVariable ["Trunk",[]];
      if(count _data == 0) then 
      {
      	schliessfach setVariable["Trunk",[[],0],false];
      	_data = [];
      } 
      else 
      {
      	_data = _data select 0;
      };
      //Player Inventory Items
      {
      	_val = ITEM_VALUE(configName _x);
      	if(_val > 0) then {
      		_pInv lbAdd format["[%1] - %2",_val,localize (getText(_x >> "displayName"))];
      		_pInv lbSetData [(lbSize _pInv)-1,configName _x];
      		_icon = M_CONFIG(getText,"VirtualItems",configName _x,"icon");
      		if(!(EQUAL(_icon,""))) then {
      			_pInv lbSetPicture [(lbSize _pInv)-1,_icon];
      		};
      	};
      } foreach ("true" configClasses (missionConfigFile >> "VirtualItems"));
      
      
      
      
      
      
      
      //Trunk Inventory Items
      {
      	_name = M_CONFIG(getText,"VirtualItems",SEL(_x,0),"displayName");
      	_val = SEL(_x,1);
      	if(_val > 0) then {
      		_tInv lbAdd format["[%1] - %2",_val,localize _name];
      		_tInv lbSetData [(lbSize _tInv)-1,SEL(_x,0)];
      		_icon = M_CONFIG(getText,"VirtualItems",SEL(_x,0),"icon");
      		if(!(EQUAL(_icon,""))) then {
      			_tInv lbSetPicture [(lbSize _tInv)-1,_icon];
      		};
      	};
      } foreach _data;
      Alles anzeigen
      Brainfuck: fn_schliessfach_TakeItem.sqf
      /*
      	Chris
      */
      private["_ctrl","_num","_index","_data","_old","_value","_weight","_diff"];
      disableSerialization;
      if(isNull schliessfach OR !alive schliessfach) exitWith {hint localize "STR_MISC_VehDoesntExist"};
      if(!alive player) exitwith {closeDialog 0;};
      
      
      
      
      if((lbCurSel 40002) == -1) exitWith {hint localize "STR_Global_NoSelection";};
      
      
      
      
      _ctrl = lbData[40002,(lbCurSel 40002)];
      _num = ctrlText 40005;
      if(!([_num] call TON_fnc_isnumber)) exitWith {hint localize "STR_MISC_WrongNumFormat";};
      _num = parseNumber(_num);
      if(_num < 1) exitWith {hint localize "STR_MISC_Under1";};
      
      
      
      
      _index = [_ctrl,((schliessfach getVariable "Trunk") select 0)] call TON_fnc_index;
      _data = (schliessfach getVariable "Trunk") select 0;
      _old = schliessfach getVariable "Trunk";
      if(_index == -1) exitWith {};
      _value = _data select _index select 1;
      if(_num > _value) exitWith {hint localize "STR_MISC_NotEnough"};
      _num = [_ctrl,_num,life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff;
      if(_num == 0) exitWith {hint localize "STR_NOTF_InvFull"};
      _weight = ([_ctrl] call life_fnc_itemWeight) * _num;
      
      
      
      
      	if([true,_ctrl,_num] call life_fnc_handleInv) then
      	{
      		if(_num == _value) then
      		{
      			_data set[_index,-1];
      			_data = _data - [-1];
      		}
      			else
      		{
      			_data set[_index,[_ctrl,(_value - _num)]];
      		};
      		schliessfach setVariable["Trunk",[_data,(_old select 1) - _weight],false];
      		[schliessfach] call life_fnc_schliessfachfenster;
      	}
      		else
      	{
      		hint localize "STR_NOTF_InvFull";
      	};
      Alles anzeigen
      Brainfuck: fn_schliessfachoeffnen.sqf
      if(!createDialog "SchliessfachMenu") exitWith {hint localize "STR_MISC_DialogError";}; //Couldn't create the menu?
      disableSerialization;
      
      
      
      
      
      
      
      
      
      
      
      
      
      _mWeight = 500000;
      
      
      
      
      _veh_data = [_mWeight,(schliessfach getVariable["Trunk",[[],0]]) select 1];
      
      
      
      
      
      
      
      ctrlSetText[40004,format[(localize "STR_MISC_Weight")+ " %1/%2",_veh_data select 1,_veh_data select 0]];
      [schliessfach] call life_fnc_schliessfachfenster;
      Alles anzeigen
    • chris89
      Schüler
      Reaktionen
      15
      Trophäen
      10
      Beiträge
      108
      • 20. Mai 2016 um 11:27
      • #2

      Hat jemand eine Idee ???

    • nox 25. März 2023 um 00:47

      Hat das Thema aus dem Forum Hilfeforum - ArmA 3 nach Archiv verschoben.

    Registrieren oder Einloggen

    Du bist noch kein Mitglied von Native-Servers.com? Registriere dich kostenlos und werde Teil einer großartigen Community!

    Benutzerkonto erstellen

    Tags

    • Altis life 4.0
    • Schließfach

    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™