Hallo!
Ich versuche ein HUD für meinen Server zu machen.
Ich habe versucht die Vorlage von H8terHud zu verwenden.
Leider funktioniert das nicht und ich weiß wirklich nicht mehr weiter.
(Die Datenbank abfrage funktioniert, ist bereits durch test Dialog getestet)
Code: hudtest.hpp
class RscTitles
{
class Default
{
idd = -1;
fadein = 0;
fadeout = 0;
duration = 0;
};
class H8erHUD
{
idd = 1000000;
movingEnable = 0;
enableSimulation = 1;
enableDisplay = 1;
duration = 99999;
fadein = 0.1;
fadeout = 2;
name = "H8erHUD";
onLoad = "with uiNameSpace do { H8erHUD = _this select 0 }";
class controls
{
class HUD_1
{
access = 0;
type = 13;
idc = 1002;
style = 0x00;
text = ""; //--- ToDo: Localize;
x = 0.597969 * safezoneW + safezoneX;
y = 0.962 * safezoneH + safezoneY;
w = 0.0567187 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0,0,0,0};
};
class HUD_2
{
access = 0;
type = 13;
idc = 1003;
style = 0x00;
text = ""; //--- ToDo: Localize;
x = 0.665 * safezoneW + safezoneX;
y = 0.962 * safezoneH + safezoneY;
w = 0.0567187 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0,0,0,0};
};
class HUD_3
{
access = 0;
type = 13;
idc = 1004;
style = 0x00;
text = ""; //--- ToDo: Localize;
x = 0.732031 * safezoneW + safezoneX;
y = 0.962 * safezoneH + safezoneY;
w = 0.0567187 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0,0,0,0};
};
class HUD_4
{
access = 0;
type = 13;
idc = 1005;
style = 0x00;
text = ""; //--- ToDo: Localize;
x = 0.809375 * safezoneW + safezoneX;
y = 0.962 * safezoneH + safezoneY;
w = 0.0567187 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0,0,0,0};
};
};
};
};
Alles anzeigen
Code: callResource.sqf
disableSerialization;
1 cutRsc ["H8erHUD","PLAIN"];
_kills = (player getVariable ["Speedo_fnc_getVars",[0]]) select 0;
_deaths = (player getVariable ["Speedo_fnc_getVars",[0,0]]) select 1;
_exp = (player getVariable ["Speedo_fnc_getVars",[0,0,0]]) select 2;
_lvl = (player getVariable ["Speedo_fnc_getVars",[0,0,0,0]]) select 3;
waitUntil {!isNull (uiNameSpace getVariable "H8erHUD")};
_display = uiNameSpace getVariable "H8erHUD";
_setText = _display displayCtrl 1002;
_setText ctrlSetStructuredText (parseText format ["Kills: %1",_kills]);
_setText1 = _display displayCtrl 1003;
_setText1 ctrlSetStructuredText (parseText format ["Deaths: %1",_deaths]);
_setText2 = _display displayCtrl 1004;
_setText2 ctrlSetStructuredText (parseText format ["XP: %1",_exp]);
Alles anzeigen
Ich brauche bitte hilfe, bin mit meinem Wissen am ende.
LG