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
Mo: 30 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

    Frage zu einer HUD

    • Montylein
    • 26. Februar 2017 um 02:27
    • Geschlossen
    • Erledigt
    • Montylein
      Fortgeschrittener
      Reaktionen
      127
      Trophäen
      11
      Beiträge
      363
      Dateien
      2
      Bilder
      7
      • 26. Februar 2017 um 02:27
      • #1

      Ich hab mir aus vielen Stücken eine Hud zusammen gebaut die rechts am aussenrand ist.

      es wird auch alles angezeigt so wie es soll.

      aber... Die Aktualiesiert sich sich und wen mann stirbt ist die Verschwunden.....

      Weiss einer woran sowas liegen kann?

      in den Log`s habe ich keine Fehler, und Die macht das was sie soll. die Info`s anzeigen wie Geld, Bank Guthaben, Hunger, Durst, Heilung, Cop auf Server , Civ auf Server, Medic auf Server

      Ich hab die eine Datei fn_hudUpdate in - core\funktion drin:

      Code
      #include "..\..\script_macros.hpp"
      /*
          File: fn_hudUpdate.sqf
          Author: Monty McBristle
      
      
      
      
          Description:
          Updates the HUD when it needs to.
      */
      private["_ui","_food","_water","_health","_weight","_money","_cash","_cop","_bank","_guthaben","_medic","_civ"];
      disableSerialization;
      _ui = uiNameSpace getVariable ["playerHUD",displayNull];
      if(isNull _ui) then {[] call life_fnc_hudSetup;};
      _food = _ui displayCtrl 23500;
      _water = _ui displayCtrl 23510;
      _health = _ui displayCtrl 23515;
      _weight = _ui displayCtrl 23520;
      _money = _ui displayCtrl 23525;
      _cash = life_cash;
      _cop = _ui displayCtrl 23530;
      _guthaben = life_atmbank;
      _bank = _ui displayCtrl 23535;
      _medic = _ui displayCtrl 23540;
      _civ = _ui displayCtrl 23545;
      //Update food
      _food ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.581];
      _food ctrlSetText format["%1", life_hunger];
      _food ctrlCommit 0;
      //Update Water
      _water ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.531];
      _water ctrlSetText format["%1", life_thirst];
      _water ctrlCommit 0;
      //Update Health
      _health ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.481];
      _health ctrlSetText format["%1", round((1 - (damage player)) * 100)];
      _health ctrlCommit 0;
      //Update weight
      _weight ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.430];
      _weight ctrlSetText format["%1 kg", life_carryWeight];
      _weight ctrlCommit 0;
      //Update Money
      _money ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.379];
      life_fnc_numberText]];
      if(_cash >= 1000000) then {
      	_cash = round(_cash / 1000000);
      	_money ctrlSetText format["%1", format["%1 M",[_cash] call life_fnc_numberText]];
      } else {
      	if(_cash >= 100000) then {
      		_cash = round(_cash / 1000);
      		_money ctrlSetText format["%1", format["%1 K",[_cash] call life_fnc_numberText]];
      	} else {
      	     _cash = round _cash;
      		_money ctrlSetText format["%1", format["%1",[_cash] call life_fnc_numberText]];
      	};
      };
      _money ctrlCommit 0;
      //Update bank
      _bank ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.329];
      if(_guthaben >= 1000000) then {
      	_guthaben = round(_guthaben / 1000000);
      	_bank ctrlSetText format["%1", format["%1 M",[_guthaben] call life_fnc_numberText]];
      } else {
      	if(_guthaben >= 100000) then {
      		_guthaben = round(_guthaben / 1000);
      		_bank ctrlSetText format["%1", format["%1 K",[_guthaben] call life_fnc_numberText]];
      	} else {
      	     _guthaben = round _guthaben;
      		_bank ctrlSetText format["%1", format["%1",[_guthaben] call life_fnc_numberText]];
      	};
      };
      _bank ctrlCommit 0;
      //Update cop
      _cop ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.277];
      _cop ctrlSetText format["%1", west countSide playableUnits];
      _cop ctrlCommit 0;
      //Update medic
      _medic ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.226];
      _medic ctrlSetText format["%1", independent countSide playableUnits];
      _medic ctrlCommit 0;
      //Update civ
      _civ ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.175];
      _civ ctrlSetText format["%1", civilian countSide playableUnits];
      _civ ctrlCommit 0;
      Alles anzeigen

      und im Verzeichnis dialog habe ich die hud_stats.hpp drin:

      Code
      /*
          File: hud_stats.sqf
          Author: Monty McBristle
      
      
      
      
          Description:
          Updates the HUD when it needs to.
      */
      
      
      
      
      class playerHUD
      	{
      	idd=-1;
      	movingEnable=0;
      		fadein=0;
      	duration = 10e10;
      		fadeout=0;
      	name="playerHUD";
      	onLoad="uiNamespace setVariable ['playerHUD',_this select 0]";
      	objects[]={};
      
      
      
      
      	class controlsBackground
      	{
      		class fondIcon : life_RscPicture
      		{
      			idc = -1;
      			text = "textures\hud.paa";
      			x = safeZoneX+safeZoneW-0.2;
      			y = safeZoneY+safeZoneH-0.58;
      			w = 0.21; h = 0.61;
      		};
      	};
      
      
      
      
      	class controls
      	{
      		class foodtext
      		{
      			type=0;
      			idc=23500;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      
      
      
      
      		class watertext
      		{
      			type=0;
      			idc=23510;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      
      
      
      
      		class healthtext
      		{
      			type=0;
      			idc=23515;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      
      
      
      
      		class weighttext
      		{
      			type=0;
      			idc=23520;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      
      
      
      
      		class moneytext
      		{
      			type=0;
      			idc=23525;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      		class coptext
      		{
      			type=0;
      			idc=23530;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      		class banktext
      		{
      			type=0;
      			idc=23535;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      		class medictext
      		{
      			type=0;
      			idc=23540;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      		class civtext
      		{
      			type=0;
      			idc=23545;
      			style=0;
      			x=-1;
      			y=-1;
      			w=0.3;
      			h=0.05;
      			sizeEx=0.03;
      			size=1;
      			font="PuristaSemibold";
      			colorBackground[]={0,0,0,0};
      			colorText[] = { 1 , 1 , 1 , 1 };
      			shadow=1;
      			text="";
      		};
      
      	};
      };
      Alles anzeigen


      Was ist da falsch, das die sich nicht Aktualisiert und nach sterben Verschwindet und nicht mehr zu sehen ist?


      Einmal editiert, zuletzt von Montylein (26. Februar 2017 um 05:28)

    • 0xBADC0DED
      Fortgeschrittener
      Reaktionen
      102
      Trophäen
      10
      Beiträge
      443
      • 26. Februar 2017 um 11:44
      • #2

      Du könntest in ein Skript spawnen mit waitUntil sobald sich einer der Werte des HUD aktualisiert und wenn das HUD displayNull hat.

    • Montylein
      Fortgeschrittener
      Reaktionen
      127
      Trophäen
      11
      Beiträge
      363
      Dateien
      2
      Bilder
      7
      • 26. Februar 2017 um 12:04
      • #3
      Code
      _ui = uiNameSpace getVariable ["playerHUD",displayNull];

      also null hat es..
      ok, aber wie und wo mach ich das mit dem script dann?

      Da denke ich sind meine Anfänger Kentnise zu wenig für, und wäre um jede Hilfe dankbar.

    • Brain O Conner
      Schüler
      Reaktionen
      8
      Trophäen
      9
      Beiträge
      167
      • 26. Februar 2017 um 17:05
      • #4
      Zitat von 0xBADC0DED

      Du könntest in ein Skript spawnen mit waitUntil sobald sich einer der Werte des HUD aktualisiert und wenn das HUD displayNull hat.

      was meinst du da mit direkt ?

      wie müsste man das machen ?


    • Montylein
      Fortgeschrittener
      Reaktionen
      127
      Trophäen
      11
      Beiträge
      363
      Dateien
      2
      Bilder
      7
      • 26. Februar 2017 um 19:44
      • #5

      ok, das mit der Hud das sie Direkt Aktualisiert habe ich hin bekommen... Geht nun mit der sache vom " spawnen mit waitUntil" ....

      Habe ich noch das Problem mit dem Respawn.....

      Wen mann Gestorben ist ist die HUD weg, und kommt erst wen mann Geld abgehoben hat oder sich Irgend was ändert.

      wie kann ich nun machen das die nach dem respawn nun auch direkt da ist?

    • 0xBADC0DED
      Fortgeschrittener
      Reaktionen
      102
      Trophäen
      10
      Beiträge
      443
      • 26. Februar 2017 um 20:06
      • #6

      An der playerRespawned.sqf (wenn die so heißt) vielleicht ein [] call life_fnc_hudSetup; oder so?

    • Montylein
      Fortgeschrittener
      Reaktionen
      127
      Trophäen
      11
      Beiträge
      363
      Dateien
      2
      Bilder
      7
      • 26. Februar 2017 um 20:29
      • #7

      ne klappt nicht

    Registrieren oder Einloggen

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

    Registrieren

    Ähnliche Themen

    • Nachfrage

      • Brain O Conner
      • 24. August 2017 um 22:14
      • Hilfeforum
    • Spieler Klamotten mit variable zuweisen möglich?

      • Monstersquad1
      • 17. August 2017 um 12:04
      • Hilfeforum
    • Dispatch im Tagebuch vom Briefing

      • ZanchezDE
      • 5. April 2017 um 21:42
      • Hilfeforum
    • Probleme mit der Datenbank (Gang)

      • Cetrux
      • 7. August 2017 um 17:58
      • Hilfeforum
    • ACE 3 Medical

      • Uncle Pennybags
      • 16. Dezember 2016 um 12:53
      • Hilfeforum
    • Türen/Tore mit einer Lizenz öffnen

      • ImAnonymAndU
      • 5. Juni 2017 um 00:09
      • Hilfeforum

    Benutzer online in diesem Thema

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