Hello,
I am trying to make this script only work for those people that have the correct esx_policejob.grade e.g Supervisor:4
I just cant think of a way to get it to work with esx_PoliceJob
It is the Script for K9 : [IIS] K9 Policer | Dog Script | Control your own K9 pal!
If someone could help that would be great
Thank you
Falcon
client.lua
add the code below to the top of the script
--[[ ESX ]]
ESX = nil
local PlayerData = {}
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
PlayerData = xPlayer
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
PlayerData.job = job
end)
Find RegisterCommand(‘dsu’, function() and replace with the code below:
RegisterCommand('dsu', function()
if PlayerData.job.name == 'police' and PlayerData.job.grade == 4 then
WarMenu.OpenMenu('maink9')
end
end, false)