Turbesz Posted July 23, 2016 Posted July 23, 2016 (edited) doesn't show players, but gridlist is fine code: bb = guiCreateButton(658, 33, 172, 22, "Privát beszélgetés", false) guiSetVisible(bb,true) local GUIEditor = { button = {}, window = {}, gridlist = {}, } GUIEditor.window[1] = guiCreateWindow(405, 62, 682, 451, "privát beszélgetés by turbesz", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(646, 20, 26, 26, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") grdPlayers = guiCreateGridList(0.0991,0.2449,0.8108,0.6968, true, GUIEditor.window[1]) colPlayers = guiGridListAddColumn(grdPlayers, "Játékosok", 0.85) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) showCursor ( true ) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) Edited July 23, 2016 by Guest What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Walid Posted July 23, 2016 Posted July 23, 2016 There is no function called addPlayerToList() in your code , try this function addPlayersToGridlist() guiGridListClear(grdPlayers) local players = getElementsByType("player") for index, player in pairs(players) do local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(player) guiGridListSetItemText(grdPlayers, row,1, name, false, false) end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Turbesz Posted July 23, 2016 Author Posted July 23, 2016 There is no function called addPlayerToList() in your code , try this function addPlayersToGridlist() guiGridListClear(grdPlayers) local players = getElementsByType("player") for index, player in pairs(players) do local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(player) guiGridListSetItemText(grdPlayers, row,1, name, false, false) end end doesn't working What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Walid Posted July 23, 2016 Posted July 23, 2016 doesn't working I think you don't know how to use it , try to do it by yourself then post your code here. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Turbesz Posted July 23, 2016 Author Posted July 23, 2016 doesn't working I think you don't know how to use it , try to do it by yourself then post your code here. bb = guiCreateButton(658, 33, 172, 22, "Privát beszélgetés", false) guiSetVisible(bb,true) local GUIEditor = { button = {}, window = {}, gridlist = {}, } GUIEditor.window[1] = guiCreateWindow(405, 62, 682, 451, "privát beszélgetés by turbesz", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(646, 20, 26, 26, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") grdPlayers = guiCreateGridList(0.0991,0.2449,0.8108,0.6968, true, GUIEditor.window[1]) colPlayers = guiGridListAddColumn(grdPlayers, "Játékosok", 0.85) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end function addPlayersToGridlist() guiGridListClear(grdPlayers) local players = getElementsByType("player") for index, player in pairs(players) do local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(player) guiGridListSetItemText(grdPlayers, row,1, name, false, false) end end guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) showCursor ( true ) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Turbesz Posted July 23, 2016 Author Posted July 23, 2016 what wrong? What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Walid Posted July 23, 2016 Posted July 23, 2016 what wrong? i told you , you don't know how to use it read my first post again. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Turbesz Posted July 23, 2016 Author Posted July 23, 2016 what wrong? i told you , you don't know how to use it read my first post again. What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Walid Posted July 23, 2016 Posted July 23, 2016 :3 addEventHandler("onClientResourceStart", resourceRoot, function() yourGui = guiCreateWindow(405, 62, 682, 451, "privát beszélgetés by turbesz", false) guiWindowSetSizable(yourGui, false) close = guiCreateButton(646, 20, 26, 26, "X", false, yourGui) guiSetProperty(close, "NormalTextColour", "FFFF0000") bb = guiCreateButton(658, 33, 172, 22, "Privát beszélgetés", false) guiSetVisible(bb,true) grdPlayers = guiCreateGridList(0.0991,0.2449,0.8108,0.6968, true, yourGui) colPlayers = guiGridListAddColumn(grdPlayers, "Játékosok", 0.85) guiSetVisible(yourGui,false) -- events addEventHandler("onClientGUIClick",bb,clickButtonBB,false) addEventHandler ( "onClientGUIClick", close, Bezaras,false) end ) -- add all players to your gridlist function addPlayersToGridlist() guiGridListClear(grdPlayers) local players = getElementsByType("player") for index, player in pairs(players) do local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(player) guiGridListSetItemText(grdPlayers, row,1, name, false, false) end end -- open the Gui when the player click bb button function clickButtonBB() if not guiGetVisible (yourGui) then guiSetVisible(yourGui,true) showCursor(true) addPlayersToGridlist() else guiSetVisible(yourGui,false) showCursor(false) end end -- close the gui when the player click the close button function Bezaras() if guiGetVisible (yourGui) then guiSetVisible(yourGui, false) showCursor ( false ) end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Turbesz Posted July 23, 2016 Author Posted July 23, 2016 Lol ._. xdd Many thanks :DD What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Walid Posted July 23, 2016 Posted July 23, 2016 Lol ._. xddMany thanks :DD You are welcome. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
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