papam77 Posted July 23, 2013 Share Posted July 23, 2013 function lobby () showCursor ( true ) local bg = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true) } guiSetEnabled (bg["bg"], false ) local ikony = { ["dd"] = guiCreateStaticImage(0.09, 0.11, 0.27, 0.20, "img/dd.png", true), -- Obdélník ["drift"] = guiCreateStaticImage(0.09, 0.32, 0.13, 0.20, "img/drift.png", true), -- Čtverec ["parkour"] = guiCreateStaticImage(0.2296, 0.32, 0.13, 0.20, "img/parkour.png", true), -- Čtverec ["trials"] = guiCreateStaticImage(0.507, 0.11, 0.13, 0.20, "img/trials.png", true), -- Čtverec ["shooter"] = guiCreateStaticImage(0.368, 0.11, 0.13, 0.20, "img/shooter.png", true), -- Čtverec ["dm"] = guiCreateStaticImage(0.368, 0.32, 0.27, 0.20, "img/dm.png", true), -- Obdélník ["hunter"] = guiCreateStaticImage(0.368, 0.53, 0.27, 0.20, "img/hunter.png", true), -- Obdélník ["zombie"] = guiCreateStaticImage(0.646, 0.53, 0.27, 0.20, "img/zombie.png", true), -- Obdélník ["slender"] = guiCreateStaticImage(0.646, 0.32, 0.27, 0.20, "img/slender.png", true), -- Obdélník ["race"] = guiCreateStaticImage(0.646, 0.11, 0.27, 0.20, "img/race.png", true), -- Obdélník ["counterstrike"] = guiCreateStaticImage(0.09, 0.53, 0.27, 0.20, "img/counterstrike.png", true), -- Obdélník } local labely = { ["hraci"] = guiCreateLabel(0.00, 0.85, 1.00, 0.14, "Players: ".. tostring( #getElementsByType( "player" ) ), true) } font2 = guiCreateFont( "lithos.ttf", 50 ) guiSetFont( labely["hraci"], font2 ) guiLabelSetHorizontalAlign(labely["hraci"], "center", false) guiLabelSetVerticalAlign(labely["hraci"], "center") guiSetAlpha (ikony["dd"], 0.75 ) guiSetAlpha (ikony["drift"], 0.75 ) guiSetAlpha (ikony["parkour"], 0.75 ) guiSetAlpha (ikony["trials"], 0.75 ) guiSetAlpha (ikony["shooter"], 0.75 ) guiSetAlpha (ikony["dm"], 0.75 ) guiSetAlpha (ikony["hunter"], 0.75 ) guiSetAlpha (ikony["zombie"], 0.75 ) guiSetAlpha (ikony["slender"], 0.75 ) guiSetAlpha (ikony["race"], 0.75 ) guiSetAlpha (ikony["counterstrike"], 0.75 ) addEventHandler ( "onClientMouseEnter", root, function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 1 ) break end end end ) addEventHandler ( "onClientMouseLeave", root, function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 0.75 ) break end end end ) end addCommandHandler ("lobby", lobby ) function zpet () addEventHandler ( "onClientGUIClick", ikony["dm"], zpet2, false ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), zpet ) function zpet2(button) if button == "left" then showCursor ( false ) outputConsole ("work it") end end Why button doesn't work? ERROR: lobby/client.lua:69:attempt to index global 'ikony' (a nil value) Link to comment
Jaysds1 Posted July 23, 2013 Share Posted July 23, 2013 For the resource topic: Anything outside the function's are created automatically without anything to trigger it, and by not putting it inside a function then it's global for the rest of the script to use. The event "onClientResourceStart" is triggered after the resource is downloaded to the client, while anything outside of it and is global will be shown/created while the resource is being downloaded to the client. local bg = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true) } guiSetEnabled (bg["bg"], false ) local ikony = { ["dd"] = guiCreateStaticImage(0.09, 0.11, 0.27, 0.20, "img/dd.png", true), -- Obdélník ["drift"] = guiCreateStaticImage(0.09, 0.32, 0.13, 0.20, "img/drift.png", true), -- Čtverec ["parkour"] = guiCreateStaticImage(0.2296, 0.32, 0.13, 0.20, "img/parkour.png", true), -- Čtverec ["trials"] = guiCreateStaticImage(0.507, 0.11, 0.13, 0.20, "img/trials.png", true), -- Čtverec ["shooter"] = guiCreateStaticImage(0.368, 0.11, 0.13, 0.20, "img/shooter.png", true), -- Čtverec ["dm"] = guiCreateStaticImage(0.368, 0.32, 0.27, 0.20, "img/dm.png", true), -- Obdélník ["hunter"] = guiCreateStaticImage(0.368, 0.53, 0.27, 0.20, "img/hunter.png", true), -- Obdélník ["zombie"] = guiCreateStaticImage(0.646, 0.53, 0.27, 0.20, "img/zombie.png", true), -- Obdélník ["slender"] = guiCreateStaticImage(0.646, 0.32, 0.27, 0.20, "img/slender.png", true), -- Obdélník ["race"] = guiCreateStaticImage(0.646, 0.11, 0.27, 0.20, "img/race.png", true), -- Obdélník ["counterstrike"] = guiCreateStaticImage(0.09, 0.53, 0.27, 0.20, "img/counterstrike.png", true), -- Obdélník } for _,image in pairs(ikony)do guiSetAlpha(image,0.75) end local labely = { ["hraci"] = guiCreateLabel(0.00, 0.85, 1.00, 0.14, "Players: ".. tostring( #getElementsByType( "player" ) ), true) } local font2 = guiCreateFont( "lithos.ttf", 50 ) guiSetFont( labely["hraci"], font2 ) guiLabelSetHorizontalAlign(labely["hraci"], "center", false) guiLabelSetVerticalAlign(labely["hraci"], "center") --[[guiSetAlpha (ikony["dd"], 0.75 ) guiSetAlpha (ikony["drift"], 0.75 ) guiSetAlpha (ikony["parkour"], 0.75 ) guiSetAlpha (ikony["trials"], 0.75 ) guiSetAlpha (ikony["shooter"], 0.75 ) guiSetAlpha (ikony["dm"], 0.75 ) guiSetAlpha (ikony["hunter"], 0.75 ) guiSetAlpha (ikony["zombie"], 0.75 ) guiSetAlpha (ikony["slender"], 0.75 ) guiSetAlpha (ikony["race"], 0.75 ) guiSetAlpha (ikony["counterstrike"], 0.75 )]] addEventHandler ( "onClientMouseEnter", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 1 ) break end end end) addEventHandler ( "onClientMouseLeave", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 0.75 ) break end end end) local visible = false bindKey ("F1", "down",function() visible = not visible showCursor ( visible ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, visible ) end end) addEventHandler ( "onClientGUIClick", ikony["dm"], function(button) if button ~= "left" then return end showCursor ( false ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, not visible ) end end, false ) Link to comment
papam77 Posted July 23, 2013 Author Share Posted July 23, 2013 ofc yes, but it is showing me when i start resource, i don't want it.. Link to comment
Jaysds1 Posted July 23, 2013 Share Posted July 23, 2013 ok, try this then: local bg = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true) } for _,gui in pairs(bg)do guiSetVisible(gui,false) end guiSetEnabled (bg["bg"], false ) local ikony = { ["dd"] = guiCreateStaticImage(0.09, 0.11, 0.27, 0.20, "img/dd.png", true), -- Obdélník ["drift"] = guiCreateStaticImage(0.09, 0.32, 0.13, 0.20, "img/drift.png", true), -- Čtverec ["parkour"] = guiCreateStaticImage(0.2296, 0.32, 0.13, 0.20, "img/parkour.png", true), -- Čtverec ["trials"] = guiCreateStaticImage(0.507, 0.11, 0.13, 0.20, "img/trials.png", true), -- Čtverec ["shooter"] = guiCreateStaticImage(0.368, 0.11, 0.13, 0.20, "img/shooter.png", true), -- Čtverec ["dm"] = guiCreateStaticImage(0.368, 0.32, 0.27, 0.20, "img/dm.png", true), -- Obdélník ["hunter"] = guiCreateStaticImage(0.368, 0.53, 0.27, 0.20, "img/hunter.png", true), -- Obdélník ["zombie"] = guiCreateStaticImage(0.646, 0.53, 0.27, 0.20, "img/zombie.png", true), -- Obdélník ["slender"] = guiCreateStaticImage(0.646, 0.32, 0.27, 0.20, "img/slender.png", true), -- Obdélník ["race"] = guiCreateStaticImage(0.646, 0.11, 0.27, 0.20, "img/race.png", true), -- Obdélník ["counterstrike"] = guiCreateStaticImage(0.09, 0.53, 0.27, 0.20, "img/counterstrike.png", true), -- Obdélník } for _,image in pairs(ikony)do guiSetAlpha(image,0.75) end for _,gui in pairs(ikony)do guiSetVisible(gui,false) end local labely = { ["hraci"] = guiCreateLabel(0.00, 0.85, 1.00, 0.14, "Players: ".. tostring( #getElementsByType( "player" ) ), true) } local font2 = guiCreateFont( "lithos.ttf", 50 ) guiSetFont( labely["hraci"], font2 ) guiLabelSetHorizontalAlign(labely["hraci"], "center", false) guiLabelSetVerticalAlign(labely["hraci"], "center") for _,gui in pairs(labely)do guiSetVisible(gui,false) end --[[guiSetAlpha (ikony["dd"], 0.75 ) guiSetAlpha (ikony["drift"], 0.75 ) guiSetAlpha (ikony["parkour"], 0.75 ) guiSetAlpha (ikony["trials"], 0.75 ) guiSetAlpha (ikony["shooter"], 0.75 ) guiSetAlpha (ikony["dm"], 0.75 ) guiSetAlpha (ikony["hunter"], 0.75 ) guiSetAlpha (ikony["zombie"], 0.75 ) guiSetAlpha (ikony["slender"], 0.75 ) guiSetAlpha (ikony["race"], 0.75 ) guiSetAlpha (ikony["counterstrike"], 0.75 )]] addEventHandler ( "onClientMouseEnter", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 1 ) break end end end) addEventHandler ( "onClientMouseLeave", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 0.75 ) break end end end) local visible = false bindKey ("F1", "down",function() visible = not visible showCursor ( visible ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, visible ) end end) addEventHandler ( "onClientGUIClick", ikony["dm"], function(button) if button ~= "left" then return end showCursor ( false ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, not visible ) end end, false ) Next time just use guiSetVisible if you don't want it to be shown to the player. Link to comment
papam77 Posted July 23, 2013 Author Share Posted July 23, 2013 And how can make it with onPlayerJoin ? Because it hasn't function with name. Link to comment
Jaysds1 Posted July 23, 2013 Share Posted July 23, 2013 Why do you need "onPlayerJoin"? It'll only be triggered server-sided for when the player joins as the onResourceStart or onClientResourceStart would be triggered after the resource is downloaded to the client. Link to comment
papam77 Posted July 23, 2013 Author Share Posted July 23, 2013 I need it because when i join i need to show it. Link to comment
papam77 Posted July 23, 2013 Author Share Posted July 23, 2013 I made this: client: local bg = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true) } for _,gui in pairs(bg)do guiSetVisible(gui,false) end guiSetEnabled (bg["bg"], false ) local ikony = { ["dd"] = guiCreateStaticImage(0.09, 0.11, 0.27, 0.20, "img/dd.png", true), -- Obdélník ["drift"] = guiCreateStaticImage(0.09, 0.32, 0.13, 0.20, "img/drift.png", true), -- Čtverec ["parkour"] = guiCreateStaticImage(0.2296, 0.32, 0.13, 0.20, "img/parkour.png", true), -- Čtverec ["trials"] = guiCreateStaticImage(0.507, 0.11, 0.13, 0.20, "img/trials.png", true), -- Čtverec ["shooter"] = guiCreateStaticImage(0.368, 0.11, 0.13, 0.20, "img/shooter.png", true), -- Čtverec ["dm"] = guiCreateStaticImage(0.368, 0.32, 0.27, 0.20, "img/dm.png", true), -- Obdélník ["hunter"] = guiCreateStaticImage(0.368, 0.53, 0.27, 0.20, "img/hunter.png", true), -- Obdélník ["zombie"] = guiCreateStaticImage(0.646, 0.53, 0.27, 0.20, "img/zombie.png", true), -- Obdélník ["slender"] = guiCreateStaticImage(0.646, 0.32, 0.27, 0.20, "img/slender.png", true), -- Obdélník ["race"] = guiCreateStaticImage(0.646, 0.11, 0.27, 0.20, "img/race.png", true), -- Obdélník ["counterstrike"] = guiCreateStaticImage(0.09, 0.53, 0.27, 0.20, "img/counterstrike.png", true), -- Obdélník } for _,image in pairs(ikony)do guiSetAlpha(image,0.75) end for _,gui in pairs(ikony)do guiSetVisible(gui,false) end local labely = { ["hraci"] = guiCreateLabel(0.00, 0.85, 1.00, 0.14, "Players: ".. tostring( #getElementsByType( "player" ) ), true) } local font2 = guiCreateFont( "lithos.ttf", 50 ) guiSetFont( labely["hraci"], font2 ) guiLabelSetHorizontalAlign(labely["hraci"], "center", false) guiLabelSetVerticalAlign(labely["hraci"], "center") for _,gui in pairs(labely)do guiSetVisible(gui,false) end --[[guiSetAlpha (ikony["dd"], 0.75 ) guiSetAlpha (ikony["drift"], 0.75 ) guiSetAlpha (ikony["parkour"], 0.75 ) guiSetAlpha (ikony["trials"], 0.75 ) guiSetAlpha (ikony["shooter"], 0.75 ) guiSetAlpha (ikony["dm"], 0.75 ) guiSetAlpha (ikony["hunter"], 0.75 ) guiSetAlpha (ikony["zombie"], 0.75 ) guiSetAlpha (ikony["slender"], 0.75 ) guiSetAlpha (ikony["race"], 0.75 ) guiSetAlpha (ikony["counterstrike"], 0.75 )]] addEventHandler ( "onClientMouseEnter", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 1 ) break end end end) addEventHandler ( "onClientMouseLeave", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 0.75 ) break end end end) local visible = false addEvent( "lobby", true, addEventHandler( "lobby", getRootElement(), lobby, bindKey ("F1", "down",function() visible = not visible showCursor ( visible ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, visible ) end end))) addEventHandler ( "onClientGUIClick", ikony["dm"], function(button) if button ~= "left" then return end showCursor ( false ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, not visible ) end end, false ) server addEventHandler ("onPlayerJoin", root, function() triggerClientEvent ( "lobby", getRootElement()) end) And it doesn't work when i join, why? Link to comment
Jaysds1 Posted July 23, 2013 Share Posted July 23, 2013 try this: local bg = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true) } for _,gui in pairs(bg)do guiSetVisible(gui,false) end guiSetEnabled (bg["bg"], false ) local ikony = { ["dd"] = guiCreateStaticImage(0.09, 0.11, 0.27, 0.20, "img/dd.png", true), -- Obdélník ["drift"] = guiCreateStaticImage(0.09, 0.32, 0.13, 0.20, "img/drift.png", true), -- Čtverec ["parkour"] = guiCreateStaticImage(0.2296, 0.32, 0.13, 0.20, "img/parkour.png", true), -- Čtverec ["trials"] = guiCreateStaticImage(0.507, 0.11, 0.13, 0.20, "img/trials.png", true), -- Čtverec ["shooter"] = guiCreateStaticImage(0.368, 0.11, 0.13, 0.20, "img/shooter.png", true), -- Čtverec ["dm"] = guiCreateStaticImage(0.368, 0.32, 0.27, 0.20, "img/dm.png", true), -- Obdélník ["hunter"] = guiCreateStaticImage(0.368, 0.53, 0.27, 0.20, "img/hunter.png", true), -- Obdélník ["zombie"] = guiCreateStaticImage(0.646, 0.53, 0.27, 0.20, "img/zombie.png", true), -- Obdélník ["slender"] = guiCreateStaticImage(0.646, 0.32, 0.27, 0.20, "img/slender.png", true), -- Obdélník ["race"] = guiCreateStaticImage(0.646, 0.11, 0.27, 0.20, "img/race.png", true), -- Obdélník ["counterstrike"] = guiCreateStaticImage(0.09, 0.53, 0.27, 0.20, "img/counterstrike.png", true), -- Obdélník } for _,image in pairs(ikony)do guiSetAlpha(image,0.75) end for _,gui in pairs(ikony)do guiSetVisible(gui,false) end local labely = { ["hraci"] = guiCreateLabel(0.00, 0.85, 1.00, 0.14, "Players: ".. tostring( #getElementsByType( "player" ) ), true) } local font2 = guiCreateFont( "lithos.ttf", 50 ) guiSetFont( labely["hraci"], font2 ) guiLabelSetHorizontalAlign(labely["hraci"], "center", false) guiLabelSetVerticalAlign(labely["hraci"], "center") for _,gui in pairs(labely)do guiSetVisible(gui,false) end --[[guiSetAlpha (ikony["dd"], 0.75 ) guiSetAlpha (ikony["drift"], 0.75 ) guiSetAlpha (ikony["parkour"], 0.75 ) guiSetAlpha (ikony["trials"], 0.75 ) guiSetAlpha (ikony["shooter"], 0.75 ) guiSetAlpha (ikony["dm"], 0.75 ) guiSetAlpha (ikony["hunter"], 0.75 ) guiSetAlpha (ikony["zombie"], 0.75 ) guiSetAlpha (ikony["slender"], 0.75 ) guiSetAlpha (ikony["race"], 0.75 ) guiSetAlpha (ikony["counterstrike"], 0.75 )]] addEventHandler ( "onClientMouseEnter", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 1 ) break end end end) addEventHandler ( "onClientMouseLeave", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 0.75 ) break end end end) local visible = true function lobby() visible = not visible showCursor ( visible ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, visible ) end end addEvent( "lobby", true) addEventHandler( "lobby", getRootElement(), lobby) bindKey ("F1", "down",lobby) addEventHandler ( "onClientGUIClick", ikony["dm"], function(button) if button ~= "left" then return end showCursor ( false ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, not visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, not visible ) end end, false ) Link to comment
Jaysds1 Posted July 23, 2013 Share Posted July 23, 2013 Try this: Server addEventHandler ("onPlayerJoin", root,function() triggerClientEvent (source,"lobby",source) end) Client local bg = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true) } for _,gui in pairs(bg)do guiSetVisible(gui,false) end guiSetEnabled (bg["bg"], false ) local ikony = { ["dd"] = guiCreateStaticImage(0.09, 0.11, 0.27, 0.20, "img/dd.png", true), -- Obdélník ["drift"] = guiCreateStaticImage(0.09, 0.32, 0.13, 0.20, "img/drift.png", true), -- Čtverec ["parkour"] = guiCreateStaticImage(0.2296, 0.32, 0.13, 0.20, "img/parkour.png", true), -- Čtverec ["trials"] = guiCreateStaticImage(0.507, 0.11, 0.13, 0.20, "img/trials.png", true), -- Čtverec ["shooter"] = guiCreateStaticImage(0.368, 0.11, 0.13, 0.20, "img/shooter.png", true), -- Čtverec ["dm"] = guiCreateStaticImage(0.368, 0.32, 0.27, 0.20, "img/dm.png", true), -- Obdélník ["hunter"] = guiCreateStaticImage(0.368, 0.53, 0.27, 0.20, "img/hunter.png", true), -- Obdélník ["zombie"] = guiCreateStaticImage(0.646, 0.53, 0.27, 0.20, "img/zombie.png", true), -- Obdélník ["slender"] = guiCreateStaticImage(0.646, 0.32, 0.27, 0.20, "img/slender.png", true), -- Obdélník ["race"] = guiCreateStaticImage(0.646, 0.11, 0.27, 0.20, "img/race.png", true), -- Obdélník ["counterstrike"] = guiCreateStaticImage(0.09, 0.53, 0.27, 0.20, "img/counterstrike.png", true), -- Obdélník } for _,image in pairs(ikony)do guiSetAlpha(image,0.75) end for _,gui in pairs(ikony)do guiSetVisible(gui,false) end local labely = { ["hraci"] = guiCreateLabel(0.00, 0.85, 1.00, 0.14, "Players: ".. tostring( #getElementsByType( "player" ) ), true) } local font2 = guiCreateFont( "lithos.ttf", 50 ) guiSetFont( labely["hraci"], font2 ) guiLabelSetHorizontalAlign(labely["hraci"], "center", false) guiLabelSetVerticalAlign(labely["hraci"], "center") for _,gui in pairs(labely)do guiSetVisible(gui,false) end --[[guiSetAlpha (ikony["dd"], 0.75 ) guiSetAlpha (ikony["drift"], 0.75 ) guiSetAlpha (ikony["parkour"], 0.75 ) guiSetAlpha (ikony["trials"], 0.75 ) guiSetAlpha (ikony["shooter"], 0.75 ) guiSetAlpha (ikony["dm"], 0.75 ) guiSetAlpha (ikony["hunter"], 0.75 ) guiSetAlpha (ikony["zombie"], 0.75 ) guiSetAlpha (ikony["slender"], 0.75 ) guiSetAlpha (ikony["race"], 0.75 ) guiSetAlpha (ikony["counterstrike"], 0.75 )]] local visible = false addEventHandler ( "onClientMouseEnter", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 1 ) break end end end) addEventHandler ( "onClientMouseLeave", root,function ( aX, aY ) for _, gui in pairs ( ikony ) do if ( gui == source ) then guiSetAlpha ( source, 0.75 ) break end end end) addEventHandler ( "onClientGUIClick", ikony["dm"], function(button) if button ~= "left" then return end visible = not visible showCursor ( visible ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, visible ) end end, false ) function lobby() visible = not visible showCursor ( visible ) for _, gui in pairs ( ikony ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( bg ) do guiSetVisible ( gui, visible ) end for _, gui in pairs ( labely ) do guiSetVisible ( gui, visible ) end end addEvent( "lobby", true) addEventHandler( "lobby",localPlayer, lobby) bindKey ("F1", "down",lobby) Link to comment
papam77 Posted July 23, 2013 Author Share Posted July 23, 2013 Yeah it works ! Ty man Link to comment
Jaysds1 Posted July 23, 2013 Share Posted July 23, 2013 Np, Don't forget to look at how I did the script. 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