I’ve been tring to take the esx_invest code and create a stoke broker job.
so only if you have that job name in the data base the event of open the invest menu will happend
this is what i came up with but it is not working.
Citizen.CreateThread(function()
local jobinv = ESX.GetPlayerData().job
while true do
Citizen.Wait(0)
if jobinv == investor then
if near() then
Notify(_U("open_menu"))
if IsControlJustPressed(1, keys[Config.Keys.Open]) then
openUI()
local ped = GetPlayerPed(-1)
TriggerServerEvent("invest:balance")
end
if IsControlJustPressed(1, keys[Config.Keys.Close]) and inMenu then
closeUI()
end
end
end
end
end)
thx to all helpers