LabiVila Posted July 27, 2014 Posted July 27, 2014 function wdw () local PVPw = guiCreateWindow (0.25, 0.25, 0.50, 0.50, "PVP Window", true) local playerList = guiCreateGridList (0.10, 0.10, 0.50, 0.85, true, PVPw) guiWindowSetMovable (PVPw, false) guiWindowSetSizable (PVPw, 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) function playerListt () local column = guiGridListAddColumn (playerList, "Player", 0.85, playerList) if (column) then for id, playeritem in ipairs (getElementsByType ("player")) do local row = guiGridListAddRow (playerList) guiGridListSetItemText (playerList, row, column, getPlayerName (playeritem), false, false) local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) outputChatBox (playerName) end end end addEventHandler ("onClientResourceStart", getRootElement(), playerListt) the outputChatBox doesn't work, what's wrong?
Anubhav Posted July 28, 2014 Posted July 28, 2014 Won't output also at all. You're outputing values at resource start. ( MEANS NO GRIDLIST WILL BE SELECTED THAT TIME ). So there's no sense. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
AboShanab Posted July 28, 2014 Posted July 28, 2014 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, "Players List ...", 0.85) for id, playeritem in ipairs (getElementsByType ("player")) do local row = guiGridListAddRow (playerList) guiGridListSetItemText (playerList, row, 1, getPlayerName (playeritem), false, false) local playerName = guiGridListGetItemText ( playerList, row, 1 ) outputChatBox ( tostring ( playerName ) ) end 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) Skype : aboshanab_
Max+ Posted July 28, 2014 Posted July 28, 2014 Click Here to the Example , and fix your script . GuiGridListGetSelectedItem - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
LabiVila Posted July 28, 2014 Author Posted July 28, 2014 Thank you guys, you helped me a lot. Especially you iAbohanab~>...
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