Jump to content

[HELP]Custom Handling to MTA Maps


Speedo

Recommended Posts

Hi all :), i'm new here

As my first topic i wanted to ask something on custom handling.

I started play ffs gaming something like 8 months ago, while i was playing i noticied that in some map (race one) the cars had custom handling, and now i want to ask you how i can do it

i started mapping (i just did 2-3 maps) i learned how to add custom mod or song (there're the tutorials for these) but i didnt found anything about custom handling.

I searched everywhere (here too) but i didnt found anything that could help me, and now i'm here to ask you how i can do it

i think there's a .lua script to make it possible, but i didnt found anything about it.

Thanks to all who will reply this :)

Link to comment

First of all thanks for the reply :)

Yesterday i tryed this , but it didnt worked.. can you tell me which parameters i should change?

function handlingChange () 
        setModelHandling(560, "mass", 1050.0) 
        setModelHandling(560, "turnMass", 3500.0) 
        setModelHandling(560, "dragCoeff", 1.3) 
        setModelHandling(560, "centerOfMass", { 0.0, 0.3, -0.15 } ) 
        setModelHandling(560, "percentSubmerged", 75) 
        setModelHandling(560, "tractionMultiplier", 0.65) 
        setModelHandling(560, "tractionLoss", 0.85) 
        setModelHandling(560, "tractionBias", 0.5) 
        setModelHandling(560, "numberOfGears", 5) 
        setModelHandling(560, "maxVelocity", 450.0) 
        setModelHandling(560, "engineAcceleration", 40.0) 
        setModelHandling(560, "engineInertia", 5.0) 
        setModelHandling(560, "driveType", "rwd") 
        setModelHandling(560, "engineType", "petrol") 
        setModelHandling(560, "brakeDeceleration", 8.0) 
        setModelHandling(560, "brakeBias", 0.5) 
        setModelHandling(560, "ABS", false) 
        setModelHandling(560, "steeringLock", 40.0) 
        setModelHandling(560, "suspensionForceLevel", 1.0) 
        setModelHandling(560, "suspensionDamping", 0.20) 
        setModelHandling(560, "suspensionHighSpeedDamping", 0.0) 
        setModelHandling(560, "suspensionUpperLimit", 0.28) 
        setModelHandling(560, "suspensionLowerLimit", -0.10) 
        setModelHandling(560, "suspensionFrontRearBias", 0.5) 
        setModelHandling(560, "suspensionAntiDiveMultiplier", 0.3) 
        setModelHandling(560, "seatOffsetDistance", 0.25) 
        setModelHandling(560, "collisionDamageMultiplier", 0.60) 
        setModelHandling(560, "monetary", 35000) 
        setModelHandling(560, "modelFlags", 0x40002804) 
        setModelHandling(560, "handlingFlags", 0x4000001) 
        setModelHandling(560, "headLight", 1) 
        setModelHandling(560, "tailLight", 1) 
        setModelHandling(560, "animGroup", 1)        
end 
addEventHandler("onResourceStart", resourceRoot, handlingChange) 
  

Link to comment
  • Moderators
First of all thanks for the reply :)

Yesterday i tryed this , but it didnt worked.. can you tell me which parameters i should change?

function handlingChange () 
        setModelHandling(560, "mass", 1050.0) 
        setModelHandling(560, "turnMass", 3500.0) 
        setModelHandling(560, "dragCoeff", 1.3) 
        setModelHandling(560, "centerOfMass", { 0.0, 0.3, -0.15 } ) 
        setModelHandling(560, "percentSubmerged", 75) 
        setModelHandling(560, "tractionMultiplier", 0.65) 
        setModelHandling(560, "tractionLoss", 0.85) 
        setModelHandling(560, "tractionBias", 0.5) 
        setModelHandling(560, "numberOfGears", 5) 
        setModelHandling(560, "maxVelocity", 450.0) 
        setModelHandling(560, "engineAcceleration", 40.0) 
        setModelHandling(560, "engineInertia", 5.0) 
        setModelHandling(560, "driveType", "rwd") 
        setModelHandling(560, "engineType", "petrol") 
        setModelHandling(560, "brakeDeceleration", 8.0) 
        setModelHandling(560, "brakeBias", 0.5) 
        setModelHandling(560, "ABS", false) 
        setModelHandling(560, "steeringLock", 40.0) 
        setModelHandling(560, "suspensionForceLevel", 1.0) 
        setModelHandling(560, "suspensionDamping", 0.20) 
        setModelHandling(560, "suspensionHighSpeedDamping", 0.0) 
        setModelHandling(560, "suspensionUpperLimit", 0.28) 
        setModelHandling(560, "suspensionLowerLimit", -0.10) 
        setModelHandling(560, "suspensionFrontRearBias", 0.5) 
        setModelHandling(560, "suspensionAntiDiveMultiplier", 0.3) 
        setModelHandling(560, "seatOffsetDistance", 0.25) 
        setModelHandling(560, "collisionDamageMultiplier", 0.60) 
        setModelHandling(560, "monetary", 35000) 
        setModelHandling(560, "modelFlags", 0x40002804) 
        setModelHandling(560, "handlingFlags", 0x4000001) 
        setModelHandling(560, "headLight", 1) 
        setModelHandling(560, "tailLight", 1) 
        setModelHandling(560, "animGroup", 1)        
