Hello guys can anybody tell me what is wrong here ?
It is not Reigsterring my Command
/////////////////main.lua
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)
/////////////////////__resource.lua
fx_version ‘cerulean’
game ‘gta5’
author ‘Hamsyy’
description ‘taximetre NUI’
version ‘1.0.0’
client_script “main.lua”
ui_page “html/index.html”
files{
"html/index.html",
"html/style.css",
"html/index.js",
"html/reset.css",
"font/digital-7.ttf"
}
//////////index.js
window.addEventListener(“message”,function(event){
if(event.data.type == "enableUI"){
$(".cerceve").css("visibility","visible");
}
else if((event.data.type == "disableUI"))
{
$(".cerceve").css("visibility","hidden");
}
});
Thank you