LabiVila Posted July 30, 2014 Share Posted July 30, 2014 Here's how gridlist looks like: http://www.upload.ee/image/4181865/asdasdasd.png function wdw () PVPw = guiCreateWindow (0.25, 0.25, 0.50, 0.50, "PVP Window", true) guiWindowSetMovable (PVPw, false) guiWindowSetSizable (PVPw, false) playerList = guiCreateGridList (0.10, 0.10, 0.50, 0.85, true, PVPw) guiGridListAddColumn (playerList, "Player List", 0.85) for id, playeritem in ipairs (getElementsByType ("player")) do local row = guiGridListAddRow (playerList) guiGridListSetItemText (playerList, row, 1, getPlayerName (playeritem), false, false) end guiGridListSetSortingEnabled (playerList, false) amountL = guiCreateLabel (0.65, 0.10, 0.30, 0.10, "Cash ammount:", true, PVPw) amount = guiCreateEdit (0.65, 0.17, 0.30, 0.10, "", true, PVPw) amountLimit = guiCreateLabel (0.65, 0.28, 0.30, 0.10, "Limit: 99999$", true, PVPw) guiLabelSetColor (amountLimit, 0, 255, 0) roundsL = guiCreateLabel (0.65, 0.45, 0.30, 0.10, "Rounds", true, PVPw) rounds = guiCreateEdit (0.65, 0.52, 0.30, 0.10, "", true, PVPw) roundsLimit = guiCreateLabel (0.65, 0.63, 0.30, 0.10, "Limit: 8", true, PVPw) guiLabelSetColor (roundsLimit, 0, 255, 0) challb = guiCreateButton (0.65, 0.80, 0.30, 0.15, "Challenge", true, PVPw) end addEventHandler ("onClientResourceStart", getRootElement(), wdw) How can I do so, when I selected a player from gridlist and click challenge button, an outputChatBox appears with the selected name. I've tried hard for that and even posted a topic a while ago but all I managed to get was only outputing in the chatbox first player's name (row #1). Thanks farther Link to comment
XeniusORIGINAL Posted July 30, 2014 Share Posted July 30, 2014 https://wiki.multitheftauto.com/wiki/Gu ... lectedItem https://wiki.multitheftauto.com/wiki/OnClientGUIClick Link to comment
LabiVila Posted July 30, 2014 Author Share Posted July 30, 2014 I've tried with those but I didn't succeed, can you write me the whole script possibly? 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