emuk Posted August 12, 2014 Posted August 12, 2014 I used the setModelHandling as it says on wiki function handlingChange() setModelHandling(541, "mass", 1890) setModelHandling(541, "turnMass", 3780) setModelHandling(541, "dragCoeff", 0.7) setModelHandling(541, "centerOfMass", {0.0, 0.1, -0.2} ) setModelHandling(541, "percentSubmerged", 75) setModelHandling(541, "tractionMultiplier", 0.70) setModelHandling(541, "tractionLoss", 0.90) setModelHandling(541, "tractionBias", 0.50) setModelHandling(541, "numberOfGears", 5) setModelHandling(541, "maxVelocity", 407) setModelHandling(541, "engineAcceleration", 50) setModelHandling(541, "engineInertia", 10) setModelHandling(541, "driveType", "awd") setModelHandling(541, "engineType", "petrol") setModelHandling(541, "brakeDeceleration", 11) setModelHandling(541, "brakeBias", 0.45) setModelHandling(541, "ABS", false) setModelHandling(541, "steeringLock", 30) setModelHandling(541, "suspensionForceLevel", 0.80) setModelHandling(541, "suspensionDamping", 0.20) setModelHandling(541, "suspensionHighSpeedDamping", 0.0) setModelHandling(541, "suspensionUpperLimit", 0.10) setModelHandling(541, "suspensionLowerLimit", -0.09) setModelHandling(541, "suspensionFrontRearBias", 0.5) setModelHandling(541, "suspensionAntiDiveMultiplier", 0.6) setModelHandling(541, "seatOffsetDistance", 0.3) setModelHandling(541, "collisionDamageMultiplier", 0.50) setModelHandling(541, "monetary", 1460000) setModelHandling(541, "modelFlags", 0xC0222004) setModelHandling(541, "handlingFlags", 0x1400000) setModelHandling(541, "headLight", 1) setModelHandling(541, "tailLight", 1) setModelHandling(541, "animGroup", 0) end addEventHandler("onResourceStart", resourceRoot, handlingChange) but it only works with cars created in the game, the cars spawned with the map are not changed, how can i do it ? I think I have to use "ipairs" but I have not found any tutorial on how to use it. who can help me ? thanks
xXMADEXx Posted August 12, 2014 Posted August 12, 2014 viewtopic.php?f=148&t=75501 Open the "Loops" section The function you'll need is getElementsByType. If you need any further help, don't hesitate to contact me. The Ultimate Lua Tutorial! | MTA PHP SDK
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