Lormateve Posted September 18, 2018 Share Posted September 18, 2018 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
Simple. Posted September 18, 2018 Share Posted September 18, 2018 (edited) getPedOccupiedVehicleSeat @Lormateve Edited September 18, 2018 by Simple. 1 Link to comment
Lormateve Posted September 20, 2018 Author Share Posted September 20, 2018 (edited) Thank you for your collaboration! I was able to solve it with: @Simple. if source == localPlayer then Edited September 20, 2018 by Lormateve 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now