Remove all NPC cop and military from server


#1

Hello,

I’m trying to remove all NPC cop and military from my server, I’m trying to blacklisted all of them :

pedblacklist = {
“CSB_BallasOG”
"MP_S_ARMOURED_01"
"S_F_Y_Cop_01"
"S_F_Y_Cop_02"
"S_F_Y_Cop_03"
"S_M_Y_Cop_01"
"S_M_Y_Cop_02"
"S_M_Y_Cop_03"
"S_F_Y_Sheriff_01"
"S_F_Y_Sheriff_02"
"S_F_Y_Sheriff_03"
"S_M_Y_Marine_01"
"S_M_Y_Marine_02"
"S_M_Y_Marine_03"
"S_M_SECURITY_01"
"S_M_SECURITY_02"
"S_M_SECURITY_03"
"S_M_Y_ARMYMECH_01"
"S_M_Y_ARMYMECH_02"
"S_M_Y_ARMYMECH_03"
"S_M_Y_BLACKOPS_01"
"S_M_Y_BLACKOPS_02"
“S_M_Y_BLACKOPS_03”
}

I’m stil seeing many cop in city :confused:
Regards,


Disable police cars/pnj
#2

Hi,

I’ve installed a simple “NeverWanted” script on my server and all the cops are gone,

Try that and let me know if it works with you


#3

I use ClearAreaOfCops()


#4

Is corect ?

Citizen.CreateThread(function()
  while true do
    Citizen.Wait(0)
    local playerPed = GetPlayerPed(-1)
    local playerLocalisation = GetEntityCoords(playerPed)
    ClearAreaOfCops(playerLocalisation.x, playerLocalisation.y, playerLocalisation.z, 400.0)
  end
end)


#5

but ClearAreaOfCops always clear the els vehicle… so which mean… if you have a command to spawn police car… you’ll not able to see it… becuz ClearAreaOfCops delete the the vehicle in this loop. so no more els car


#6

So, how to do ? It’s impossible ?


#7

#8

This isn’t the thing… It’s for disabling specific models when ScriptHook is not disabled…
It only goes for the specific player model not any AI’s, I guess…