Installation
Installation of cxa-hud
General setup;
Extract the file to any location within your resources folder.
After the section where the basic systems are started in your server.cfg file, add;
ensure cxa-hud
Framework selection;
Type the framework you are using from the Config file;
Fuel system integration;
Write the function for getting the fuel from the fuel script you are using via the Config file;
Notify system integration;
If you want to link all notifications to the notification system in our HUD, update the notification function in
qb-core/client/functions
with the following code.Edited version of the
qb-core/client/functions
code;You can copy the code here;
function QBCore.Functions.Notify(text, texttype, length, icon)
local textTypeTitle = "Notify"
if not icon then
icon = "fa-solid fa-check"
end
if not length then
length = 5000
end
if texttype == "error" then
textTypeTitle = "Error"
elseif texttype == "warning" then
textTypeTitle = "Warning"
elseif texttype == "success" then
textTypeTitle = "Success"
elseif texttype == "primary" then
textTypeTitle = "Notify"
else
textTypeTitle = "Notify"
end
exports["cxa-hud"]:SendNotify(icon, textTypeTitle, text, length)
end
QBCore nitro item;
nitro = {
name = 'nitro',
label = 'Nitro',
weight = 1000,
type = 'item',
image = 'nitro.png',
unique = false,
useable = true,
shouldClose = true,
description = "Use and step on the gas!"
},
ESX nitro item;
INSERT INTO `items` (`name`, `label`, `limit`) VALUES
('nitro', 'Nitro', 1)
;
Last updated