Jump to content

urgent blip destroy.............................


Deepu

Recommended Posts

how do I destroy blip? please tell

function requestNewMarkers () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
   local x,y,z = unpack(poopMarkers[math.random(#poopMarkers)]) 
   reach = createMarker(x,y,z) 
   guiSetVisible(jobWindow, false) 
   local blip = createBlipAttachedTo(reach, 51) 
end 
  
  
  
function LS (hitElement) 
   if source == reach then 
      if hitElement == thePlayer then 
      triggerServerEvent("onChakka", thePlayer, "yokohama") 
      destroyElement(reach) 
      setTimer(requestNewMarkers, 5000, 1) 
      destroyElement(blip) 
      end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), LS) 

Link to comment
  
function requestNewMarkers () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
   local x,y,z = unpack(poopMarkers[math.random(#poopMarkers)]) 
   reach = createMarker(x,y,z) 
   guiSetVisible(jobWindow, false) 
   local blipD = createBlipAttachedTo(reach, 51) 
end 
  
  
  
function LS (hitElement) 
   if source == reach then 
      if hitElement == thePlayer then 
      triggerServerEvent("onChakka", thePlayer, "yokohama") 
      destroyElement(reach) 
      setTimer(requestNewMarkers, 5000, 1) 
      setBlipSize(blipD,0) 
      end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), LS) 
  

Link to comment
function requestNewMarkers () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
   local x,y,z = unpack(poopMarkers[math.random(#poopMarkers)]) 
   reach = createMarker(x,y,z) 
   guiSetVisible(jobWindow, false) 
   blipD = createBlipAttachedTo(reach, 51) 
end 
  
  
  
function LS (hitElement) 
   if source == reach then 
      if hitElement == thePlayer then 
      triggerServerEvent("onChakka", thePlayer, "yokohama") 
      destroyElement(reach) 
      setTimer(requestNewMarkers, 5000, 1) 
      if isElement(blipD) then 
      destroyElement(blipD) 
      end 
      end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), LS) 

Link to comment
thanks manv

It worked :)

by the way, what did you do?

is it the same "destroyElement(blipD)" ?

He just removed local because when you add local then the variable will exist inside that function only, you cannot use it outside the function nor in any other function so he removed it and now it exists outside the function as well, that's why you're able to destroy it.

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