Rat32 Posted January 29, 2015 Share Posted January 29, 2015 Heelo. I have a script from vehicles XML from MTA:WIKI. But... this is not working. AUTO.LUA: local xml = getResourceConfig("settings.xml") -- load XML file and get its root element local carmodel = xmlNodeGetAttribute(xml, "model") -- get attribute of root element local carX = xmlNodeGetAttribute(xml, "posX") local carY = xmlNodeGetAttribute(xml, "posY") local carZ = xmlNodeGetAttribute(xml, "posZ") local carA = xmlNodeGetAttribute(xml, "rot") createVehicle(carmodel, tonumber(carX), tonumber(carY), tonumber(carZ), 0.0, 0.0, tonumber(carA)) META.XML: SETTINGS.XML: "Manana" posX="1803" posY="1905" posZ="13" rot="90.0" /> Please help Link to comment
Tekken Posted January 29, 2015 Share Posted January 29, 2015 /debugscript 3 ? Also this is the full code ? Link to comment
..:D&G:.. Posted January 29, 2015 Share Posted January 29, 2015 addEventHandler("onResourceStart", getRootElement(), local xml = getResourceConfig("settings.xml") -- load XML file and get its root element local carmodel = xmlNodeGetAttribute(xml, "model") -- get attribute of root element local carX = xmlNodeGetAttribute(xml, "posX") local carY = xmlNodeGetAttribute(xml, "posY") local carZ = xmlNodeGetAttribute(xml, "posZ") local carA = xmlNodeGetAttribute(xml, "rot") createVehicle(carmodel, tonumber(carX), tonumber(carY), tonumber(carZ), 0.0, 0.0, tonumber(carA)) end ) Link to comment
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