Jusonex Posted March 25, 2011 Posted March 25, 2011 Hey guys, I am scripting at the moment on a new freeroam script and I want to create a gui gridlist with all the vehicles. But my problem is xml. This is my code: (vehicles.xml is from freeroam) function xmlToTable() local root = xmlLoadFile("vehicles.xml") local groups = xmlNodeGetChildren(root) local vehicles = {} for i, node in ipairs(groups) do vehicles[xmlNodeGetName(node)] = xmlNodeGetAttribute(node, "id") end end I want to have a table like for example this vehicles["Helicopters"] = {548, 425, 417, 487, 488, 497, 563, 447, 469} why doesn't it work? Justus
proracer Posted March 25, 2011 Posted March 25, 2011 You have an example here: https://wiki.multitheftauto.com/wiki/Scripting_the_GUI_-_Tutorial_1
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