Hello, i need to chceck if player have a job and if he have then add the ox_target to the position but when he doesnt have role then he cant access it ( if i change the job it must update ) thx for respond my code is this
ESX = exports["es_extended"]:getSharedObject()
RegisterNetEvent('bx:test')
AddEventHandler('bx:test', function()
print("Úspěšně si kliknul na očičko :-)")
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if ESX.PlayerData.job and ESX.PlayerData.job.name == 'exotic' then
exports.ox_target:addBoxZone({
coords = vec3(82.9045, -1009.6147, 29.3085),
size = vec3(2,2,2),
rotation = 29.3570,
options = {
{
icon = 'fa-solid fa-store',
label = 'Otevřít Menu',
event = 'bx:test',
},
},
distance = 2
})
end
end
end)