end 
addEventHandler("onResourceStart", resourceRoot, handlingChange) 
  

That's a nice try (edit, ok it's coming from the wiki ^^), but to be sure the script is executed, put an outputChatBox like this:

function handlingChange () 
        setModelHandling(560, "mass", 1050.0) 
        setModelHandling(560, "turnMass", 3500.0) 
        setModelHandling(560, "dragCoeff", 1.3) 
        setModelHandling(560, "centerOfMass", { 0.0, 0.3, -0.15 } ) 
        setModelHandling(560, "percentSubmerged", 75) 
        setModelHandling(560, "tractionMultiplier", 0.65) 
        setModelHandling(560, "tractionLoss", 0.85) 
        setModelHandling(560, "tractionBias", 0.5) 
        setModelHandling(560, "numberOfGears", 5) 
        setModelHandling(560, "maxVelocity", 450.0) 
        setModelHandling(560, "engineAcceleration", 40.0) 
        setModelHandling(560, "engineInertia", 5.0) 
        setModelHandling(560, "driveType", "rwd") 
        setModelHandling(560, "engineType", "petrol") 
        setModelHandling(560, "brakeDeceleration", 8.0) 
        setModelHandling(560, "brakeBias", 0.5) 
        setModelHandling(560, "ABS", false) 
        setModelHandling(560, "steeringLock", 40.0) 
        setModelHandling(560, "suspensionForceLevel", 1.0) 
        setModelHandling(560, "suspensionDamping", 0.20) 
        setModelHandling(560, "suspensionHighSpeedDamping", 0.0) 
        setModelHandling(560, "suspensionUpperLimit", 0.28) 
        setModelHandling(560, "suspensionLowerLimit", -0.10) 
        setModelHandling(560, "suspensionFrontRearBias", 0.5) 
        setModelHandling(560, "suspensionAntiDiveMultiplier", 0.3) 
        setModelHandling(560, "seatOffsetDistance", 0.25) 
        setModelHandling(560, "collisionDamageMultiplier", 0.60) 
        setModelHandling(560, "monetary", 35000) 
        setModelHandling(560, "modelFlags", 0x40002804) 
        setModelHandling(560, "handlingFlags", 0x4000001) 
        setModelHandling(560, "headLight", 1) 
        setModelHandling(560, "tailLight", 1) 
        setModelHandling(560, "animGroup", 1) 
        outputChatBox("Handling changed successfully !") 
end 
addEventHandler("onResourceStart", resourceRoot, handlingChange) 
  

Try again an check if this message appears in your chatbox. If not, then you forgot to add this script file into your meta.xml (and should be of type server)

Link to comment

Thanks again for the quick reply :)

i tried this and i dont got the message, but on the meta.xml the script its added

<meta> 
    <file src="handling.lua" /> 
    <script src="handling.lua" type="client" /> 
    <info gamemodes="race" type="map" name="test" version="1.0.0"></info> 
    <map src="test.map" dimension="0"></map> 
ecc... 
  

EDIT: I changed type=server and know it works .. but i'm not that will work on the server,

for example to add a custom vehicle on the meta.xml file i put this.. you see that on "type" there's client and not server

Will it work on the game, or it will work only on map editor? i ask you because when i upload the map on the server, i need to delete this file from the folder of the map " mapEditorScriptingExtension_s.lua "(that its the script of the server) this is why i doubt that it will work, thanks again for the help.. i appreciate it :)

<meta> 
    <file src="infernus.txd" /> 
    <file src="infernus.dff" /> 
    <script src="vehicle.lua" type="client" /> 
    <info gamemodes="race" type="map"... ect ect 
</meta> 
  

Link to comment

Nope.. if i add the server script when i upload a map , it wont work because the server i'm uploading dont support (or dont need ) this file.

If i write on type=client the handling wont work on my map.. but it will work on the server?

Link to comment
  • 1 year later...
  • 8 years later...

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