AjaxFTW Posted January 21, 2016 Share Posted January 21, 2016 hey everybody, i made some code to change some things for Infernus Handling but didn't work all IDK why, for example i changed max Speed but didn't work, but car type changed to awd successfully and gears etc... only max speed didn't change help please function vhandling ( ) for _,v in pairs(getElementsByType("vehicle")) do if getElementModel(v) == 411 then setVehicleHandling(v, "numberOfGears", 6) setVehicleHandling(v, "maxVelocity", 230) setVehicleHandling(v, "driveType", "awd") setVehicleHandling(v, "engineType", "electric") end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vhandling ) Link to comment
Mr. Bubbles Posted January 21, 2016 Share Posted January 21, 2016 hey everybody, i made some code to change some things for Infernus Handling but didn't work all IDK why, for example i changed max Speed but didn't work, but car type changed to awd successfully and gears etc... only max speed didn't changehelp please function vhandling ( ) for _,v in pairs(getElementsByType("vehicle")) do if getElementModel(v) == 411 then setVehicleHandling(v, "numberOfGears", 6) setVehicleHandling(v, "maxVelocity", 230) setVehicleHandling(v, "driveType", "awd") setVehicleHandling(v, "engineType", "electric") end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vhandling ) The value specified for maxVelocity, has to be a floating point value. Instead of 230, just use 230.0 Link to comment
AjaxFTW Posted January 21, 2016 Author Share Posted January 21, 2016 ok good it's worked but not like what i want for example i want make max speed of infernus 230KPH and at the moment it's just 198 and when i used the code like that 230.0 or 230.3 etc... made max speed just 200KPH or 199KPH. Link to comment
Mr. Bubbles Posted January 22, 2016 Share Posted January 22, 2016 ok good it's worked but not like what i wantfor example i want make max speed of infernus 230KPH and at the moment it's just 198 and when i used the code like that 230.0 or 230.3 etc... made max speed just 200KPH or 199KPH. use math.floor method. Link to comment
tosfera Posted January 22, 2016 Share Posted January 22, 2016 You need to change the inertia property too. Just editing the maxVelocity won't make it go the actual max speed. The calculations behind the max speed are taken with the mass, intertia and maxVelocity. 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