hello I am using nui and my font doesnt work in fivem but in the browser it does
local showUI = false;
Citizen.CreateThread(function()
RegisterCommand(“showui”, function()
if showUI == false then
SendNUIMessage({type = “enableui”})
showUI = true
else
SendNUIMessage({type = “disableui”})
showUI = false
end
end)
end)
fxmanifest.lua:
fx_version ‘cerulean’
game ‘gta5’
author ‘Hamsyy’
description ‘Hamsyy Taksimetre script`i’
version ‘1.0.0’
ui_page ‘html/index.html’
files {
‘html/index.html’,
‘html/style.css’,
‘html/script.js’,
“html/fonts/DS-DIGII.TTF”
}
client_script “main.lua”
scripts.js
window.addEventListener(‘message’, function(event) {
if(event.data.type == “enableui”)
{
$(“.box”).css(“visibility”,“visible”);
}
else
{
$(“.box”).css(“visibility”,“hidden”);
}
});
index.html
*{
font-family: “digital” !important;
}
.box {
background: #262626e4;
height: 200px;
width: 900px;
margin: 0 auto;
padding: 0;
top: 0;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.innerBox{
height:calc(100% - .5vw);
width: calc(100% - .5vw);
background: #231d1f;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
.digits{
margin: auto;
width: 40%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.digit{
margin: auto;
color: white;
font-size: 150px;
font-family: “digital” !important;
color: #421e1e;
}
.dd{
display: flex;
align-items: center;
justify-content: center;
}
.d1{
color: #ff3036 !important;
}
body{
padding: 0;
margin: 0;
}