Turbesz Posted July 22, 2016 Share Posted July 22, 2016 (edited) code: bb = guiCreateButton(485, 0, 499, 23, "Információs panel megnyitásához kattints ide!", false) guiSetProperty(bb, "NormalTextColour", "FFFF0000") guiSetVisible(bb,true) local GUIEditor = { window = {}, button = {}, memo = {}, } GUIEditor.window[1] = guiCreateWindow(292, 127, 868, 583, "[FullFunPlay] INFORMÁCIÓS PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF35FE9D") GUIEditor.memo[1] = guiCreateMemo(9, 28, 849, 485, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(9, 521, 425, 52, "ELFOGADOM A LEÍRTAKAT, ÉS EGYET ÉRTEK VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF24FE00") GUIEditor.button[2] = guiCreateButton(443, 522, 415, 51, "NEM FOGADOM EL A LEÍRTAKAT, ÉS NEM ÉRTEK EGYET VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) outputChatBox ("Jó játékot, és mivel elfogadtad a leírtakat, jó szabály betartást, mert így helyes!:)") end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) function kick () kickPlayer ( source, "Hát, nem fogadod el? Akkor szia!" ) end addEventHandler ("onClientGUIClick", GUIEditor.button[2], kick) Edited July 22, 2016 by Guest Link to comment
Ahmed Ly Posted July 22, 2016 Share Posted July 22, 2016 kickPlayer -- Server-only. Use . triggerServerEvent Link to comment
Turbesz Posted July 22, 2016 Author Share Posted July 22, 2016 --client bb = guiCreateButton(485, 0, 499, 23, "Információs panel megnyitásához kattints ide!", false) guiSetProperty(bb, "NormalTextColour", "FFFF0000") guiSetVisible(bb,true) local GUIEditor = { window = {}, button = {}, memo = {}, } GUIEditor.window[1] = guiCreateWindow(292, 127, 868, 583, "[FullFunPlay] INFORMÁCIÓS PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF35FE9D") GUIEditor.memo[1] = guiCreateMemo(9, 28, 849, 485, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(9, 521, 425, 52, "ELFOGADOM A LEÍRTAKAT, ÉS EGYET ÉRTEK VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF24FE00") GUIEditor.button[2] = guiCreateButton(443, 522, 415, 51, "NEM FOGADOM EL A LEÍRTAKAT, ÉS NEM ÉRTEK EGYET VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) outputChatBox ("Jó játékot, és mivel elfogadtad a leírtakat, jó szabály betartást, mert így helyes!:)") end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) function kick () triggerServerEvent ("kick", root, getLocalPlayer()) end addEventHandler ("onClientGUIClick", GUIEditor.button[2], kick) --server function kick () kickPlayer ( source, "Hát, nem fogadod el? Akkor szia!" ) end addEvent( "kick", true ) addEventHandler( "kick", root, kick ) but doesn't working. debugscript: ERROR: infog/btn.lua:45: attempt to call global 'kickPlayer' (a nil value) wtf?.. Link to comment
Ahmed Ly Posted July 22, 2016 Share Posted July 22, 2016 bb = guiCreateButton(485, 0, 499, 23, "Információs panel megnyitásához kattints ide!", false) guiSetProperty(bb, "NormalTextColour", "FFFF0000") guiSetVisible(bb,true) local GUIEditor = { window = {}, button = {}, memo = {}, } GUIEditor.window[1] = guiCreateWindow(292, 127, 868, 583, "[FullFunPlay] INFORMÁCIÓS PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF35FE9D") GUIEditor.memo[1] = guiCreateMemo(9, 28, 849, 485, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(9, 521, 425, 52, "ELFOGADOM A LEÍRTAKAT, ÉS EGYET ÉRTEK VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF24FE00") GUIEditor.button[2] = guiCreateButton(443, 522, 415, 51, "NEM FOGADOM EL A LEÍRTAKAT, ÉS NEM ÉRTEK EGYET VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) outputChatBox ("Jó játékot, és mivel elfogadtad a leírtakat, jó szabály betartást, mert így helyes!:)") end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) function kick () triggerServerEvent ("kickPlayer1",localPlayer,"Hát, nem fogadod el? Akkor szia!" ) end addEventHandler ("onClientGUIClick", GUIEditor.button[2], kick) function kick2 (text) kickPlayer (source,text) end addEvent( "kickPlayer1", true ) addEventHandler( "kickPlayer1", root, kick2 ) Link to comment
Turbesz Posted July 22, 2016 Author Share Posted July 22, 2016 many thanks...again :DDD Link to comment
Ahmed Ly Posted July 22, 2016 Share Posted July 22, 2016 many thanks...again :DDD You're welcome 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