adi8908456 Posted June 3, 2014 Share Posted June 3, 2014 I added new car for my mta dayz server every thing is correct but i dont know why on the top of screen i dont see "Fuel:0/60" (randomly numbers). When im entering car like patriot i'd can se it but in my Moonbeam i can't pls help me ;] Sorry for eng. my code : for i, veh in ipairs(moonSpawns) do local x, y, z = veh[1], veh[2], veh[3] veh = createVehicle(418, x, y, z) vehCol = createColSphere(x, y, z, 2.5) attachElements(vehCol, veh, 0, 0, 0) setElementData(vehCol, "parent", veh) setElementData(veh, "parent", vehCol) setElementData(vehCol, "vehicle", true) setElementData(vehCol, "MAX_Slots", 40) local tires, engine, parts = getVehicleAddonInfos(getElementModel(veh)) setElementData(vehCol, "Tire_inVehicle", math.random(0, tires)) setElementData(vehCol, "Engine_inVehicle", math.random(0, engine)) setElementData(vehCol, "Parts_inVehicle", math.random(0, parts)) setElementData(vehCol, "spawn", { 418, x, y, z }) setElementData(vehCol, "fuel", 10) for i, items in ipairs(lootItems.helicrashsides) do local randomNumber = math.random(1, 10) if randomNumber == 5 then setElementData(vehCol, items[1], 1) Link to comment
Price. Posted June 7, 2014 Share Posted June 7, 2014 well if you already made a table and executed it correctly, you have a little mistake, if you want the 0/60 for "ALL" vehicles ofc you need to put them in a table and execute them correctly you executed the table good and everything, but at line 3 veh = createVehicle(418, x, y, z) -- you created a specific vehicle therefor it will only appear for this ID should be veh = createVehicle(vehID, x, y, z) -- in the table define the vehicle IDs first then the x,y,z Link to comment
adi8908456 Posted June 11, 2014 Author Share Posted June 11, 2014 Doesn't work, i have ss look http://zapodaj.net/4fc4d61317269.png.html http://zapodaj.net/0247362f3a335.png.html on my moonbeam there is only Engine tires and tank parts but no fuel, in my bobcat are. I was looking in dayz files for semething like "bobcat dx draw fuel" Or I do this wrong ;/ thanks,waiting for help 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