Jump to content

Hello, Some help please.


AjaxFTW

Recommended Posts

Posted

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 ) 

Posted
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 ) 

The value specified for maxVelocity, has to be a floating point value. Instead of 230, just use 230.0

Posted

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.

Posted
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.

use math.floor method.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...