MisterQuestions Posted June 29, 2014 Posted June 29, 2014 I have a dude, how to create a playerlist on a previous created gridlist, i dont know how to create that player list and select players to make the action of the buton. (sorry for the bad english) "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
aintaro Posted June 29, 2014 Posted June 29, 2014 local GUIEditor { window = {}, gridlist = {} } function showPlayerList() GUIEditor.window[1] = guiCreateWindow(0.40, 0.25, 0.19, 0.41, "Player list", true) GUIEditor.gridlist[1] = guiCreateGridList(10, 36, 278, 253, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) local players = getElementsByType("player") for i, v in ipairs(players) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, v, false, false ) end showCursor(true) end addCommandHandler("showplayers", showPlayerList) None of us is as smart as all of us.
Et-win Posted June 29, 2014 Posted June 29, 2014 Player and Gridlist functions: getElementsByType guiGridListAddRow guiGridListSetItemText ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
MisterQuestions Posted June 29, 2014 Author Posted June 29, 2014 I already have it like that, but it only shows me :C why? "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
MisterQuestions Posted June 29, 2014 Author Posted June 29, 2014 Here is it. function SetRank() window_panel = guiCreateWindow(346, 141, 322, 522, "Set Rank Panel", false) guiWindowSetSizable(window_panel, false) tab_panel = guiCreateTabPanel(9, 30, 303, 482, false, window_panel) tab_rank = guiCreateTab("Set Rank", tab_panel) playergrid = guiCreateGridList(8, 15, 145, 432, false, tab_rank) column = guiGridListAddColumn( playergrid, "Players", 0.85 ) for id, player in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( playergrid ) guiGridListSetItemText ( playergrid, row, column, getPlayerName ( player ), false, false ) playerName = guiGridListGetItemText ( playergrid, guiGridListGetSelectedItem ( playergrid ), 1 ) TrialMember = guiCreateButton(161, 33, 132, 38, "Give Trial-Member", false, tab_rank) Moderator = guiCreateButton(161, 129, 132, 38, "Give Moderator", false, tab_rank) Member = guiCreateButton(161, 81, 132, 38, "Give Member", false, tab_rank) SModerator = guiCreateButton(161, 177, 132, 38, "Give S.Moderator", false, tab_rank) Administrator = guiCreateButton(161, 225, 132, 38, "Give Administrator", false, tab_rank) TeamMananger = guiCreateButton(161, 273, 132, 38, "Give Team Mananger", false, tab_rank) ranklabel = guiCreateLabel(158, 332, 135, 27, "Current Rank:", false, tab_rank) showCursor(true, true) addEventHandler ("OnClientGUIClick", Trial-Member, SetTrial) end end Then? Whats wrong? "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
Et-win Posted June 29, 2014 Posted June 29, 2014 Any debugscript 3 errors? ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
MisterQuestions Posted June 29, 2014 Author Posted June 29, 2014 Nope, its everythins ok "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
Et-win Posted June 29, 2014 Posted June 29, 2014 You know, that you are creating every button as much times as players are online, don't you do? EDIT: Anyway, every player who is online will be shown in the gridlist. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
MisterQuestions Posted July 2, 2014 Author Posted July 2, 2014 But, i tried on my server, whith players, and only shows me "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
MisterQuestions Posted July 5, 2014 Author Posted July 5, 2014 I dont know what to do, doesn't works why? "El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más". Att: -|TG|-Mister[Q]<.
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