Chris!i! Posted July 13, 2014 Share Posted July 13, 2014 Hello everybody i have a script that dont work and im trial scripter so i didnt knew whats wrong and no errors saying in the console so i decided to share it here in the mta community i know its not completed but to test this part and its wrong D: there is no marker and nothing whats wrong anyone thanks verymuch i mean when he hit the marker the panel will appear with sneak and those the others any help look at it marker = createMarker(2717, -363, 28, "cylinder", 1, 0, 128, 0, 100) --2717 -363 28 local screenX, screenY = guiGetScreenSize() local width, height = 611, 632 local x = local x = (screenX/387) - (width/6) local y = (screenY/98) - (height/6) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Walking Style By SeXyGhost",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) sneakBut = guiCreateButton(35,42,173,130,"Sneak",true,theWindow) sexywomanBut = guiCreateButton(348,47,184,125,"Sexy Women",true,theWindow) proBut = guiCreateButton(36,209,172,139,"PrO",true,theWindow) joggerBut = guiCreateButton(348,206,184,142,"Jogger",true,theWindow) blindguyBut = guiCreateButton(37,385,171,137,"Blind Guy",true,theWindow) drunkmanBut = guiCreateButton(351,381,188,141,"Drunk Man",true,theWindow) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end addEventHandler("onClientMarkerHit", marker, markerhit) Link to comment
Castillo Posted July 13, 2014 Share Posted July 13, 2014 You are using "Wnd" at guiSetVisible, but your variable is "theWindow". Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 Oh u mean the code look it i did what u told me marker = createMarker(1522, -1011, 25, "cylinder", 1, 0, 0, 255, 0) --1522 -1011 25 local screenX, screenY = guiGetScreenSize() local width, height = 611, 632 local x = local x = (screenX/387) - (width/6) local y = (screenY/98) - (height/6) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Walking Style By SeXyGhost",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) sneakBut = guiCreateButton(35,42,173,130,"Sneak",true,theWindow) sexywomanBut = guiCreateButton(348,47,184,125,"Sexy Women",true,theWindow) proBut = guiCreateButton(36,209,172,139,"PrO",true,theWindow) joggerBut = guiCreateButton(348,206,184,142,"Jogger",true,theWindow) blindguyBut = guiCreateButton(37,385,171,137,"Blind Guy",true,theWindow) drunkmanBut = guiCreateButton(351,381,188,141,"Drunk Man",true,theWindow) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) end addEventHandler("onClientMarkerHit", marker, markerhit) Link to comment
Castillo Posted July 13, 2014 Share Posted July 13, 2014 Do you get any errors in the debugscript? Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 debugscript whats that ? Link to comment
Castillo Posted July 13, 2014 Share Posted July 13, 2014 Write /debugscript 3 in the chatbox and restart your script. In the bottom of your screen, a small window will appear, it should display errors, if there are any. Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 this appears when i wrote and restarted the script ERROR: Loading script failed: WalkingStyle\Walking.lua:4: unexpected symbol near 'local' Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 I fixed this error then i restarted it and it appear another one : ERROR: Loading script failed: WalkingStyle\Walking.lua:23:'end' expected (to close 'if' at line 18) near '' that always appear with some scripts ... Link to comment
Castillo Posted July 13, 2014 Share Posted July 13, 2014 function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) end addEventHandler("onClientMarkerHit", marker, markerhit) You have two missing 'end' Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 ERROR: Loading script failed: WalkingStyle\Walking.lua:23:'end' expected (to close 'if' at line 18) near '' same reason still D: Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 marker = createMarker(1561, -1024, 24, "cylinder", 1, 0, 0, 255, 0) local screenX, screenY = guiGetScreenSize() local width, height = 611, 632 local x = (screenX/387) - (width/6) local y = (screenY/98) - (height/6) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Walking Style By SeXyGhost",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) sneakBut = guiCreateButton(35,42,173,130,"Sneak",true,theWindow) sexywomanBut = guiCreateButton(348,47,184,125,"Sexy Women",true,theWindow) proBut = guiCreateButton(36,209,172,139,"PrO",true,theWindow) joggerBut = guiCreateButton(348,206,184,142,"Jogger",true,theWindow) blindguyBut = guiCreateButton(37,385,171,137,"Blind Guy",true,theWindow) drunkmanBut = guiCreateButton(351,381,188,141,"Drunk Man",true,theWindow) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) end addEventHandler("onClientMarkerHit", marker, markerhit) Link to comment
Chronic Posted July 13, 2014 Share Posted July 13, 2014 marker = createMarker(1561, -1024, 24, "cylinder", 1, 0, 0, 255, 0) local screenX, screenY = guiGetScreenSize() local width, height = 611, 632 local x = (screenX/387) - (width/6) local y = (screenY/98) - (height/6) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Walking Style By SeXyGhost",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) sneakBut = guiCreateButton(35,42,173,130,"Sneak",true,theWindow) sexywomanBut = guiCreateButton(348,47,184,125,"Sexy Women",true,theWindow) proBut = guiCreateButton(36,209,172,139,"PrO",true,theWindow) joggerBut = guiCreateButton(348,206,184,142,"Jogger",true,theWindow) blindguyBut = guiCreateButton(37,385,171,137,"Blind Guy",true,theWindow) drunkmanBut = guiCreateButton(351,381,188,141,"Drunk Man",true,theWindow) function markerhit(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(theWindow) then guiSetVisible(theWindow, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, markerhit) Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 Still same reason D: Error ... Link to comment
Chris!i! Posted July 13, 2014 Author Share Posted July 13, 2014 Well i entered the marker and all things but the marker alpha is 0 and its invisible and the gui show but there is nothing on it no sneak no blind guy nothing why D: and in the debug it still the same reason 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