Jump to content

Duda con Blipsn de vehiculo


Hukaeshi

Recommended Posts

vehicleBlips = {}

addEventHandler( "onClientElementStreamIn", getRootElement(),
	function()
		if getElementType( source ) == "vehicle" then
			setTimer(
				function( v )
					vehicleBlips[v] = createBlipAttachedTo( v, 0, 1, 0, 0, 255, 150, 0 )
				end,
			100, 1, source )
		end
	end
)

	function blip()
		if getElementType( source ) == "vehicle" then
			if vehicleBlips[source] then
				destroyElement( vehicleBlips[source] )
				vehicleBlips[source] = nil
			end
		end
		removeEventHandler("onClientElementStreamOut", source, blip)
	removeEventHandler("onClientElementDestroy", source, blip)
	end
addEventHandler( "onClientElementStreamOut", getRootElement(), blip )

Como puedo hacer que cuando un vehiculo se le de destroy, el blip de este desaparesca.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...