3B00DG4MER Posted March 28, 2014 Posted March 28, 2014 Hello,Today i made Skin Shop which get skins id from xml i have made a xml & Gui How do i import skins id from xml to client (Gui) GUIEditor.window[1] = guiCreateWindow(649, 185, 300, 707, "Skin Shop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.gridlist[1] = guiCreateGridList(21, 33, 260, 604, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 1) GUIEditor.button[1] = guiCreateButton(25, 647, 130, 50, "Buy", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-header") GUIEditor.button[2] = guiCreateButton(165, 647, 116, 50, "Cancel", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "sa-header") SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
WhoAmI Posted March 28, 2014 Posted March 28, 2014 xmlLoadFile xmlFindChild xmlNodeGetAttribute guiGridListAddRow guiGridListSetItemText
3B00DG4MER Posted March 28, 2014 Author Posted March 28, 2014 xmlLoadFile xmlFindChild xmlNodeGetAttribute guiGridListAddRow guiGridListSetItemText can you fix that plz !! local xml = getResourceConfig("skins.xml") local models = xmlNodeGetAttribute(xml, "id") local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText (GUIEditor.gridlist[1], row, skins, models, false, false ) SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Anubhav Posted March 28, 2014 Posted March 28, 2014 local xml = getResourceConfig("skins.xml") local models = xmlNodeGetAttribute(xml, "id") local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) for k,v in ipairs(models) do guiGridListSetItemText (GUIEditor.gridlist[1], row, skins, v, false, false ) end 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
3B00DG4MER Posted March 28, 2014 Author Posted March 28, 2014 Can you post the XML code? SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Castillo Posted March 28, 2014 Posted March 28, 2014 local xml = getResourceConfig ( "skins.xml" ) for _, v in ipairs ( xmlNodeGetChildren ( xml ) ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) local model = xmlNodeGetAttribute ( v, "id" ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, skins, tostring ( model ), false, false ) end By the way: "skins" is the column index, right? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
3B00DG4MER Posted March 28, 2014 Author Posted March 28, 2014 local xml = getResourceConfig ( "skins.xml" ) for _, v in ipairs ( xmlNodeGetChildren ( xml ) ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) local model = xmlNodeGetAttribute ( v, "id" ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, skins, tostring ( model ), false, false ) end By the way: "skins" is the column index, right? Thank you very much it's work SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Castillo Posted March 28, 2014 Posted March 28, 2014 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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