Hallo zusammen,
ich versuche gerade ein HUD Skript einzufügen. Da dies von einer französischen Seite ist und für eine alte Altis Life Version ist brauche ich dabei Hilfe.
Bis jetzt konnte ich alles einfügen nur der Teil mit der init.sqf komme ich nicht klar.
Ich müsste in der init.sqf im Main Folder der mission folgendes eintragen:
fnc_updateMiniMap = {
_map = _this select 0;
_map ctrlMapAnimAdd [0, 0.05, player];
ctrlMapAnimCommit _map;
};
waitUntil { time > 0 };
[ "ILFRMiniMap" ] call BIS_fnc_rscLayer ) cutRsc [ "ILFRMiniMapShow", "PLAIN", 1, false ];
};
Allerdings gibt es in der 5.0 keine init.sqf mehr in dem Verzeichnis. Ich bin mal dem Tipp von Kuchenplatte gefolgt und hab diese selbst erstellt und per #include in die description eingefügt.
An sich scheint es auch zu funktioneren dass er das lädt aber es kommt wieder so ein Fehler dass er auch in den Logs meint "Error with database connection". Und nein es liegt zu 100% an dem Skript. Entfernt und schon ist der Fehler weg.
Das Skript ist ingesamt so aufgebaut:
Server.Altis/Content/HUD/MiniMap.hpp
class ILFRMiniMapShow
{
idd = 20000;
duration = 1e10;
fadein = 0;
fadeout = 0;
class controlsBackground
{
class Map: Life_RscMapControl {
idc = 38555;
x = SafeZoneX + (41.0000000000001 / 1920) * SafeZoneW;
y = SafeZoneY + (823.96 / 1080) * SafeZoneH;
w = (345 / 1920) * SafeZoneW;
h = (180 / 1080) * SafeZoneH;
mapOrientation = 1;
mapCenterOnCamera = 1;
type = 101;
style = 48;
moveOnEdges = 0;
stickX[] = {0.20, {"Gamma", 1.00, 1.50} };
stickY[] = {0.20, {"Gamma", 1.00, 1.50} };
ptsPerSquareSea = 6;
ptsPerSquareTxt = 8;
ptsPerSquareCLn = 8;
ptsPerSquareExp = 8;
ptsPerSquareCost = 8;
ptsPerSquareFor = "4.0f";
ptsPerSquareForEdge = "10.0f";
ptsPerSquareRoad = 2;
ptsPerSquareObj = 10;
maxSatelliteAlpha = 10;
onDraw = "_this call fnc_updateMiniMap";
};
};
};
Alles anzeigen
Server.Altis/dialog/hud_stats.hpp
#define ST_CENTER 0x02
/*
Ishlava-Life.fr
Rykam Ishlava
2017
*/
class playerHUD {
idd = -1;
duration = 10e10;
movingEnable = 0;
fadein = 0;
fadeout = 0;
name = "playerHUD";
onLoad = "uiNamespace setVariable ['playerHUD',_this select 0]";
objects[] = {};
controls[] = {
Life_RscProgress_HUDFood,
Life_RscProgress_HUDWater,
Life_RscPictureCIconed
};
/* Progress Bars */
class LIFE_RscProgress_HUDCommon: Life_RscProgress {
colorFrame[] = {0, 0, 0, 0.8};
};
class Life_RscProgress_HUDFood: LIFE_RscProgress_HUDCommon {
idc = 2200;
colorBar[] = {0,0.50,0,0.65};
x = SafeZoneX + (41.0000000000001 / 1920) * SafeZoneW;
y = SafeZoneY + (1005.00084 / 1080) * SafeZoneH;
w = (345 / 1920) * SafeZoneW;
h = (12 / 1080) * SafeZoneH;
};
class Life_RscPictureCIconed: Life_RscPicture {
idc = 17950;
text = "VOTRE TEXTURE SERVEUR";
x = SafeZoneX + (1700.83333333333 / 1920) * SafeZoneW;
y = SafeZoneY + (890.8 / 1080) * SafeZoneH;
w = (195 / 1920) * SafeZoneW;
h = (180 / 1080) * SafeZoneH;
};
class Life_RscProgress_HUDWater: LIFE_RscProgress_HUDCommon {
idc = 2202;
colorBar[] = {0,0.25,0.65,0.65};
x = SafeZoneX + (41.0000000000001 / 1920) * SafeZoneW;
y = SafeZoneY + (1017 / 1080) * SafeZoneH;
w = (345 / 1920) * SafeZoneW;
h = (12 / 1080) * SafeZoneH;
};
};
Alles anzeigen
Server.Altis/description.ext
disableChannels[] = {{0,true,true},{1,false,true},{2,true,true}}; // Disabled text and voice for global, side, and command channels. Syntax: disableChannels[] = {{channelID<number>, disableChat<bool>, disableVoice<bool>}};
overviewText = "$STR_MISC_overviewText"; // Text to be displayed below the overviewPicture on the mission selection screen when the mission is available to play.
#include "config\Config_SpyGlass.hpp"
#include "CfgRemoteExec.hpp"
#include "dialog\MasterHandler.hpp"
#include "config\Config_Master.hpp"
#include "init.sqf"
class CfgServer {
DatabaseName = "altislife"; //Config name that'll be grep in the extdb-conf.ini. Default: [altislife]
DebugMode = 0; //Enable many server/hc debugging logs. Default: 0 (1 = Enabled / 0 = Disabled)
HeadlessSupport = 0; //Enable/Disable Headless client support. Default: 1 (1 = Enabled / 0 = Disabled)
/*
Enabled: When HeadlessSupport is set to 1 (enabled), the server will run without fault when no Headless Client is connected. However, it will support the Headless Client if you choose to connect one.
Disabled: If HeadlessSupport is set to 0 (disabled), the connection of a Headless Client will make no difference. This option will increase server performance a TINY but negligible amount.
*/
};
class RscTitles {
#include "dialog\progress.hpp"
#include "dialog\hud_nameTags.hpp"
#include "dialog\hud_stats.hpp"
#include "Content\HUD\MiniMap.hpp"
};
class CfgFunctions {
#include "Functions.hpp"
};
class CfgSounds {
sounds[] = {};
class sirenLong {
name = "sirenLong";
sound[] = {"\sounds\sirenLong.ogg", 1.0, 1};
titles[] = {};
};
class medicSiren {
name = "medicSiren";
sound[] = {"\sounds\medicSiren.ogg", 1.0, 1};
titles[] = {};
};
class tazerSound {
name = "tazerSound";
sound[] = {"\sounds\tazer.ogg", 0.5, 1};
titles[] = {};
};
class flashbang {
name = "flashbang";
sound[] = {"\sounds\flashbang.ogg", 1.0, 1};
titles[] = {};
};
class mining {
name = "mining";
sound[] = {"\sounds\mining.ogg", 1.0, 1};
titles[] = {};
};
class harvest {
name = "harvest";
sound[] = {"\sounds\harvest.ogg", 1.0, 1};
titles[] = {};
};
class lockCarSound {
name = "lockCarSound";
sound[] = {"\sounds\carLock.ogg", 1.0, 1};
titles[] = {};
};
class unlockCarSound {
name = "unlockCarSound";
sound[] = {"\sounds\carUnlock.ogg", 0.75, 1};
titles[] = {};
};
};
class CfgDebriefing {
class NotWhitelisted {
title = "$STR_NotWhitelisted_Title";
subtitle = "$STR_NotWhitelisted_SubTitle";
description = "$STR_NotWhitelisted_Descript";
pictureBackground = "";
picture = "";
pictureColor[] = {0,0.3,0.6,1};
};
class Blacklisted {
title = "$STR_Blacklisted_Title";
subtitle = "$STR_Blacklisted_SubTitle";
description = "$STR_Blacklisted_Descript";
pictureBackground = "";
picture = "";
pictureColor[] = {0,0.3,0.6,1};
};
class SpyGlass {
title = "$STR_SpyDetect_Title";
subTitle = "$STR_SpyDetect_SubTitle";
description = "$STR_SpyDetect_Descript";
pictureBackground = "";
picture = "";
pictureColor[] = {0,0.3,0.6,1};
};
};
class CfgNotifications {
class MedicalRequestEmerg {
title = "$STR_MedicalRequestEmerg_Title";
iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa";
description = "%1";
duration = 5;
priority = 7;
};
class DeliveryAssigned {
title = "$STR_DeliveryAssigned_Title";
iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa";
description = "%1";
duration = 10;
priority = 7;
};
class DeliveryFailed {
title = "$STR_DeliveryFailed_Title";
iconPicture = "\A3\ui_f\data\map\mapcontrol\taskiconfailed_ca.paa";
description = "%1";
duration = 7;
priority = 7;
};
class DeliverySucceeded {
title = "$STR_DeliverySucceeded_Title";
iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcondone_ca.paa";
description = "%1";
duration = 6;
priority = 6;
};
class TextMessage {
title = "$STR_TextMessage_Title";
iconPicture = "icons\ico_messageNew.paa";
description = "%1";
duration = 10;
priority = 6;
};
class PoliceDispatch {
title = "$STR_PoliceDispatch_Title";
iconPicture = "icons\ico_messagePolice.paa";
description = "%1";
duration = 10;
priority = 6;
};
class AdminDispatch {
title = "$STR_AdminDispatch_Title";
iconPicture = "icons\ico_messageAdmin.paa";
description = "%1";
duration = 10;
priority = 6;
};
class AdminMessage {
title = "$STR_AdminMessage_Title";
iconPicture = "icons\ico_messageAdmin.paa";
description = "%1";
duration = 10;
priority = 5;
};
};
Alles anzeigen
Und dann die init.sqf (Serlber erstellt)
/*
Ishlava-Life.fr
Rykam Ishlava
*/
fnc_updateMiniMap = {
_map = _this select 0;
_map ctrlMapAnimAdd [0, 0.05, player];
ctrlMapAnimCommit _map;
};
waitUntil { time > 0 };
[ "ILFRMiniMap" ] call BIS_fnc_rscLayer ) cutRsc [ "ILFRMiniMapShow", "PLAIN", 1, false ];
};
Alles anzeigen
Hoffe mir kann jemand weiter helfen
Mit freundlichen Grüßen
Timo | NiceKype