ESX = exports["es_extended"]:getSharedObject() local isJudge = false local isPolice = false local isTow = false local isTaxi = false local isMedic = false local isDead = false local myJob = "Unemployed" local isHandcuffed = false local hasOxygenTankOn = false local bennyscivpoly = false local onDuty = false local inGarage = false local inDepots = false rootMenuConfig = { { id = "blips", displayName = "GPS", icon = "#blips", enableMenu = function() local src = source local Player = ESX.GetPlayerData(src) local inlaststand = Player.metadata["inlaststand"] local isdead = Player.metadata["isdead"] return not isdead and not inlaststand end, subMenus = { "sloline:police", "sloline:sheriff", "sloline:ambulance","sloline:ammunation", "sloline:garages","sloline:ottos", "sloline:seaton", "sloline:bennys", "sloline:bank", "blips:barbershop","blips:gasstations", "blips:tattooshop"} }, { id = "Interaction", displayName = "General", icon = "#general", enableMenu = function() local src = source local Player = ESX.GetPlayerData(src) local inlaststand = Player.metadata["inlaststand"] local isdead = Player.metadata["isdead"] return not isdead and not inlaststand end, subMenus = { "karakter:relog", "hud:nastavitve", "notifikacije:nastavitve", "general:playeroutvehicle" } }, { id = "Racuni", displayName = "Racuni", icon = "#news", enableMenu = function() local src = source local Player = ESX.GetPlayerData(src) local inlaststand = Player.metadata["inlaststand"] local isdead = Player.metadata["isdead"] return not isdead and not inlaststand end, subMenus = { "test:racuni" } }, { id = "bliznjice", displayName = "Bližnjice", icon = "#animation-business", enableMenu = function() local src = source local Player = ESX.GetPlayerData() local inlaststand = Player.metadata["inlaststand"] local isdead = Player.metadata["isdead"] return not inlaststand and not isdead end, subMenus = { "emote:menu", "mehanik:racun", "obleke:karakter", "editor:menu", "bljiznice:report", "menu:vehicle"} }, { id = "Police", displayName = "Police Interaction", icon = "#police-action", enableMenu = function() local ped = PlayerPedId() PlayerData = ESX.GetPlayerData() if PlayerData.job.name == "police" and not fuck then return true end end, subMenus = {"police:mdt", "general:cuff", "police:escort", "police:searchplayer" } } -- add `,` after `}` if you gonna add new button but last button should ended w/o `,` -- NOTE -- for add a new function button to menu: -- { -- id = "generalgarage", -- type group id name, can be any name -- displayName = "Garage", -- Display Name -- icon = "#general-garage", -- Icon, should be with `#` cuz from HTML and check HTML for edits -- functionName = "qb-garages:takeout", -- THIS IS THE FUNCTION NAME THAT WILL BE TRIGGERED AFTER CLICKING THE BUTTON -- enableMenu = function() -- return (not isDead and inGarage and not isCloseVeh() and not IsPedInAnyVehicle(PlayerPedId(), false)) -- if person is dead or in vehicle. we don't want dead people to see this button if dead -- end -- } -- for open a new menu from the button: -- { -- id = "general", -- type group id name, can be any name -- displayName = "General", -- Display Name -- icon = "#globe-europe", -- Icon, should be with `#` cuz from HTML and check HTML for edits -- enableMenu = function() -- return not isDead -- if person is dead or in vehicle. we don't want dead people to see this button if dead -- end, -- subMenus = {"general:escort", "general:emotes", "general:putinvehicle", "general:unseatnearest"} -- add submenu names that will be shown after clicking General button -- } -- NOTE -- EXAMPLE: -- { -- id = "copDead", -- displayName = "11-A", -- icon = "#police-dead", -- enableMenu = function() -- return isPolice and isDead and onDuty -- here button checks if person is cop and dead and on duty. if 3 of them true then this will be shown -- end, -- subMenus = {"general:escort", "general:emotes", "general:putinvehicle", "general:unseatnearest"} -- } } newSubMenus = { -- NOTE basicly, what will be happen after clicking these buttons and icon of them ["menu:vehicle"] = { title="Menu Vozila", icon = "#vehicle-options", functionName = "madness", eventType = "command", }, --------- --RACUN-- --------- ["test:racuni"] = { title="Racuni", icon="#ped-bank-account-manager", functionName = "billing", eventType = "command", }, ---------- --MENIJI-- ---------- ["fpsboost:odpri"] = { title="FPS Booster", icon="#editor-open", functionName = "fpsMenu", eventType = "command", }, ["karakter:relog"] = { title="Menjava Karakterja", icon="#prisoner-group", functionName = "logout", eventType = "command", }, ["hud:nastavitve"] = { title="Hud Nastavitve", icon="#vehicle-plate-add", functionName = "hudsettings", eventType = "command", }, ["notifikacije:nastavitve"] = { title="Prop v roki (bug)", icon="#general-check-vehicle", functionName = "clearstuckprops ", eventType = "command", }, --------------- --BLIŽNJICE --------------- ["obleke:karakter"] = { title="Menu Oblek", icon="#oxygen-mask", functionName = "clothing", eventType = "command", }, ["emote:menu"] = { title="Emote Menu", icon="#general-emotes", functionName = "emotemenu", eventType = "command", }, ["editor:menu"] = { title="Rockstar Editor", icon="#news-job-news-camera", functionName = "record", eventType = "command", }, ["bljiznice:report"] = { title="Report", icon="#report", functionName = "report", eventType = "command", }, --------- --BLIPI-- --------- ['blips:gasstations'] = { title = "Gas Station", icon = "#blips-gasstations", functionName = "ygx:togglegas" }, ['sloline:garages'] = { title = "Garages", icon = "#car", functionName = "sloline:garage" }, ['blips:barbershop'] = { title = "Barber", icon = "#blips-barbershop", functionName = "ygx:togglebarber" }, ['sloline:bennys'] = { title = "Benny's Motorworks", icon = "#sl-mehanik", functionName = "sloline:bennys" }, ['sloline:seaton'] = { title = "Seaton Sand's Garage", icon = "#sl-mehanik", functionName = "sloline:seaton" }, ['sloline:bank'] = { title = "Banke", icon = "#judge-actions-check-bank", functionName = "sloline:bank" }, ['sloline:police'] = { title = "LSPD", icon = "#blips-police", functionName = "sloline:lspd" }, ['sloline:sheriff'] = { title = "BCSO", icon = "#blips-police", functionName = "sloline:bcso" }, ['sloline:ambulance'] = { title = "EMS", icon = "#medic", functionName = "sloline:ems" }, ['sloline:ottos'] = { title = "Otto's Autos", icon = "#sl-mehanik", functionName = "sloline:ottos" }, ['sloline:ammunation'] = { title = "Gun Club", icon = "#sl-orozarna", functionName = "sloline:gunclub" }, ---------- --POLICE-- ---------- ['police:escort'] = { title = "Spremstvo", icon = "#general-escort", functionName = "wasabi_police:escortPlayer" }, ['police:searchplayer'] = { title = "Preišči Igralca", icon = "#police-action-frisk", functionName = "wasabi_police:searchPlayer" }, ['police:mdt'] = { title = "MDT", icon = "#mdt", functionName = "redutzu-mdt:client:openMDT" }, } RegisterNetEvent("isJudge") -- these are all up to you and your job system, if person become Judge, script will see him as Judge too. AddEventHandler("isJudge", function() isJudge = true end) RegisterNetEvent("isJudgeOff") -- opposite of the above AddEventHandler("isJudgeOff", function() isJudge = false end) RegisterNetEvent("isTow") -- these are all up to you and your job system, if person become Judge, script will see him as Judge too. AddEventHandler("isTow", function() isTow = true end) RegisterNetEvent("isTowOff") -- these are all up to you and your job system, if person become Judge, script will see him as Judge too. AddEventHandler("isTowOff", function() isTow = false end) RegisterNetEvent("isTaxi") -- these are all up to you and your job system, if person become Judge, script will see him as Judge too. AddEventHandler("isTaxi", function() isTaxi = true end) RegisterNetEvent("isTaxiOff") -- opposite of the above AddEventHandler("isTaxiOff", function() isTaxi = false end) RegisterNetEvent("QBCore:Client:OnJobUpdate") -- dont edit this unless you don't use qb-core AddEventHandler("QBCore:Client:OnJobUpdate", function(jobInfo) myJob = jobInfo.name if isMedic and myJob ~= "ambulance" then isMedic = false end if isPolice and myJob ~= "police" then isPolice = false end if isTow and myJob ~= "tow" then isTow = false end if isTaxi and myJob ~= "taxi" then isTaxi = false end if myJob == "police" then isPolice = true end if myJob == "tow" then isTow = true end if myJob == "taxi" then isTaxi = true end if myJob == "ambulance" then isMedic = true end end) RegisterNetEvent('QBCore:Client:SetDuty') -- dont edit this unless you don't use qb-core AddEventHandler('QBCore:Client:SetDuty', function(duty) myJob = ESX.GetPlayerData() if isMedic and myJob ~= "ambulance" then isMedic = false end if isPolice and myJob ~= "police" then isPolice = false end if myJob == "police" then isPolice = true onDuty = duty end if myJob == "ambulance" then isMedic = true onDuty = duty end end) RegisterNetEvent('deathcheck') -- YOU SHOULD ADD THIS IN YOUR ambulancejob system, basically let the function trigger here when the ped playing anim and add this to -- your revived function so everytime if person dies, this will be triggered to isDead = true, if he get revived this will be triggered to isDead = false AddEventHandler('deathcheck', function() if not isDead then isDead = true else isDead = false end end) RegisterNetEvent("police:currentHandCuffedState") -- add this your police:client:GetCuffed @qb-policejob\client\interactions.lua AddEventHandler("police:currentHandCuffedState", function(pIsHandcuffed) isHandcuffed = pIsHandcuffed end) RegisterNetEvent("menu:hasOxygenTank") -- add this to your oxygentank wear place, idk where is this for qb-inventory so find out please AddEventHandler("menu:hasOxygenTank", function(pHasOxygenTank) hasOxygenTankOn = pHasOxygenTank end) RegisterNetEvent('police:client:PutInVehicle') AddEventHandler('police:client:PutInVehicle', function() if isEscorted then end end)