Need a resource to delete vehicles of a certain model around the player

Hi there everyone!

I need a resource/snippet that will look for a vehicle of a model around the player and if found, delete it.

I have found code to delete a vehicle of a certain model if a player gets into it or scenarios of it or dispatches of a certain model. I don’t need those.

For clarity, I need a loop that will delete a panto if it’s within the area around a player.

Any links or snippets would be greatly appreciated. Thanks for your time!

Hi,

GetClosestVehicle(float x, float y, float z, float radius, Hash modelHash, int flags)

This could also work

https://runtime.fivem.net/doc/natives/#_0x386F6CE5BAF6091C

GetRandomVehicleInSphere(
		x --[[ number ]], 
		y --[[ number ]], 
		z --[[ number ]], 
		radius --[[ number ]], 
		modelHash --[[ Hash ]], 
		flags --[[ integer ]]
	)