KalashnikovZ Posted January 8, 2016 Share Posted January 8, 2016 Finally, got ready with this hard (irony) script, asked for helps again, and still problems going.. Server.lua addEventHandler("onResourceStart", getRootElement(), handl) function handl() for _, v in ipairs(getElementsByType("vehicle") do if getElementModel(v) == 601 then setVehicleHandling(v, "mass", 15000.0) setVehicleHandling(v, "turnMass", 15000) setVehicleHandling(v, "maxVelocity", 70.0) setVehicleHandling(v, "engineAcceleration", 5.0 ) setVehicleHandling(v, "engineInertia", 25.0) setVehicleHandling(v, "steeringLock", 25.0 ) setVehicleHandling(v, "seatOffsetDistance", 1.0) end end end ) See the error? Debugscript says: Unexpected symbol near ')' Suggestions? Thanks //Kala Link to comment
luskanek Posted January 8, 2016 Share Posted January 8, 2016 (edited) addEventHandler("onResourceStart", getRootElement(), handl) function handl() for _, v in ipairs(getElementsByType("vehicle")) do if getElementModel(v) == 601 then setVehicleHandling(v, "mass", 15000.0) setVehicleHandling(v, "turnMass", 15000) setVehicleHandling(v, "maxVelocity", 70.0) setVehicleHandling(v, "engineAcceleration", 5.0 ) setVehicleHandling(v, "engineInertia", 25.0) setVehicleHandling(v, "steeringLock", 25.0 ) setVehicleHandling(v, "seatOffsetDistance", 1.0) end end end No need to make another topic if you already have one. Edited January 9, 2016 by Guest Link to comment
1LoL1 Posted January 9, 2016 Share Posted January 9, 2016 Here you can see error. for _, v in ipairs(getElementsByType("vehicle") do Try this: addEventHandler("onResourceStart", getRootElement(), function () for _, v in ipairs(getElementsByType("vehicle")) do if getElementModel(v) == 601 then setVehicleHandling(v, "mass", 15000.0) setVehicleHandling(v, "turnMass", 15000) setVehicleHandling(v, "maxVelocity", 70.0) setVehicleHandling(v, "engineAcceleration", 5.0 ) setVehicleHandling(v, "engineInertia", 25.0) setVehicleHandling(v, "steeringLock", 25.0 ) setVehicleHandling(v, "seatOffsetDistance", 1.0) end end 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