Deepu Posted February 21, 2014 Posted February 21, 2014 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.
Anubhav Posted February 21, 2014 Posted February 21, 2014 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) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Deepu Posted February 21, 2014 Author Posted February 21, 2014 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.
manve1 Posted February 21, 2014 Posted February 21, 2014 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
Karuzo Posted February 21, 2014 Posted February 21, 2014 Just put the local in front of blipD away and it should work.
Deepu Posted February 21, 2014 Author Posted February 21, 2014 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.
Saml1er Posted February 21, 2014 Posted February 21, 2014 thanks manvIt 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.
Deepu Posted February 21, 2014 Author Posted February 21, 2014 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.
Karuzo Posted February 21, 2014 Posted February 21, 2014 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.
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