[Release] Disable vehicles and peds

It’s in French ? It’s also in English (config/config.lua : lang = ‘en’)

@Kyominii

Yes, but I mean you have to translate if you want to change things, for example I am Spanish, not English or French, I have to adapt to my language

1 Like

I leave here a video I made in fivem with several mods

My project

it’s work now ??? I tried but when i join server i get couldn’t load resources noped

can u help me i install it everything is working but i still hear sounds like someone is hiting the horn or police siren can how can i remove theM ?

1 Like

i need this too, how can i remove all native sounds from removed vehicles and peds?

I found a BIG BIG BUG.

When you are the first person on the server, and there are more People on this server, and the game of the First Person crashes (Timed out after 10 Seconds), then the Script resets, that means, that there are vehicles again.


i get this now pls help me

You must create a file resource.lua like inside your others folders…

That’s the same on all servers that use this sadly

guys the problem was in the _resource.lua file
we downloaded it from someone who wrote the file name incorrectly and also the resource manifest version was old, everything should look like this:

in the _resource.lua file :


resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

client_script 'client.lua'

in the client.lua file:

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)

also, don’t forget to start the script in the server config file

4 Likes

Reupload it please, the link is no longer active

@Sasquatch-Gaming This resource is from 2016 and the author has not been online since 2016 so the link probs wont be updated plus this is most likely not a FX server script

DensityMultiplier = 0.00
Citizen.CreateThread(function()
	while true do
	    Citizen.Wait(0)
	    SetVehicleDensityMultiplierThisFrame(DensityMultiplier)
	    SetPedDensityMultiplierThisFrame(DensityMultiplier)
	    SetRandomVehicleDensityMultiplierThisFrame(DensityMultiplier)
	    SetParkedVehicleDensityMultiplierThisFrame(DensityMultiplier)
	    SetScenarioPedDensityMultiplierThisFrame(DensityMultiplier, DensityMultiplier)
	end
end)

Add anywhere client side.

2 Likes

This doesn’t quite work, it stops the majority of peds but some remain.

Anyone have a better way?

Ekrema’s solution works actually, that extra part is all that’s needed.

On our server cars disappear again and again from which one has got off.

Question to this both lines:
ClearAreaOfVehicles(pos.x, pos.y, pos.z, 1000, false, false, false, false, false)
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);

What does the value say 1000 and what the values ​​-50 / +500, please?

@nobody are you down…? 27 days puh…

nopeds.lua (680 Bytes)

thank you very much lol

How to remove certain models nps vehicles - like Bus?
in NPC_Control - cars not worked, only peds:


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_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_Y_Fireman_01",
  "s_m_m_paramedic_01"
}

cfg.vehicles = { -- these vehicles wont show up anywhere, they will be removed unless a player is in the driver seat
    "bus",
	"Coach",
	"Airbus",
	"Khanjali",
	"Trailersmall2",
	"Hydra",
	"Lazer",
	"RHINO"
}