raynner Posted November 5, 2015 Share Posted November 5, 2015 hello good I was doing a simple panel for use in Some events, he is quite ready however wish he abrise by mark could someone please fix the min to function? thank you. SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) setElementDimension(SpawnveicleRcLr01, 110) RACELRWINDS = guiCreateWindow(498, 289, 267, 158, "PAINEL RACE LOS RED", false) guiWindowSetSizable(RACELRWINDS, false) guiSetProperty(RACELRWINDS, "CaptionColour", "FF1700FC") guiSetVisible(RACELRWINDS, false) MyFont = guiCreateFont("Arquivos/s3d.ttf", 9) Img = guiCreateStaticImage(0, 20, 266, 134, "Arquivos/LogoRED.png", false, RACELRWINDS) ProImg = guiCreateLabel(0, 20, 266, 134, "", false, RACELRWINDS) CAR1 = guiCreateButton(10, 30, 110, 32, "Carro 1", false, RACELRWINDS) guiSetFont(CAR1, MyFont) guiSetProperty(CAR1, "NormalTextColour", "FF2AFE00") CAR2 = guiCreateButton(148, 30, 107, 32, "Carro 2", false, RACELRWINDS) guiSetFont(CAR2, MyFont) guiSetProperty(CAR2, "NormalTextColour", "FF2AFE00") DESTROY = guiCreateButton(10, 88, 110, 32, "destroir carro", false, RACELRWINDS) guiSetFont(DESTROY, MyFont) guiSetProperty(DESTROY, "NormalTextColour", "FFFCF420") BIND = guiCreateButton(148, 88, 108, 32, "Bind F1 B", false, RACELRWINDS) guiSetFont(BIND, MyFont) guiSetProperty(BIND, "NormalTextColour", "FFFCF420") EXIT = guiCreateButton(47, 127, 175, 21, "Fechar", false, RACELRWINDS) guiSetFont(EXIT, MyFont) guiSetProperty(EXIT, "NormalTextColour", "FFFD0000") GUIEditor.label[1] = guiCreateLabel(0, 20, 266, 134, "", false, RACELRWINDS) function visiblyLrRc () if guiGetVisible(RACELRWINDS) then guiSetVisible(RACELRWINDS, false) showCursor(false) else guiSetVisible(RACELRWINDS, true) showCursor(true) end end addEventHandler( "onMarkerHit", SpawnveicleRcLr01, visiblyLrRc ) Link to comment
Rockyz Posted November 5, 2015 Share Posted November 5, 2015 Try This ? SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) setElementDimension(SpawnveicleRcLr01, 110) RACELRWINDS = guiCreateWindow(498, 289, 267, 158, "PAINEL RACE LOS RED", false) guiWindowSetSizable(RACELRWINDS, false) guiSetProperty(RACELRWINDS, "CaptionColour", "FF1700FC") guiSetVisible(RACELRWINDS, false) MyFont = guiCreateFont("Arquivos/s3d.ttf", 9) Img = guiCreateStaticImage(0, 20, 266, 134, "Arquivos/LogoRED.png", false, RACELRWINDS) ProImg = guiCreateLabel(0, 20, 266, 134, "", false, RACELRWINDS) CAR1 = guiCreateButton(10, 30, 110, 32, "Carro 1", false, RACELRWINDS) guiSetFont(CAR1, MyFont) guiSetProperty(CAR1, "NormalTextColour", "FF2AFE00") CAR2 = guiCreateButton(148, 30, 107, 32, "Carro 2", false, RACELRWINDS) guiSetFont(CAR2, MyFont) guiSetProperty(CAR2, "NormalTextColour", "FF2AFE00") DESTROY = guiCreateButton(10, 88, 110, 32, "destroir carro", false, RACELRWINDS) guiSetFont(DESTROY, MyFont) guiSetProperty(DESTROY, "NormalTextColour", "FFFCF420") BIND = guiCreateButton(148, 88, 108, 32, "Bind F1 B", false, RACELRWINDS) guiSetFont(BIND, MyFont) guiSetProperty(BIND, "NormalTextColour", "FFFCF420") EXIT = guiCreateButton(47, 127, 175, 21, "Fechar", false, RACELRWINDS) guiSetFont(EXIT, MyFont) guiSetProperty(EXIT, "NormalTextColour", "FFFD0000") GUIEditor.label[1] = guiCreateLabel(0, 20, 266, 134, "", false, RACELRWINDS) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( hitElement ) if ( source == SpawnveicleRcLr01 ) if ( hitElement == localPlayer ) then guiSetVisible ( RACELRWINDS, not guiGetVisible ( RACELRWINDS ) ) showCursor ( guiGetVisible ( RACELRWINDS ) ) end end end ) Link to comment
Aristates Posted November 5, 2015 Share Posted November 5, 2015 why ? JUST it change. guiSetVisible ( RACELRWINDS, not guiGetVisible ( RACELRWINDS ) )showCursor ( guiGetVisible ( RACELRWINDS ) ) addEventHandler ( "onClientMarkerHit", root, function (hitElement) if source == SpawnveicleRcLr01 if hitElement == localPlayer then guiSetVisible(RACELRWINDS, true) showCursor(true) end end end) addEventHandler ( "onClientMarkerLeave", root, function (hitElement) if source == SpawnveicleRcLr01 if hitElement == localPlayer then guiSetVisible(RACELRWINDS, false) showCursor(false) end end end) Link to comment
raynner Posted November 5, 2015 Author Share Posted November 5, 2015 thank you but unfortunately neither of them work for it after the mark simply does not appear, any tips? Link to comment
Aristates Posted November 5, 2015 Share Posted November 5, 2015 fixed it code addEventHandler ( "onClientMarkerHit", root, function (hitElement) if source == SpawnveicleRcLr01 then if hitElement == localPlayer then guiSetVisible(RACELRWINDS, true) showCursor(true) end end end) addEventHandler ( "onClientMarkerLeave", root, function (hitElement) if source == SpawnveicleRcLr01 then if hitElement == localPlayer then guiSetVisible(RACELRWINDS, false) showCursor(false) end end end) Link to comment
raynner Posted November 5, 2015 Author Share Posted November 5, 2015 the mark reappeared over the panel not open or the cursor is activated Remember that this .lua and client and not server Link to comment
Aristates Posted November 5, 2015 Share Posted November 5, 2015 what do you mean ? working the gui. SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) addEventHandler ( "onClientResourceStart", root, function() RACELRWINDS = guiCreateWindow(498, 289, 267, 158, "PAINEL RACE LOS RED", false) guiWindowSetSizable(RACELRWINDS, false) guiSetProperty(RACELRWINDS, "CaptionColour", "FF1700FC") guiSetVisible(RACELRWINDS, false) end) addEventHandler ( "onClientMarkerHit", root, function (hitElement) if source == SpawnveicleRcLr01 then if hitElement == localPlayer then guiSetVisible(RACELRWINDS, true) showCursor(true) end end end) addEventHandler ( "onClientMarkerLeave", root, function (hitElement) if source == SpawnveicleRcLr01 then if hitElement == localPlayer then guiSetVisible(RACELRWINDS, false) showCursor(false) end end end) Link to comment
raynner Posted November 5, 2015 Author Share Posted November 5, 2015 what do you mean ? working the gui. SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) addEventHandler ( "onClientResourceStart", root, function() RACELRWINDS = guiCreateWindow(498, 289, 267, 158, "PAINEL RACE LOS RED", false) guiWindowSetSizable(RACELRWINDS, false) guiSetProperty(RACELRWINDS, "CaptionColour", "FF1700FC") guiSetVisible(RACELRWINDS, false) end) addEventHandler ( "onClientMarkerHit", root, function (hitElement) if source == SpawnveicleRcLr01 then if hitElement == localPlayer then guiSetVisible(RACELRWINDS, true) showCursor(true) end end end) addEventHandler ( "onClientMarkerLeave", root, function (hitElement) if source == SpawnveicleRcLr01 then if hitElement == localPlayer then guiSetVisible(RACELRWINDS, false) showCursor(false) end end end) yes it worked thank you brother <3 Link to comment
Rockyz Posted November 7, 2015 Share Posted November 7, 2015 Hes Code When Any Resource Start Will Make The GUI And Make It Visible Try This ? : SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) RACELRWINDS = guiCreateWindow(498, 289, 267, 158, "PAINEL RACE LOS RED", false) guiWindowSetSizable(RACELRWINDS, false) guiSetProperty(RACELRWINDS, "CaptionColour", "FF1700FC") guiSetVisible(RACELRWINDS, false) end ) function OpPane ( hitElement ) if ( ( source == SpawnveicleRcLr01 ) and ( hitElement == localPlayer ) ) then if ( eventName == "onClientMarkerHit" ) then guiSetVisible ( RACELRWINDS, true ) showCursor ( true ) else guiSetVisible ( RACELRWINDS, false ) showCursor ( false ) end end ) addEventHandler ( "onClientMarkerHit", resourceRoot, OpPane ) addEventHandler ( "onClientMarkerLeave", resourceRoot, OpPane ) Link to comment
raynner Posted November 8, 2015 Author Share Posted November 8, 2015 Hes Code When Any Resource Start Will Make The GUI And Make It VisibleTry This ? : What ?? 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