Help with ESX Weaponshop

Hello Is there any good at scripting here that can help a beginner. I use this weapon shop : https://github.com/ESX-Org/esx_weaponshop and I would like to make sure that only mafia, cartel and lost mc can buy weapons at blackweashop. I have tried to test with:

- if ESX.PlayerData.job ~ = nil and ESX.PlayerData.job.name == 'mafia' then
- if PlayerData.job ~ = nil and PlayerData.job.name == 'mafia' then

Here’s how:

Citizen.CreateThread (function ()
  while true do
    Wait (0)
    local coords = GetEntityCoords (GetPlayerPed (-1))
    local isInMarker = false
    local currentZone = nil

    for k, v in pairs (Config.Zones) do
      for i = 1, # v.Pos, 1 do
if ESX.PlayerData.job ~ = nil and ESX.PlayerData.job.name == 'mafia' then
        if (GetDistanceBetweenCoords (coords, v.Pos [i] .x, v.Pos [i] .y, v.Pos [i] .z, true) <Config.Size.x) then
          isInMarker = true
          ShopItems = v.Items
          currentZone = k
          LastZone = k
        End
      End

In Display Markers and Enter Markers. But the script doesn’t work after that.

Is there anyone here who can help me how to proceed?
Like to say that only Mafia, Cartel and Lost Mc should be able to see blip for BlackWeashop and be able to shop there.