Jump to content

[HELP] Gridlist again


LabiVila

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...