AhmadHwetat Posted May 9, 2017 Share Posted May 9, 2017 addEventHandler("onClientMarkerHit" , Marker , markerhit) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end end thats dont work . Link to comment
Syntrax# Posted May 9, 2017 Share Posted May 9, 2017 (edited) Put your entire code on here please. Edited May 9, 2017 by Syntrax# Link to comment
Gordon_G Posted May 10, 2017 Share Posted May 10, 2017 You handle a function who is not defined, put the event handler below the function Link to comment
AhmadHwetat Posted May 10, 2017 Author Share Posted May 10, 2017 On 5/9/2017 at 22:14, Syntrax# said: Put your entire code on here please. GUIEditor_Window[1] = guiCreateWindow(23,26,765,557,"Gun",false) guiSetAlpha(GUIEditor_Window[1],1) pi1 = guiCreateStaticImage(45,40,86,81,"images/sa1.png",false,GUIEditor_Window[1]) ---colt sl1 = guiCreateButton(26,132,106,39,"100$",false,GUIEditor_Window[1]) guiSetFont(sl1,"default-bold-small") pi2 = guiCreateStaticImage(160,40,86,81,"images/sa2.png",false,GUIEditor_Window[1]) --scilend sl2 = guiCreateButton(148,132,106,39,"150$",false,GUIEditor_Window[1]) guiSetFont(sl2,"default-bold-small") pi3 = guiCreateStaticImage(285,40,86,81,"images/sa3.png",false,GUIEditor_Window[1]) --deagle sl3 = guiCreateButton(274,132,106,39,"250$",false,GUIEditor_Window[1]) guiSetFont(sl3,"default-bold-small") pi4 = guiCreateStaticImage(400,40,86,81,"images/sa4.png",false,GUIEditor_Window[1]) -- shoutgun sl4 = guiCreateButton(394,132,106,39,"500$",false,GUIEditor_Window[1]) guiSetFont(sl4,"default-bold-small") pi5 = guiCreateStaticImage(530,40,86,81,"images/sa5.png",false,GUIEditor_Window[1]) -- sawn GUIEditor_Button[1] = guiCreateButton(520,132,106,39,"250$",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") pi6 = guiCreateStaticImage(648,40,86,81,"images/sa6.png",false,GUIEditor_Window[1]) ---- combat sl5 = guiCreateButton(520,132,106,39,"1000$",true,GUIEditor_Window[1]) guiSetFont(sl5,"default-bold-small") sl6 = guiCreateButton(639,132,106,39,"1000$",false,GUIEditor_Window[1]) guiSetFont(sl6,"default-bold-small") pi7 = guiCreateStaticImage(45,175,86,81,"images/sa7.png",false,GUIEditor_Window[1]) ---uzi sl7 = guiCreateButton(26,266,106,39,"1000$",false,GUIEditor_Window[1]) guiSetFont(sl7,"default-bold-small") pi8 = guiCreateStaticImage(160,175,86,81,"images/sa8.png",false,GUIEditor_Window[1]) ----MP5 sl8 = guiCreateButton(149,266,106,39,"1000$",false,GUIEditor_Window[1]) guiSetFont(sl8,"default-bold-small") pi10 = guiCreateStaticImage(400,175,86,81,"images/sa10.png",false,GUIEditor_Window[1]) --- M4 sl10 = guiCreateButton(394,266,106,39,"1500$",false,GUIEditor_Window[1]) guiSetFont(sl10,"default-bold-small") pi11 = guiCreateStaticImage(530,175,86,81,"images/sa11.png",false,GUIEditor_Window[1]) --- tec sl11 = guiCreateButton(520,266,106,39,"1000$",false,GUIEditor_Window[1]) guiSetFont(sl11,"default-bold-small") pi9 = guiCreateStaticImage(285,175,86,81,"images/sa9.png",false,GUIEditor_Window[1]) ---- ak sl9 = guiCreateButton(269,266,106,39,"1500$",false,GUIEditor_Window[1]) guiSetFont(sl9,"default-bold-small") pi12 = guiCreateStaticImage(648,175,86,81,"images/sa12.png",false,GUIEditor_Window[1]) --- rifle sl12 = guiCreateButton(641,266,106,39,"1000$",false,GUIEditor_Window[1]) guiSetFont(sl12,"default-bold-small") pi13 = guiCreateStaticImage(45,310,86,81,"images/sa13.png",false,GUIEditor_Window[1]) ---SNIPER sl13 = guiCreateButton(26,395,106,39,"1000$",false,GUIEditor_Window[1]) guiSetFont(sl13,"default-bold-small") pi14 = guiCreateStaticImage(160,310,86,81,"images/sa14.png",false,GUIEditor_Window[1]) ---rocket sl14 = guiCreateButton(152,395,106,39,"5000$",false,GUIEditor_Window[1]) guiSetFont(sl14,"default-bold-small") pi15 = guiCreateStaticImage(285,310,86,81,"images/sa15.png",false,GUIEditor_Window[1]) ---rocketfollowing sl15 = guiCreateButton(272,395,106,39,"5500$",false,GUIEditor_Window[1]) guiSetFont(sl15,"default-bold-small") pi16 = guiCreateStaticImage(400,310,86,81,"images/sa16.png",false,GUIEditor_Window[1]) ----firegun sl16 = guiCreateButton(392,395,106,39,"5500$",false,GUIEditor_Window[1]) guiSetFont(sl16,"default-bold-small") guiSetFont(GUIEditor_Button[2],"default-bold-small") guiSetFont(GUIEditor_Button[3],"default-bold-small") pi19 = guiCreateStaticImage(285,419,208,127,"images/Mypicture.png",false,GUIEditor_Window[1]) addEventHandler("onClientMarkerHit" , Marker , markerhit) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end end Marker = createMarker(223.64908 ,1861.93970 ,13.14696-1.5,"cylinder",2.5,122,9,107,255) On 5/10/2017 at 00:07, Reval said: any errors in debugscript ? nah Link to comment
Gordon_G Posted May 10, 2017 Share Posted May 10, 2017 (edited) addEventHandler("onClientMarkerHit" , Marker , markerhit) try to put it at the end of the file, because actually, when you trigger, markerhit is a nil value and Marker too Edited May 10, 2017 by Gordon_G 1 Link to comment
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