Jump to content

Clothes Selector (RPG) - Help!


12p

Recommended Posts

Posted

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 :)

Posted

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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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)!

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...