Jump to content

destroy blip on marker hit


stefutz101

Recommended Posts

function matura(source) 
        local marker = createMarker( 0, 0, 0, "cylinder", 3, 255, 0, 0, 170, source) 
        local blip = createBlip(0, 0, 0,0,2,255,0,0,255,0,2000,source) 
        addEventHandler( "onMarkerHit", marker, MarkerHit1) 
end 
addCommandHandler("broom",matura) 
  
function MarkerHit1( hitElement, matchingDimension ) 
    if isElement(source) and getElementType(source)=="marker" then 
    destroyElement(source) 
    end 
        if isElement(blip) and getElementType(blip)=="blip" then 
    destroyElement(blip) 
    end 
end 
  
  

How i can destroy a blip on marker hit ? I should tigger a function ? To do that ?

EDIT:

triggerServerEvent ( "delmarker", blip) 
----------------------- 
function destroyblip(blip) 
    if isElement(blip) and getElementType(blip)=="blip" then 
        destroyElement(blip) 
    end 
end 
addEvent ( "delmarker", true ) 
addCommandHandler("delmarker",destroyblip) 

Cand i do like this ?

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