Jump to content

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


Deepu

Recommended Posts

Posted

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) 

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted
  
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) 
  

Posted

bad argument at setblip size cuz 0 can't be possible

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted
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) 

Looking for tutorials or information? check out: www.simpleask.co.uk

Posted

thanks manv

It worked :)

by the way, what did you do?

is it the same "destroyElement(blipD)" ?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

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

Posted

SO I CANT USE IT GLOBALLY?

should I use as a local function?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

No, he means you should use it global, otherwise you couldn't use it in your LS Func, 'cause the blip was created locally in the function and the LS function won't know that there is this blip.

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