[Release] Disable vehicles and peds

I have trouble running npc_control when adjusted to 1.0 found over npc cars repeatedly until blast.

cfg = {}

cfg.density = {
peds = 1.0,
vehicles = 1.0
}

cfg.peds = { – these peds wont show up anywhere, they will be removed and their vehicles deleted
“s_m_y_cop_01”,
“s_f_y_sheriff_01”,
“s_m_y_sheriff_01”,
“s_m_y_hwaycop_01”,
“s_m_y_swat_01”,
“s_m_m_snowcop_01”,
“s_m_m_marine_01”,
“s_m_m_marine_02”,
“s_m_y_marine_01”,
“s_m_y_marine_02”,
“s_m_y_marine_03”,
“csb_ramp_marine”,
“s_m_y_fireman_01”,
“s_m_m_paramedic_01”,
“s_m_y_pilot_01”,
“s_m_m_pilot_02”,
“s_m_m_gentransport”,
“s_m_y_blackops_02”,
“s_m_y_blackops_01”,
“csb_mweather”
}

cfg.noguns = { – these peds wont have any weapons
}

cfg.nodrops = { – these peds wont drop their weapons when killed
}

–[[ WORK IN PROGRESS // DOES NOT WORK
cfg.vehs = { – these vehicles wont show up anywhere, they will be removed unless a player is in the driver seat
“police”,
“policet”,
“sheriff”,
“fbi”,
“pranger”,
“riot”,
“pbus”
}
]]

44342846_494465921067935_7873249793206648832_n

Me too, did you ever find a solution? :sob:

I’ve been looking to disable all peds but still have parked cars. I’ve set ParkedVehicleDensity multipler to 1, however around car parks and stuff I will still get the odd AI driving a car in the car park. I was wondering if there was any way to prevent this

anyone update about this issue

cfg.vehs =

because i really need to remove all shitty army from game…
it’s shitty for the RP to keep them

  • Broken download

Where can i paste this script in filezilla

where do you put nopeds.lua?

Can the download be revived please, its dead and really dont want peds on my server.

He changed his github username. Its available at

1 Like

Is there a way to disable only ai that are on foot? Still kinda need the vehicles so people got cars to steal/drive…

hello the link is invalid

They removed it plz reupload

Citizen.CreateThread(function()
    while true do
        -- These natives has to be called every frame.
        SetVehicleDensityMultiplierThisFrame(0.0)
        SetPedDensityMultiplierThisFrame(0.0)
        SetRandomVehicleDensityMultiplierThisFrame(0.0)
        SetParkedVehicleDensityMultiplierThisFrame(0.0)
        SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
        
        local playerPed = GetPlayerPed(-1)
        local pos = GetEntityCoords(playerPed)
        RemoveVehiclesFromGeneratorsInArea(pos['x'] - 500.0, pos['y'] - 500.0, pos['z'] - 500.0, pos['x'] + 500.0, pos['y'] + 500.0, pos['z'] + 500.0);
        
        
        -- These natives do not have to be called everyframe.
        SetGarbageTrucks(0)
        SetRandomBoats(0)
        
        Citizen.Wait(1)
    end
end)