[HELP] Disable ped police, doctor and fireman

EN - Hello, I have to ask for help to know how to disable these ped la via a script, if someone knows how to do I would be delighted to learn it

FR - Bonjour, je viens demander de l’aide pour savoir comment désactiver ces ped la via un script, si quelqu’un sait comment faire je serais ravis de l’apprendre

make a local restrictions = {here you add the peds names} , make a function that detects if the ped has it and assign a change on it and create a citizen function where you assign the function on the ped.

How to detect a ped? Scan area around player constantly?

here , i made this quick for you

Except we are talking about all police, firemen and EMC peds on the map, not about player model.

my reply was for the first question, a ped skin restriction system, he can add the police there, if you don’t want to see police on the map use this : [Release] Disable Wanted Level there is a topic where someone put a function that disables cops for good too

I’m pretty sure this is not about player skin, but world peds.

ok my bad, say thank you and use it or not, your call . you might not get it 2nd time

Wanted level =/= removing police. They will be on streets anyway.

Well, thanks, I guess, maybe someone will find your script useful.

if you look on the topic, someone posted a function that does that, or do you want me to do everything for you?

Here :
Citizen.CreateThread(function() while true do Citizen.Wait(0) if GetPlayerWantedLevel(PlayerId()) ~= 0 then SetPoliceIgnorePlayer(player, true) SetDispatchCopsForPlayer(player, false) end end end)

Rude, don’t you think? Please, don’t imply that everybody around is stupid.
That line does nothing, been there, tested.

i did not tested it, i just assumed that it works with no one saying anything else on the topic. Anyway , related to what you want you would need a function that detects the entities on map on a radios , 500 M for example and add a handler where you delete the Ambulance or firetruck. I don’t know anything about a function that can disable everything.

And that script should work.