[help] Remove Object

What isn’t working? Limited on spawncap? Remove or change the limiter.
You are also providing two Z coords, when only 1 can be used. Remove worldZ as that’s the one you don’t want.

local PlacedCones = {}
function PlaceCones()
	Citizen.CreateThread(function()
		local prophash = GetHashKey("prop_mp_cone_02")
		RequestModel(prophash)
		while not HasModelLoaded(prophash) do
			Citizen.Wait(0)
		end
		local offset = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0.0, 0.75, 0.0)
		local propsobj = CreateObjectNoOffset(prophash, offset.x, offset.y, offset.z, true, true, true)
		local heading = GetEntityHeading(GetPlayerPed(-1))
		SetEntityHeading(propsobj, heading)
		SetModelAsNoLongerNeeded(prophash)
		SetEntityAsMissionEntity(propsobj)
		PlacedCones[#PlacedCones+1] = ObjToNet(propsobj)
	end)
end

@itshb
It is already arranged companion many thanks for the help you are a big if I need something more I will let you know if you need anything let me know ^^

I’m Spanish and that’s why there are things I do not understand since English does not give me soooooooooooo good jajajajajaj

@Flatracer

Sorry there is no list with npc names to try to spawn?

1 Like

Just commenting to say there is a list of ped hashes if that would suffice for you.

1 Like

@mraes

Great ! And this can be used with the police mod as well? I’m going to try it right now but I wonder if it works since peds and props may not be the same function mmmmm

@mraes

I already tried it I put to the police with queue but not the spawnea as I had thought the props and the peds are different. Do you know if there is any mod or something to make appear npc?

Nope, besides that little link to a list of all peds in the game I can give you nothing :slight_smile:

1 Like

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

My project in fiveM with several mods

Can you give me the resource, I am having a problem with my server that when I throw away the item it is not deleted until I restart the server

hey i added new objects in F6 menu in mechanic job they spawn but i cant delete them with “e” im low rank scripter can you please help me?