DuFraN Posted May 6, 2014 Share Posted May 6, 2014 hey guys, i have a problem, when I do the truck route for the first time the script work perfectly but the second time doesn't work, help me. function crear_ruta() Marcador_1 = createMarker(2842,-1847,10,"cylinder",5,255,150,0,255) function Cuando_Toque(hitPlayer) vehicle = getPedOccupiedVehicle ( hitPlayer ) if hitPlayer == getLocalPlayer() then if source == Marcador_1 then destroyElement(source) Marcador_2 = createMarker(2893,-911,10,"cylinder",5,255,150,0,255) elseif source == Marcador_2 then destroyElement(source) Marcador_3 = createMarker(2774,-54,35,"cylinder",5,255,150,0,255) elseif source == Marcador_3 then destroyElement(source) Marcador_4 = createMarker(2466,324,31,"cylinder",5,255,150,0,255) elseif source == Marcador_4 then destroyElement(source) Marcador_5 = createMarker(1769,280,18,"cylinder",5,255,150,0,255) elseif source == Marcador_5 then destroyElement(source) Marcador_6 = createMarker(1701,999,10,"cylinder",5,255,150,0,255) elseif source == Marcador_6 then destroyElement(source) triggerServerEvent("XD",localPlayer,hitPlayer) setTimer(outputChatBox,1000,1,"Has completado la ruta, como recompenza obtienes 10000!.",255,255,255) end end end addEventHandler ( "onClientMarkerHit", getRootElement(), Cuando_Toque ) end addEvent("Cuando_Toque",true) addEventHandler("Cuando_Toque",root,crear_ruta) error at line 11. Link to comment
Castillo Posted May 6, 2014 Share Posted May 6, 2014 Why it doesn't work? what is the error? Link to comment
DuFraN Posted May 6, 2014 Author Share Posted May 6, 2014 when i finish the route and I want to do another route this doesn't work because error at line 11 "bad element pointer destroyElement" something. 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