
It was a great experience playing GTA5 RP and learning LUA to code the Trew HUD UI. However, after numerous challenges with the FiveM community and the project itself, I have decided to discontinue further development. It’s been 6 months since I last played GTA5 RP, and continuing this project no longer makes sense.
.zip file or open it directly.trew_hud_ui in your resources directory.server.cfg:
server.cfg file:sqlCode kopierenstart trew_hud_uiSpecial Instructions for the ESX Version
Requirements:
es_extendedesx_societyesx_addonaccountOptional:
esx_basicneedsesx_statusLegacyFuel (it should be started before trew_hud_ui)Disabling Default HUD:
es_extended/config.lua and set Config.EnableHud to false.Replacing Code in esx_basicneeds/main.lua:
TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function(status) return true end, function(status) status.remove(1000) end) TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function(status) return true end, function(status) status.remove(750) end) with: TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function(status) return false end, function(status) status.remove(1000) end) TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function(status) return false end, function(status) status.remove(750) end)Special Instructions for the VRP/VRPEX Versions
Config.vRP Settings:
config.lua.Config.vRP Example:
Config.vRP = {
blackMoney = "dirty_money" -- Change this to your black money item ID
}
General Configurations:
en).You can create custom indicators for existing statuses like stress or drunkenness.
Example:
nexports.trew_hud_ui.createStatus({
status = 'stress',
color = '#FF0090',
icon = '<i class="fas fa-brain"></i>'
});
Updating Custom Status:
Citizen.CreateThread(function()
while true do
Citizen.Wait(1000)
local STRESS_STATUS
TriggerEvent('esx_status:getStatus', 'stress', function(status)
STRESS_STATUS = status.getPercent()
end)
exports.trew_hud_ui:setStatus({
name = 'stress',
value = STRESS_STATUS
});
end
end)
Chat Commands:
Usage Example:
/toggleui
Q: The HUD date is wrong! Can you fix it?
app.js using JavaScript’s Date() function. Google it for more info.Q: How can I edit the /toggleui command to hide the elements?
/toggleui command, go to the ui.html files and look for the id attribute of the elements you want to hide. Then, edit the toggleui command in client.lua to suit your needs.Q: Do you intend to release a version that supports THIS or THAT script?
Q: I want to change the positions of the elements. How can I do it?
main.css file and modify the top, left, right, or bottom properties of the elements you want. Be careful and read about absolute positioning in CSS. For example, to position an element at the bottom, use the BOTTOM property instead of TOP.