ali Posted June 28, 2015 Posted June 28, 2015 (edited) r_w = guiCreateWindow(322, 150, 565, 540, "Staff Ranks", false) guiWindowSetSizable(r_w, false) guiSetAlpha(r_w, 1.00) ggrid1 = guiCreateGridList(10, 54, 545, 377, false, r_w) namess = guiGridListAddColumn(ggrid1, "Name", 0.5) rankss = guiGridListAddColumn(ggrid1, "Ranks", 0.5) butt1 = guiCreateButton(48, 446, 459, 84, "Close", false, r_w) guiSetFont(butt1, "sa-header") guiSetVisible(r_w,false) ----------------------------- nameTable = { {"Ali"}, {"Arman"}, } -------------------------------------- RankTable = { {"Admin"}, {"Moderator"}, } ------------------------------ addCommandHandler("ranks", function () guiSetVisible(r_w,true) showCursor(true) for i, v in ipairs (nameTable) do row = guiGridListAddRow(ggrid1) guiGridListSetItemText(ggrid1, row, namess , v[1], false, false) end for i, v in ipairs (RankTable) do guiGridListSetItemText(ggrid1, row, rankss , v[1], false, false) end end ) the probem is it does not tell the first rank i.e admin (see line 23) Edited June 29, 2015 by Guest LUA Scripter [Tut]How to add maps using in-game script editor [Tut]How to get a hosted MTA Sa Server for free
Blaawee Posted June 28, 2015 Posted June 28, 2015 I guess you missed adding a new row guiGridListAddRow
ali Posted June 29, 2015 Author Posted June 29, 2015 no that doesnt help it just shifts the ranks down LUA Scripter [Tut]How to add maps using in-game script editor [Tut]How to get a hosted MTA Sa Server for free
n3wage Posted June 29, 2015 Posted June 29, 2015 data = { -- { "name", "rank" }, { "Ali", "Admin" }, { "Arman", "Moderator " } } r_w = guiCreateWindow(322, 150, 565, 540, "Staff Ranks", false) guiWindowSetSizable(r_w, false) guiSetAlpha(r_w, 1.00) ggrid1 = guiCreateGridList(10, 54, 545, 377, false, r_w) namess = guiGridListAddColumn(ggrid1, "Name", 0.5) rankss = guiGridListAddColumn(ggrid1, "Ranks", 0.5) butt1 = guiCreateButton(48, 446, 459, 84, "Close", false, r_w) guiSetFont(butt1, "sa-header") guiSetVisible(r_w,false) addCommandHandler( "ranks", function () guiSetVisible(r_w,true) showCursor(true) for i, v in ipairs (data) do local row = guiGridListAddRow(ggrid1); guiGridListSetItemText ( ggrid1, row, 1, v[1], false, false ); guiGridListSetItemText ( ggrid1, row, 2, v[2], false, false ); end end )
ali Posted June 29, 2015 Author Posted June 29, 2015 Thx LUA Scripter [Tut]How to add maps using in-game script editor [Tut]How to get a hosted MTA Sa Server for free
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