[Help] to whitelist a script


#1

so its a /duty script that gives out the ped and some weapons but anyone can do it, is it anyway i can make it so its whitelisted to the police job? :slight_smile: am using ESX :slight_smile:


#2

Yes, you could use aces permission? or set up a basic permission system through the script. If you are wanting to learn, just search the forum with your question, some scripts have this installed.

I would suggest you wouldn’t do this, it’s kinda a pain to add someone to the whitelist every time a cop signs up.

If you are wanting to do it, I’d suggest ACES permission, this then allows for other scripts to be used for the same permission.

There is probably an easier way that I don’t know about. Someone reply if you know some more stuffs.


#3

thank you :slight_smile:


#4

hmm i tried it but i cant get it to work :L


#5

What have you tried?


#6

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)

local job = tostring(exports[‘esx_policejob’]:getJob())

or is this wrong?


#7

There are plenty on the forums. (Cop stuff whitelisted)