gokalpfirat Posted September 1, 2012 Share Posted September 1, 2012 Hi guys. I want set all cars handling to their originals. I can make it with a lot of lines but I dont want to make there. I havent do a lot of scripts with "for k,v in pairs(h)" like loops. How can i make. I know that I should use theese functions. getOriginalHandling setModelHandling Link to comment
Des Posted September 1, 2012 Share Posted September 1, 2012 Press on setModelHandling and read the example. Link to comment
gokalpfirat Posted September 1, 2012 Author Share Posted September 1, 2012 Yes i know but i want to make this to all vehicles with loop. Otherwise I can do it with a lot of lines. Link to comment
Des Posted September 1, 2012 Share Posted September 1, 2012 Not sure how to do it on the spot but you can try your way with: for _,vehicle in ipairs( getElementsByType( "vehicle" ) ) do for k,_ in pairs(getModelHandling(vehicle)) do setModelHandling(vehicle, k, nil) But I doubt it'll work Link to comment
Jaysds1 Posted September 1, 2012 Share Posted September 1, 2012 try this: for _,v in ipairs(getElementsByType("vehicle"))do for _,i in ipairs(getVehicleHandling(v))do setVehicleHandling(v,i,nil) end end Link to comment
gokalpfirat Posted September 2, 2012 Author Share Posted September 2, 2012 try this:for _,v in ipairs(getElementsByType("vehicle"))do for _,i in ipairs(getVehicleHandling(v))do setVehicleHandling(v,i,nil) end end Is this will set the original handling values to car. I shouldn't use getOrginalHandling Link to comment
Jaysds1 Posted September 2, 2012 Share Posted September 2, 2012 oh, you want the original handling, ok, here: for _,v in ipairs(getElementsByType("vehicle"))do for i,v in pairs(getOriginalHandling(v))do setVehicleHandling(v,i,v) 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