Jump to content

Help with markers


Recommended Posts

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

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