Can you tell me whats wrong with this? Everybody can open the menu:
Citizen.CreateThread(function()
local PlayerData = ESX.GetPlayerData()
while true do
Citizen.Wait(0)
if IsControlJustReleased(0, 167) and PlayerData.job and PlayerData.job.name == ‘cardealer’ and not ESX.UI.Menu.IsOpen(‘default’, GetCurrentResourceName(), ‘seller’) then
CarDealerMenu()
end
end
end)