Need help?
Create a topic in the appropriate section
Don't write everything in the chat!Take a look at the marketplace
There you can buy
everything related to game serversDon't want a ban?
Please read our rules
Don't disturb the order!Sell or buy?
Use services of the guarantor
We will make your deal safe
- 0
-
Similar Content
-
By Mozart
Доброго времени суток , пытаюсь сделать простенький HUD для вывода параметров жизнедеятельности еда вода здоровье и тд . Собственно в чем вопрос, как его обернуть в графическую оболочку? например покрасить каждый параметр в свой собственный цвет, задать обводку, или сгруппировать их друг под друга? может сталкивался кто с таким вопросом? буду благодарен за любую наводку!
Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
-
By ZizionarD
Описание:
Данный скрипт добавляет HUD в левый нижний угол. В нем вы можете увидеть 5 или 4 предмета (в зависимости от конфигурации) с основным оружием, вашем вторичным оружием, обезболивающим и бинтом, так же используются горячих клавиш которые можно использовать чтобы активировать каждый предмет.
Установка:
На чистый сервер
1. Скачать архив CUSTOMWEAPONHUD-MASTER.ZIP
2. Разархивировать скаченный архив
3. Папки dayz_code и rlnt, а так же файлы description.ext и init.sqf поместить в корень папки миссии
4. Если у вас не стоит InfiStar, то шаг 4 и 5, если у вас стоит InfiStar, то в файле AHconfig.sqf добавить 7000,7001,7002,7003 в массиве "_ALLOWED_Dialogs"
5. В файле AT.sqf найдите:
if(_key == 0x05)then{call admin_fly_up;}; if(_key == 0x06)then{call admin_tpdirection;}; и замените их на:
if(_key == 0x09)then{call admin_fly_up;}; if(_key == 0x0A)then{call admin_tpdirection;}; Найдите:
adminadd = adminadd + [" 4 - Fly Up","","0","1","0","0",[]]; adminadd = adminadd + [" 5 - TP LookingDirection","","0","1","0","0",[]]; и замените на:
adminadd = adminadd + [" 8 - Fly Up","","0","1","0","0",[]]; adminadd = adminadd + [" 9 - TP LookingDirection","","0","1","0","0",[]]; 6. Вот и все.
На измененный сервер
1. Скачать архив CUSTOMWEAPONHUD-MASTER.ZIP
2. Разархивировать скаченный архив
3. В корне миссии открыть файл init.sqf и найти:
DZE_selfTransfuse_Values = [12000,15,120]; после этой строки добавить:
DZE_TwoPrimaries = 2; //Copy this only if you don't have it yet DZE_weaponHUD = true; /* RLNT - WeaponHUD */ Далее найти:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; После добавить:
call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf"; call compile preprocessFileLineNumbers "rlnt\client\init\compiles.sqf"; /* RLNT - Relentless */ Далее найти:
if (isServer) then { if (dayz_POIs && (toLower worldName == "chernarus")) then {call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\mission\chernarus\poi\init.sqf";}; call compile preprocessFileLineNumbers "\z\addons\dayz_server\system\dynamic_vehicle.sqf"; call compile preprocessFileLineNumbers "\z\addons\dayz_server\system\server_monitor.sqf"; execVM "\z\addons\dayz_server\traders\chernarus11.sqf"; //Add trader agents //Get the server to setup what waterholes are going to be infected and then broadcast to everyone. if (dayz_infectiousWaterholes && (toLower worldName == "chernarus")) then {execVM "\z\addons\dayz_code\system\mission\chernarus\infectiousWaterholes\init.sqf";}; // Lootable objects from CfgTownGeneratorDefault.hpp if (dayz_townGenerator) then { execVM "\z\addons\dayz_code\system\mission\chernarus\MainLootableObjects.sqf"; }; }; после добавить:
if (!isServer) then { //RLNT - Relentless execVM "rlnt\scripts\Weapon HUD\weaponhud_init.sqf"; /* RLNT - WeaponHUD */ }; 4. Открыть файл description.ext и найти:
#include "\z\addons\dayz_code\gui\description.hpp" заменить ее на:
#include "dayz_code\gui\description.hpp" #include "rlnt\dialogs\rlnt_defines.hpp" /* RLNT - WeaponHUD */ class RscTitles { #include "rlnt\dialogs\rlnt_weaponhud.hpp" /* RLNT - WeaponHUD */ class wm_disp { idd = -1; onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]"; fadein = 0; fadeout = 0; duration = 10e10; controlsBackground[] = {}; objects[] = {}; class controls { class wm_text2 { idc = 1; x = safeZoneX+0.027; y = safeZoneY+safeZoneH-0.16; w = 0.151*safeZoneH; h = 0.057*safeZoneH; shadow = 2; class Attributes { font = "EtelkaNarrowMediumPro"; color = "#24FFFFFF"; align = "left"; valign = "middle"; shadow = 2; }; colorBackground[] = { 1, 0.3, 0, 0 }; font = "EtelkaNarrowMediumPro"; size = 0.06*safeZoneH; type = 13; style = 0; text=""; }; }; }; }; 5. Папки dayz_code и rlnt залить в корень миссии
6. Если у вас уже используется кастомный файл keyboard.sqf то найдите в нем:
_rifle = { 2 call dz_fn_switchWeapon; _handled = true; }; _pistol = { 3 call dz_fn_switchWeapon; _handled = true; }; _melee = { // Also works for rifle on back if DZE_TwoPrimaries = 2; 4 call dz_fn_switchWeapon; _handled = true; }; _throwable = { // select next non empty throwable weapon if (vehicle player == player) then { _ammo_throwable = []; _muzzles_throwable = []; _weapon_throwable = []; { _weapon = _x; _muzzles = getArray(configFile >> "cfgWeapons" >> _weapon >> "muzzles"); if (count _muzzles == 0) then { _muzzles = [_weapon ]; }; { _muzz = _x; { if (_x in magazines player) then { _ammo_throwable set [ count _ammo_throwable, getText(configFile >> "cfgMagazines" >> _x >> "ammo") ]; _muzzles_throwable set [ count _muzzles_throwable, _muzz ]; _weapon_throwable set [ count _weapon_throwable, _weapon ]; }; } forEach getArray(configFile >> "cfgWeapons" >> _weapon >> _muzz >> "magazines"); } forEach _muzzles; } forEach ["Throw"]; _magCount = count _ammo_throwable; if (_magCount > 0) then { if (isNil "KB_CurrentThrowable") then { KB_CurrentThrowable = -1; }; _currentAmmo = (weaponState player) select 3; _idx = _ammo_throwable find _currentAmmo; if (_idx >= 0) then { KB_CurrentThrowable = _idx; }; KB_CurrentThrowable = (KB_CurrentThrowable + 1) mod _magCount; player selectWeapon (_muzzles_throwable select KB_CurrentThrowable); _handled = true; }; }; }; и замените на:
_rifle1 = { 2 call dz_fn_switchWeapon; _handled = true; }; _rifle2 = { 4 call dz_fn_switchWeapon; _handled = true; }; _pistol = { 3 call dz_fn_switchWeapon; _handled = true; }; _painkiller = { [0,0,0,[player]] execVM "rlnt\scripts\Weapon HUD\actions\rlnt_painkiller.sqf"; _handled = true; }; _bandage = { [0,0,0,[player]] execVM "rlnt\scripts\Weapon HUD\actions\rlnt_bandage.sqf"; _handled = true; }; найдите:
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray; и замените на:
DIK_8,DIK_7,DIK_6], _block] call _addArray; найдите строчку:
if (!isNil "bis_fnc_halo_keydown_eh") then {bis_fnc_halo_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_keydown;"];}; // halo in progress и удалите ее.
7. Если у вас не стоит InfiStar, то шаг 4 и 5, если у вас стоит InfiStar, то в файле AHconfig.sqf добавить 7000,7001,7002,7003 в массиве "_ALLOWED_Dialogs"
8. В файле AT.sqf найдите:
if(_key == 0x05)then{call admin_fly_up;}; if(_key == 0x06)then{call admin_tpdirection;}; и замените их на:
if(_key == 0x09)then{call admin_fly_up;}; if(_key == 0x0A)then{call admin_tpdirection;}; Найдите:
adminadd = adminadd + [" 4 - Fly Up","","0","1","0","0",[]]; adminadd = adminadd + [" 5 - TP LookingDirection","","0","1","0","0",[]]; и замените на:
adminadd = adminadd + [" 8 - Fly Up","","0","1","0","0",[]]; adminadd = adminadd + [" 9 - TP LookingDirection","","0","1","0","0",[]]; 9. Вот и все.
TODO:
18.06.18 - Обновление ссылок
-
By MrMiBl
Чёт не могу понять, как вписать температуру в этот дебаг?
private ["_display","_symbol","_percent","_stats","_time", "_hours", "_minutes", "_pic", "_coins","_bloodlvl","_dir","_d","_txt","_nearestCity","_textCity","_thirst ","_thirststat ","_hunger ","_hungerstat ","_servername","_spacer","_img","_primary"]; disableSerialization; //--------------------------------------------------------------------------------------------// _display = uiNameSpace getVariable "DEBUGMONITOR"; _stats = _display displayCtrl 9000; //--------------------------------------------------------------------------------------------// _servername = "Название"; _spacer = "-------------------------------------"; _symbol = "°"; _percent = "%"; //--------------------------------------------------------------------------------------------// while {1 == 1} do { _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],800]; _textCity = "Wilderness"; if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)}; _img = (getText (configFile >> 'CfgVehicles' >> (typeOf vehicle player) >> 'picture')); if(player == vehicle player)then{ _img = (getText (configFile >> 'CfgWeapons' >> (currentWeapon player) >> 'picture')); }else{ _img = (getText (configFile >> 'CfgVehicles' >> (typeOf vehicle player) >> 'picture')); }; _time = (round(180-(serverTime)/60)); _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"}; }; _d = getdir player; if (_d >= 337.5 || _d < 22.5) then {_dir = "North";}; if (_d >= 292.5 && _d < 337.5) then {_dir = "NWest";}; if (_d >= 247.5 && _d < 292.5) then {_dir = "West";}; if (_d >= 202.5 && _d < 247.5) then {_dir ="SWest";}; if (_d >= 157.5 && _d < 202.5) then {_dir ="South";}; if (_d >= 112.5 && _d < 157.5) then {_dir ="SE";}; if (_d >= 67.5 && _d < 112.5) then {_dir ="East";}; if (_d >= 22.5 && _d < 67.5) then {_dir ="NEast";}; _hunger = round(100 - (dayz_hunger / SleepFood) * 100); _thirst = round(100 - (dayz_thirst / SleepWater) * 100); _bloodlvl = round((r_player_blood / r_player_bloodTotal) * 100); //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------// _txt = format ["<br/><t size='1.5' font='Zeppelin32' align='center' color='#A81E13'>%1</t><br/><br/>", _servername]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Zombies Killed: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", player getVariable['zombieKills', 0]]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Survivors Killed: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", player getVariable['humanKills', 0]]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Bandits Killed: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", player getVariable['banditKills', 0]]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Humanity: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", round(player getVariable['humanity', 0])]; /*-----------*/ _txt = _txt + format ["<t size='1' font='Zeppelin32' align='left' color='#CCCCCC'>%1</t><br/>", _spacer]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Zombies: </t><t size='1.2' font='Zeppelin32' align='left' color='#FFFFFF'>%1</t>", count entities "zZombie_Base"]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='right' color='#E5E5E5'>Players: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", count playableUnits]; /*-----------*/ _txt = _txt + format ["<t size='1' font='Zeppelin32' align='left' color='#CCCCCC'>%1</t><br/>", _spacer]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='center' color='#E5E5E5'>Blood: </t><t size='1.2' font='Zeppelin32' align='center' color='#FFFFFF'>%1%2</t><br/>", _bloodlvl, _percent]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Hunger: </t><t size='1.1' font='Zeppelin32' align='left' color='#FFFFFF'>%1%2</t>", _hunger, _percent]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='right' color='#E5E5E5'>Thirst: </t><t size='1.1' font='Zeppelin32' align='right' color='#FFFFFF'>%1%2</t><br/>", _thirst, _percent]; /*-----------*/ _txt = _txt + format ["<t size='1' font='Zeppelin32' align='left' color='#CCCCCC'>%1</t><br/>", _spacer]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>%1</t>", _textcity]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='right' color='#E5E5E5'>%1%2 %3</t><br/>", round (getDir vehicle player),_symbol, _dir]; _txt = _txt + format ["<img size='4.5' align='center' image='%1' /><br/>", _img]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>GPS: </t><t size='1.2' font='Zeppelin32' align='left' color='#FFFFFF'>%1 </t>", (mapGridPosition getPos player)]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='right' color='#E5E5E5'>FPS: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", round diag_fps]; /*-----------*/ _txt = _txt + format ["<t size='1' font='Zeppelin32' align='left' color='#CCCCCC'>%1</t><br/>", _spacer]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#E5E5E5'>Coins: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", player getVariable[Z_MoneyVariable,0]]; // _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='left' color='#D0F000'>Bank: </t><t size='1.2' font='Zeppelin32' align='right' color='#FFFFFF'>%1</t><br/>", player getVariable[Z_bankVariable,0]]; /*-----------*/ _txt = _txt + format ["<t size='1' font='Zeppelin32' align='left' color='#CCCCCC'>%1</t><br/>", _spacer]; _txt = _txt + format ["<t size='1.2' font='Zeppelin32' align='center' color='#E5E5E5'>Restart in: </t><t size='1.2' font='Zeppelin32' align='center' color='#FFFFFF'>%1:%2</t><br/>", _hours, _minutes]; //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------// _stats ctrlSetStructuredText parseText _txt; uiSleep 2; }; Подскажите пж
-
-
Our picks
И снова здравствуйте! На сей раз такая проблема. После переноса сборки на HUD от Origins(есть гайд на форуме), постоянно активны следующии иконки:
Share this post
Link to post
Share on other sites