Jump to content

How to?


gokalpfirat

Recommended Posts

Posted

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  

Posted

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

Posted

try this:

for _,v in ipairs(getElementsByType("vehicle"))do 
    for _,i in ipairs(getVehicleHandling(v))do 
        setVehicleHandling(v,i,nil) 
    end 
end 

Posted
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

Posted

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 

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