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”
}
]]
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
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)