现在也有No-NPC这种删除AI车辆的插件 但是这些插件的代码是https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd
https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
Citizen.CreateThread(function()https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
while true dohttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
Citizen.Wait(0) -- prevent crashinghttps://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
https://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr
-- These natives have to be called every frame.https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
SetVehicleDensityMultiplierThisFrame(0.0) -- set traffic density to 0 https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C
SetPedDensityMultiplierThisFrame(1.0) -- set npc/ai peds density to 0https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd
SetRandomVehicleDensityMultiplierThisFrame(0.0) -- set random vehicles (car scenarios / cars driving off from a parking spot etc.) to 0https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P
SetParkedVehicleDensityMultiplierThisFrame(0.2) -- set random parked vehicles (parked car scenarios) to 0https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
SetScenarioPedDensityMultiplierThisFrame(1.0, 1.0) -- set random npc/ai peds or scenario peds to 0https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P
SetGarbageTrucks(false) -- Stop garbage trucks from randomly spawninghttps://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
SetRandomBoats(false) -- Stop random boats from spawning in the water.https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E?pwd=bcd9
SetCreateRandomCops(false) -- disable random cops walking/driving around.https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N
SetCreateRandomCopsNotOnScenarios(false) -- stop random cops (not in a scenario) from spawning.https://pan.baidu.com/s/9R0S1T2U3V4W5X6Y7Z8A
SetCreateRandomCopsOnScenarios(false) -- stop random cops (in a scenario) from spawning.https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
https://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L
local x,y,z = table.unpack(GetEntityCoords(PlayerPedId()))https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
ClearAreaOfVehicles(x, y, z, 1000, false, false, false, false, false)哈哈
RemoveVehiclesFromGeneratorsInArea(x - 500.0, y - 500.0, z - 500.0, x + 500.0, y + 500.0, z + 500.0);https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
endhttps://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
end)https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
https://pan.baidu.com/s/2U3V4W5X6Y7Z8A9B0C1D
https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
https://pan.baidu.com/s/3U4V5W6X7Y8Z9A0B1C2D?pwd=yza8
这种方法对性能占用较大 如图https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2
https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
我之前试过https://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q?pwd=klm1
local pedhttps://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N?pwd=bcd8
https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K
Citizen.CreateThread(function()https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
https://pan.baidu.com/s/7O8P9Q0R1S2T3U4V5W6X?pwd=efgh
SetCreateRandomCops(false) -- disable random cops walking/driving around.https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G?pwd=hij1
SetCreateRandomCopsNotOnScenarios(false) -- stop random cops (not in a scenario) from spawning.https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
SetCreateRandomCopsOnScenarios(false) -- stop random cops (in a scenario) from spawning.https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V
SetGarbageTrucks(false) -- Stop garbage trucks from randomly spawninghttps://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
SetRandomBoats(false) -- Stop random boats from spawning in the water.https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
https://pan.baidu.com/s/7X8Y9Z0A1B2C3D4E5F6G?pwd=jkl5
while true dohttps://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K
Citizen.Wait(1) -- prevent crashinghttps://pan.baidu.com/s/6H7I8J9K0L1M2N3O4P5Q
https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
-- These natives have to be called every frame.https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd
SetVehicleDensityMultiplierThisFrame(0.0) -- set traffic density to 0 https://pan.baidu.com/s/2U3V4W5X6Y7Z8A9B0C1D
SetRandomVehicleDensityMultiplierThisFrame(0.0) -- set random vehicles (car scenarios / cars driving off from a parking spot etc.) to 0https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
SetParkedVehicleDensityMultiplierThisFrame(0.0) -- set random parked vehicles (parked car scenarios) to 0https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
endhttps://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
end)https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
Citizen.CreateThread(function()https://pan.baidu.com/s/5G6H7I8J9K0L1M2N3O4P
while true dohttps://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0
Citizen.Wait(3000)https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
local x,y,z = table.unpack(GetEntityCoords(ped))https://pan.baidu.com/s/7Z8A9B0C1D2E3F4G5H6I
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
ClearAreaOfVehicles(x, y, z, 1000, false, false, false, false, false)https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
RemoveVehiclesFromGeneratorsInArea(x - 500.0, y - 500.0, z - 500.0, x + 500.0, y + 500.0, z + 500.0);https://pan.baidu.com/s/5F6G7H8I9J0K1L2M3N4O?pwd=efg9
endhttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
end)https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B?pwd=tuv6
Citizen.CreateThread(function()https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
while true dohttps://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx
https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
Wait(5000)https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
ped = PlayerPedId()https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
endhttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
end)https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
这种方法可以删除大部分的AI车辆 并且有效降低性能占用 但是他不能把车辆全部删除干净 仍然偶尔会有一到两辆车生成https://pan.baidu.com/s/4U5V6W7X8Y9Z0A1B2C3D?pwd=bcd2
https://pan.baidu.com/s/5P6Q7R8S9T0U1V2W3X4Y
有没有什么办法 可以把AI车辆彻底删除干净 并且减少占用哈哈
https://pan.baidu.com/s/8A9B0C1D2E3F4G5H6I7J
https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
|