Jump to content

The function is activated twice


Lormateve

Recommended Posts

 

The function is activated twice, that is, when I go in my vehicle with a person sitting as a companion, when you get to the marker, you activate all the functions when you step on it, even though you do not see the marker or everything the function includes, Does anyone know how to solve it?

 

--Client Side - Example


addEventHandler("onClientGUIClick", guiRoot,    
	function()
				addEventHandler( "onClientMarkerHit", Marker, First )				
				Bla bla bla
			end
)

function First ()
	if timer then killTimer(timer) timer = nil end 

	 veh = getPedOccupiedVehicle( localPlayer )
			if veh then
   setElementFrozen ( veh, true )
	Outputchatbox ("Example")  --This is printed twice when there is a passenger in the vehicle

	setTimer (PreFuncParada, 1500, 1, pia)

end end 

 

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...