Is this not already a thing from pma voice?
not as far as i know i have put some coding in it my self too get it too work
i can try too look at it
Cheers.
Edit: Also for some reason even when i am set to police i cant join the private frequency can you have a look into that for me.
yes i am on it
do u have code insite your police job like this
AddEventHandler('esx:setJob', function(job)
PlayerData.job = job
Citizen.Wait(5000)
TriggerServerEvent('LN_police:forceBlip')
if PlayerData.job and PlayerData.job.name == 'police' then
exports["rp-radio"]:GivePlayerAccessToFrequencies(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
elseif PlayerData.job and PlayerData.job.name == 'police' then--[To add a job copy the from here]
exports["rp-radio"]:GivePlayerAccessToFrequencies(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)--[to here] and paste it right blow
elseif PlayerData.job and PlayerData.job.name == 'mecano' then -- here then rename 'mecano' to the job name
exports["rp-radio"]:GivePlayerAccessToFrequencies(9, 10) -- set radio freq here (9, 10)
else--(Do not remove due to this will remove it from everyone one else without or being set to another job)
exports["rp-radio"]:RemovePlayerAccessToFrequencies(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)--(Dont Touch)
end --(Dont Touch)
end)
No i don’t sadly which file do i put this in?
client.lua
you dont need this
TriggerServerEvent(‘LN_police:forceBlip’)
cheers i will put that in now.
you welcome let me know if it working for you
still not working.
is it channel 1 you are trying too connect too ??
yes i am trying to connect to channel one as police.
okay try too take a screenshot off the code u paste in the esx_policejob cilent.lua
okay and you restarted the whole server after pasting in ??
yes i have but still does not work.
and do u have a trigger call esx_policejob:forceblip in the server.lua ???
for i am not sure but if the trigger fails too load the rest of the function stop working so maybe make the
TriggerServerEvent(“esx_policejob:forceBlip”)
too
–TriggerServerEvent(“esx_policejob:forceBlip”)
