[ESX]Problem with menu interaction

Hello.

I’m trying to add so only a specific job can use this feature but when I add this line of code it dosen’t seem to work. The menu refuses to open.

PlayerData.job ~= nil and PlayerData.job.name == 'cartel'
if IsControlJustReleased(0, 38) and PlayerData.job ~= nil and PlayerData.job.name == 'cartel' and (GetGameTimer() - GUI.Time) > 1000 then
if IsControlJustReleased(0, 38) and (GetGameTimer() - GUI.Time) > 1000 then

If I change, everyone can use the feature.

if IsControlJustReleased(0, 38) > if IsControlPressed(0,  Keys['E'])

So…

if IsControlPressed(0,  38) and PlayerData.job ~= nil and PlayerData.job.name == 'cartel' and (GetGameTimer() - GUI.Time) > 1000 then

When I did that. Anyone could use it. But I found a way around it.

I added it to

hasEnteredMarker', function(zone)

Now I see the difference. Thanks man will try it.