12p Posted October 20, 2010 Posted October 20, 2010 I'm making a Clothes Selector for RPG servers. I will add it to the community resources when it's ended But now I need some help. Well, I'm trying to delete all gridlist's rows, then adding new ones. The problem is that it just delete SOME rows. Why it doesn't delete all? Here are the lines: headClothes = {{"Default","player_face","head","1"},{"Bald","bald","head","1"},{"Bald and Beard","baldbeard","head","1"},{"Bald and Moustache","baldtash","head","1"},{"Bald and Goatee","baldgoatee","head","1"},{"Wedge","wedge","wedge","1"},{"Slope Hair","slope","slope","1"},{"Curly","jhericurl","jheri","1"},{"Groove Cut","groovecut","groovecut","1"}} headGrid = guiCreateGridList(0.0466,0.0764,0.9067,0.8917,true,headWindow) guiGridListAddColumn(headGrid,"Name",0.6) guiGridListAddColumn(headGrid,"ID 1",0.2) guiGridListAddColumn(headGrid,"ID 2",0.2) guiGridListAddColumn(headGrid,"ID 3",0.2) for i = 0, guiGridListGetRowCount(headGrid) do guiGridListRemoveRow (headGrid,i) end end if source == head then for i,v in ipairs (headClothes) do local row = guiGridListAddRow (headGrid) guiGridListSetItemText (headGrid,row,1,v[1],false,false) guiGridListSetItemText (headGrid,row,2,v[2],false,false) guiGridListSetItemText (headGrid,row,3,v[3],false,false) guiGridListSetItemText (headGrid,row,4,v[4],false,false) end PS: I can post whole script, but may be a too lazy way for you. PS2: If you want to help me with this script to make it more efficient, post it
Castillo Posted October 20, 2010 Posted October 20, 2010 maybe you could use xml to make it easier (thats what i think) i think would be much faster to script/edit it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted October 20, 2010 Posted October 20, 2010 maybe this https://wiki.multitheftauto.com/wiki/GuiGridListClear Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
12p Posted October 20, 2010 Author Posted October 20, 2010 maybe you could use xml to make it easier (thats what i think) i think would be much faster to script/edit it. ... Not bad idea I will use it. maybe thishttps://wiki.multitheftauto.com/wiki/GuiGridListClear TY varez! TY so much! PS: hahaha I never write "Varez"
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