tosfera Posted August 11, 2013 Posted August 11, 2013 Oke so here is the thing. I want to get rid of the .map file cause I got a fuel system that has his own way of working etc. So I exported all the information I got from the .map file (about the vehicle's I spawned) but it's telling me to fck off and hit my head against a wall or something... So I placed this code in my onResourceStart (SERVER SIDE, I'm not stupid); local vehicles = { {"2588.5", "1830.59998", "11.1", "0", "0", "270" }, {"2606.3999", "1837", "11.1", "0", "0", "90" }, {"2606.30005", "1843.30005", "11.1", "0", "0", "90" }, {"2606.30005", "1849.69995", "11.1", "0", "0", "90" }, {"2606.3999", "1856.09998", "11.1", "0", "0", "90" }, {"2606.30005", "1862.69995", "11.1", "0", "0", "90" }, {"2606.3999", "1830.69995", "11.1", "0", "0", "90" }, {"2588.3999", "1856.09998", "11.1", "0", "0", "270" }, {"2588.30005", "1849.80005", "11.1", "0", "0", "270" }, {"2588.3999", "1843.40002", "11.1", "0", "0", "270" }, {"2588.30005", "1862.80005", "11.1", "0", "0", "270" }, {"2588.3999", "1837", "11.1", "0", "0", "270" }, {"2606.3999", "1815.09998", "11.1", "0", "0", "90" }, {"2606.3999", "1808.59998", "11.1", "0", "0", "90" }, {"2588.19995", "1808.69995", "11.1", "0", "0", "270" }, {"2606.30005", "1802.19995", "11.1", "0", "0", "90" }, {"2606.3999", "1795.90002", "11.1", "0", "0", "90" }, {"2606.5", "1789.59998", "11.1", "0", "0", "90" }, {"2588.19995", "1802.40002", "11.1", "0", "0", "270" }, {"2588.19995", "1815.09998", "11.1", "0", "0", "270" }, {"2588.3999", "1795.90002", "11.1", "0", "0", "270" }, {"2606.5", "1783.40002", "11.1", "0", "0", "90" }, {"2588.3999", "1789.90002", "11.1", "0", "0", "270" }, {"2588.3999", "1783", "11.1", "0", "0", "270" } }; for index, item in ipairs (vehicles) do v = createVehicle(431, item[1], item[2], item[3]); setElementData(v, "fuel", 100); setElementData(v, "type", "work"); end but its not working. Not even 1 single bus is getting spawned... If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
Mittell Buurman Posted August 11, 2013 Posted August 11, 2013 local vehicles = { {2588.5, 1830.59998, 11.1, 0, 0, 270 }, {2606.3999, 1837, 11.1, 0, 0, 90 }, {2606.30005, 1843.30005, 11.1, 0, 0, 90 }, {2606.30005, 1849.69995, 11.1, 0, 0, 90 }, {2606.3999, 1856.09998, 11.1, 0, 0, 90 }, {2606.30005, 1862.69995, 11.1, 0, 0, 90 }, {2606.3999, 1830.69995, 11.1, 0, 0, 90 }, {2588.3999, 1856.09998, 11.1, 0, 0, 270 }, {2588.30005, 1849.80005, 11.1, 0, 0, 270 }, {2588.3999, 1843.40002, 11.1, 0, 0, 270 }, {2588.30005, 1862.80005, 11.1, 0, 0, 270 }, {2588.3999, 1837, 11.1, 0, 0, 270 }, {2606.3999, 1815.09998, 11.1, 0, 0, 90 }, {2606.3999, 1808.59998, 11.1, 0, 0, 90 }, {2588.19995, 1808.69995, 11.1, 0, 0, 270 }, {2606.30005, 1802.19995, 11.1, 0, 0, 90 }, {2606.3999, 1795.90002, 11.1, 0, 0, 90 }, {2606.5, 1789.59998, 11.1, 0, 0, 90 }, {2588.19995, 1802.40002, 11.1, 0, 0, 270 }, {2588.19995, 1815.09998, 11.1, 0, 0, 270 }, {2588.3999, 1795.90002, 11.1, 0, 0, 270 }, {2606.5, 1783.40002, 11.1, 0, 0, 90 }, {2588.3999, 1789.90002, 11.1, 0, 0, 270 }, {2588.3999, 1783, 11.1, 0, 0, 270 } }; for index, item in ipairs (vehicles) do v = createVehicle(431, item[1], item[2], item[3]); setElementData(v, "fuel", 100); setElementData(v, "type", "work"); end Try this
tosfera Posted August 11, 2013 Author Posted August 11, 2013 Still doesn't work... O_O My code is perfect, nothing wrong about it. edit; I noticed that I can't spawn vehicle's with runcode anymore too... If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
Castillo Posted August 11, 2013 Posted August 11, 2013 Works fine here, it spawned a lot of busses. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
tosfera Posted August 11, 2013 Author Posted August 11, 2013 yeah, a bunch of busses has to be spawned. Only problem is, its not working as a command or as a onResourceStart. It smacked me in the face with a dizzy dummy and its still confusing me. I stopped every resource and only started 1. Still doesn't work. ha, ha-ha, hahahahaha trolled my MTA's dimension system. --' I left the editor but didn't reconnect. So its spammed with cars in dimension 0 now. Stupid safe system... thanks anyways! If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
Mittell Buurman Posted August 11, 2013 Posted August 11, 2013 I do get results though, test this for yourself: local vehicles = { {2588.5, 1830.59998, 11.1, 0, 0, 270 }, {2606.3999, 1837, 11.1, 0, 0, 90 }, {2606.30005, 1843.30005, 11.1, 0, 0, 90 }, {2606.30005, 1849.69995, 11.1, 0, 0, 90 }, {2606.3999, 1856.09998, 11.1, 0, 0, 90 }, {2606.30005, 1862.69995, 11.1, 0, 0, 90 }, {2606.3999, 1830.69995, 11.1, 0, 0, 90 }, {2588.3999, 1856.09998, 11.1, 0, 0, 270 }, {2588.30005, 1849.80005, 11.1, 0, 0, 270 }, {2588.3999, 1843.40002, 11.1, 0, 0, 270 }, {2588.30005, 1862.80005, 11.1, 0, 0, 270 }, {2588.3999, 1837, 11.1, 0, 0, 270 }, {2606.3999, 1815.09998, 11.1, 0, 0, 90 }, {2606.3999, 1808.59998, 11.1, 0, 0, 90 }, {2588.19995, 1808.69995, 11.1, 0, 0, 270 }, {2606.30005, 1802.19995, 11.1, 0, 0, 90 }, {2606.3999, 1795.90002, 11.1, 0, 0, 90 }, {2606.5, 1789.59998, 11.1, 0, 0, 90 }, {2588.19995, 1802.40002, 11.1, 0, 0, 270 }, {2588.19995, 1815.09998, 11.1, 0, 0, 270 }, {2588.3999, 1795.90002, 11.1, 0, 0, 270 }, {2606.5, 1783.40002, 11.1, 0, 0, 90 }, {2588.3999, 1789.90002, 11.1, 0, 0, 270 }, {2588.3999, 1783, 11.1, 0, 0, 270 } }; for index, item in ipairs (vehicles) do outputChatBox(tostring(item[1])) v = createVehicle(431, item[1], item[2], item[3]); local vehicle = getElementsByType("vehicle") for i, v in ipairs (vehicle) do outputDebugString(tostring(i).." "..tostring(v)) end setElementData(v, "fuel", 100); setElementData(v, "type", "work"); end
Castillo Posted August 11, 2013 Posted August 11, 2013 No point on that, Mittell, his code already works. 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