diff --git a/meta.xml b/meta.xml
index a61384ee..39b43497 100644
--- a/meta.xml
+++ b/meta.xml
@@ -127,6 +127,7 @@
+
diff --git a/scripts/client/event.js b/scripts/client/event.js
index 3b0e2999..afb8c4e4 100644
--- a/scripts/client/event.js
+++ b/scripts/client/event.js
@@ -155,6 +155,7 @@ function onDrawnHUD(event) {
processSkinSelectRendering();
processNameTagRendering();
processInteriorLightsRendering();
+ processCustomHUDRendering();
}
// ===========================================================================
diff --git a/scripts/client/hud.js b/scripts/client/hud.js
new file mode 100644
index 00000000..c79f7b68
--- /dev/null
+++ b/scripts/client/hud.js
@@ -0,0 +1,58 @@
+// ===========================================================================
+// Vortrex's Roleplay Resource
+// https://github.com/VortrexFTW/v-roleplay
+// ===========================================================================
+// FILE: hud.js
+// DESC: Provides custom HUD functions and usage
+// TYPE: Client (JavaScript)
+// ===========================================================================
+
+let customHUDMoneyFont = null;
+let customHUDMoneyColour = toColour(200, 200, 200, 200);
+let customHUDMoneySize = 22.0;
+
+// ===========================================================================
+
+function initCustomHUDScript() {
+ logToConsole(LOG_DEBUG, "[V.RP.HUD]: Initializing HUD script ...");
+ customHUDMoneyFont = initCustomHUDMoneyFont();
+ logToConsole(LOG_DEBUG, "[V.RP.HUD]: HUD script initialized!");
+}
+
+// ===========================================================================
+
+function processCustomHUDRendering() {
+ logToConsole(LOG_VERBOSE, "[V.RP.HUD]: Processing custom HUD rendering ...");
+
+ if (renderHUD == false) {
+ return false;
+ }
+
+ if (getGame() == V_GAME_MAFIA_ONE) {
+ if (customHUDMoneyFont != null) {
+ let text = getCurrencyString(localPlayerMoney);
+ logToConsole(LOG_VERBOSE, `[V.RP.HUD]: Rendering custom HUD money (${text})...`);
+ customHUDMoneyFont.render(text, [game.width - 150, 20], 130, 1.0, 0.0, customHUDMoneyFont.size, customHUDMoneyColour, true, true, false, true);
+ } else {
+ logToConsole(LOG_VERBOSE | LOG_ERROR, `[V.RP.HUD]: Rendering custom HUD money FAILED. Font object is null!`);
+ }
+ }
+}
+
+// ===========================================================================
+
+function initCustomHUDMoneyFont() {
+ logToConsole(LOG_DEBUG, "[V.RP.HUD]: Loading custom HUD money font ...");
+ let tempFont = null;
+ let fontStream = openFile("files/fonts/aurora-bold-condensed.ttf");
+ if (fontStream != null) {
+ tempFont = lucasFont.createFont(fontStream, customHUDMoneySize);
+ logToConsole(LOG_DEBUG, "[V.RP.HUD]: Custom HUD money font loaded successfully!");
+ } else {
+ logToConsole(LOG_DEBUG | LOG_ERROR, "[V.RP.HUD]: Loading custom HUD money font FAILED. Font file stream is null!");
+ }
+
+ return tempFont;
+}
+
+// ===========================================================================
\ No newline at end of file
diff --git a/scripts/client/startup.js b/scripts/client/startup.js
index c28d142e..999305eb 100644
--- a/scripts/client/startup.js
+++ b/scripts/client/startup.js
@@ -21,6 +21,7 @@ function initClientScripts() {
initEventScript();
initSkinSelectScript();
initCursorScript();
+ initCustomHUDScript();
addAllNetworkHandlers();
}