Hallo Nativ User,
ich habe eine Statusbar in meinem Server eingebaut nun lädt sie nicht mehr nach dem ich Essen und Trinken Anzeige einfügt habe wo kann der Fehler liegen ?
Habe diese Anleitung befolgt: KLICK
Hier die: statusBar.hpp
#define ST_RIGHT 0x01
class osefStatusBarAdmin {
idd = -1;
onLoad = "uiNamespace setVariable ['osefStatusBarAdmin', _this select 0]";
onUnload = "uiNamespace setVariable ['osefStatusBarAdmin', objNull]";
onDestroy = "uiNamespace setVariable ['osefStatusBarAdmin', objNull]";
fadein = 0;
fadeout = 0;
duration = 10e10;
movingEnable = 0;
controlsBackground[] = {};
objects[] = {};
class controls {
class statusBarText {
idc = 55554;
x = safezoneX;
y = safezoneY + safezoneH - 0.053;
w = safezoneW;
h = 0.06;
shadow = false;
//colorBackground[] = { 0.074, 0.082, 0.105, 0.85 };
font = "PuristaSemibold";
size = 0.032;
type = 13;
style = 2;
colorText[] = {1, 1, 1, 1};
text="Statusbar Lädt !!! WARTEN !!!";
class Attributes {
align="center";
color = "#ffffff";
font = "PuristaSemibold";
};
};
};
};
class osefStatusBar {
idd = -1;
onLoad = "uiNamespace setVariable ['osefStatusBar', _this select 0]";
onUnload = "uiNamespace setVariable ['osefStatusBar', objNull]";
onDestroy = "uiNamespace setVariable ['osefStatusBar', objNull]";
fadein = 0;
fadeout = 0;
duration = 10e10;
movingEnable = 0;
controlsBackground[] = {};
objects[] = {};
class controls {
class statusBarText {
idc = 55555;
x = safezoneX + safezoneW - 1.50;
y = safezoneY + safezoneH - 0.035;
w = 1.3;
h = 0.09;
shadow = false;
font = "PuristaSemibold";
size = 0.032;
type = 13;
style = 2;
colorText[] = {1, 1, 1, 1};
text="";
class Attributes {
align="left";
};
};
};
};
Hier die: statusBar.sqf
/*
Versão : 0.2
Nome : statusBar.sqf
Autor : Bosco
Data de Criação : 07/02/2016
Descrição : Barra de Status para Life,Wasteland,Epoch e Exile.
*/
waitUntil {!(isNull (findDisplay 46))};
disableSerialization;
_rscLayer = "osefStatusBarAdmin" call BIS_fnc_rscLayer;
_rscLayer cutRsc["osefStatusBarAdmin","PLAIN"];
[] spawn
{
uiSleep 5;
_colourDefault = parseText "#ffffff"; //Color Default
_colourExtra = parseText "#38bee1";
_colour108 = parseText "#FF7000";
_colour107 = parseText "#FF9000";
_colour106 = parseText "#FFBB00";
_colour105 = parseText "#FFCC00";
_colour104 = parseText "#81CCDD";
_colour103 = parseText "#33AACC";
_colour102 = parseText "#3388CC";
_colour101 = parseText "#3366CC";
_colour100 = parseText "#00FF00";
_colour90 = parseText "#98FB98";
_colour80 = parseText "#FFA07A";
_colour70 = parseText "#FFA500";
_colour60 = parseText "#FF8C00";
_colour50 = parseText "#FF6347";
_colour40 = parseText "#FF4500";
_colour30 = parseText "#FF0000";
_colour20 = parseText "#FF0000";
_colour10 = parseText "#FF0000";
_colour0 = parseText "#FF0000";
_colourDead = parseText "#1C1C1C";
_uid = getPlayerUID player;
while {true} do
{
uiSleep 1;
if(isNull ((uiNamespace getVariable "osefStatusBarAdmin")displayCtrl 55554)) then
{
diag_log "statusbar is null create";
disableSerialization;
_rscLayer = "osefStatusBarAdmin" call BIS_fnc_rscLayer;
_rscLayer cutRsc["osefStatusBarAdmin","PLAIN"];
};
_unit = _this select 0;
_damage = round ((1 - (damage player)) * 100);
_hunger = round ((life_hunger/100)) * 100);
_thirst = round ((life_thirst/100) * 100);
_dinheiro = [life_cash] call life_fnc_numberText;
_banco = [life_atmbank] call life_fnc_numberText;
_serverFPS = round diag_fps;
_grid = mapGridPosition player; _xx = (format[_grid]) select [0,3];
_yy = (format[_grid]) select [3,3];
_time = serverTime;
_hours = (floor(_time/60));
_minutes = (_time - (_hours * 60));
switch(_minutes) do
{
case 9: {_minutes = "09"};
case 8: {_minutes = "08"};
case 7: {_minutes = "07"};
case 6: {_minutes = "06"};
case 5: {_minutes = "05"};
case 4: {_minutes = "04"};
case 3: {_minutes = "03"};
case 2: {_minutes = "02"};
case 1: {_minutes = "01"};
case 0: {_minutes = "00"};
};
//Damage
_colourDamage = _colourDefault;
if(_damage >= 100) then{_colourDamage = _colour100;};
if((_damage >= 90) && (_damage < 100)) then {_colourDamage = _colour100;};
if((_damage >= 80) && (_damage < 90)) then {_colourDamage = _colour80;};
if((_damage >= 70) && (_damage < 80)) then {_colourDamage = _colour70;};
if((_damage >= 60) && (_damage < 70)) then {_colourDamage = _colour60;};
if((_damage >= 50) && (_damage < 60)) then {_colourDamage = _colour50;};
if((_damage >= 40) && (_damage < 50)) then {_colourDamage = _colour40;};
if((_damage >= 30) && (_damage < 40)) then {_colourDamage = _colour30;};
if((_damage >= 20) && (_damage < 30)) then {_colourDamage = _colour20;};
if((_damage >= 10) && (_damage < 20)) then {_colourDamage = _colour10;};
if((_damage >= 1) && (_damage < 10)) then {_colourDamage = _colour0;};
if(_damage < 1) then{_colourDamage = _colourDead;};
//Hunger
_colourHunger = _colourDefault;
if(_hunger >= 100) then {_colourHunger = _colour100;};
if((_hunger >= 90) && (_hunger < 100)) then {_colourHunger = _colour90;};
if((_hunger >= 80) && (_hunger < 90)) then {_colourHunger = _colour80;};
if((_hunger >= 70) && (_hunger < 80)) then {_colourHunger = _colour70;};
if((_hunger >= 60) && (_hunger < 70)) then {_colourHunger = _colour60;};
if((_hunger >= 50) && (_hunger < 60)) then {_colourHunger = _colour50;};
if((_hunger >= 40) && (_hunger < 50)) then {_colourHunger = _colour40;};
if((_hunger >= 30) && (_hunger < 40)) then {_colourHunger = _colour30;};
if((_hunger >= 20) && (_hunger < 30)) then {_colourHunger = _colour20;};
if((_hunger >= 10) && (_hunger < 20)) then {_colourHunger = _colour10;};
if((_hunger >= 1) && (_hunger < 10)) then {_colourHunger = _colour0;};
if(_hunger < 1) then {_colourHunger = _colourDead;};
//Thirst
_colourThirst = _colourDefault;
if(_thirst >= 100) then {_colourThirst = _colour100;};
if((_thirst >= 90) && (_thirst < 100)) then {_colourThirst = _colour90;};
if((_thirst >= 80) && (_thirst < 90)) then {_colourThirst = _colour80;};
if((_thirst >= 70) && (_thirst < 80)) then {_colourThirst = _colour70;};
if((_thirst >= 60) && (_thirst < 70)) then {_colourThirst = _colour60;};
if((_thirst >= 50) && (_thirst < 60)) then {_colourThirst = _colour50;};
if((_thirst >= 40) && (_thirst < 50)) then {_colourThirst = _colour40;};
if((_thirst >= 30) && (_thirst < 40)) then {_colourThirst = _colour30;};
if((_thirst >= 20) && (_thirst < 30)) then {_colourThirst = _colour20;};
if((_thirst >= 10) && (_thirst < 20)) then {_colourThirst = _colour10;};
if((_thirst >= 1) && (_thirst < 10)) then {_colourThirst = _colour0;};
if(_thirst < 1) then {_colourThirst = _colourDead;};
//Icons and position
((uiNamespace getVariable "osefStatusBarAdmin")displayCtrl 55554)ctrlSetStructuredText parseText
format["
<t color='%10'><img size='1.0' image='icons\jogadores.paa' color='%19'/> %2</t>
<t color='%10'><img size='1.0' image='icons\policia.paa' color='%19'/> %11</t>
<t color='%10'><img size='1.0' image='icons\resgate.paa' color='%19'/> %12</t>
<t color='%10'><img size='1.0' image='icons\desempenho.paa' color='%19'/> %4</t>
<t color='%10'><img size='1.0' image='icons\hunger.paa' color='%19'/> %13</t>
<t color='%10'><img size='1.0' image='icons\thirst.paa' color='%19'/> %14</t>
<t color='%10'><img size='1.0' image='icons\compass.paa' color='%19'/> %7</t>
<t color='%10'><img size='1.0' image='icons\health.paa' color='%19'/> %3%1</t>
<t color='%10'><img size='1.0' image='icons\bank.paa' color='%19'/> %8</t>
<t color='%10'><img size='1.0' image='icons\money.paa' color='%19'/> %10</t>
<t color='%10'><img size='1.0' image='icons\uptime.paa' color='%19'/> %9</t>",
//Position 2
"%",
civilian countSide playableUnits,
_damage,
_serverFPS,
_colourDefault,
_colourDamage,
_grid,
_banco,
_time,
_dinheiro,
west countSide playableUnits,
independent countSide playableUnits,
format["%1/%2",_xx,_yy],
_hunger,
_colourHunger,
_thirst,
_colourThirst,
_colourExtra
];
};
};
WO LIEGT DER FEHLER ???????