Jump to content

Wheel replacing


Recommended Posts

Posted

I am trying to work on a wheel replacement script for my server.

At the moment, i have this:

meta.xml

"Threule" name="Wheels" version="1" type="script"/> 

script.lua

    function replaceModel() 
    txd = engineLoadTXD("J2_wheels.txd",  ) 
    engineImportTXD(txd, ) 
    dff = engineLoadDFF("wheel_gn1.dff", 1082 ) 
    engineReplaceModel(dff, 1082) 
    dff = engineLoadDFF("wheel_gn2.dff", 1085 ) 
    engineReplaceModel(dff, 1085) 
    dff = engineLoadDFF("wheel_gn3.dff", 1096 ) 
    engineReplaceModel(dff, 1096) 
    dff = engineLoadDFF("wheel_gn4.dff", 1096 ) 
    engineReplaceModel(dff, 1096) 
    dff = engineLoadDFF("wheel_gn5.dff", 1098 ) 
    engineReplaceModel(dff, 1098) 
    dff = engineLoadDFF("wheel_lr1.dff", 1077 ) 
    engineReplaceModel(dff, 1077) 
    dff = engineLoadDFF("wheel_lr2.dff", 1083 ) 
    engineReplaceModel(dff, 1083) 
    dff = engineLoadDFF("wheel_lr3.dff", 1078 ) 
    engineReplaceModel(dff, 1078) 
    dff = engineLoadDFF("wheel_lr4.dff", 1076 ) 
    engineReplaceModel(dff, 1076) 
    dff = engineLoadDFF("wheel_lr5.dff", 1084 ) 
    engineReplaceModel(dff, 1084) 
    dff = engineLoadDFF("wheel_or1.dff", 1025 ) 
    engineReplaceModel(dff, 1025) 
    dff = engineLoadDFF("wheel_sr1.dff", 1079 ) 
    engineReplaceModel(dff, 1079) 
    dff = engineLoadDFF("wheel_sr2.dff", 1075 ) 
    engineReplaceModel(dff, 1075) 
    dff = engineLoadDFF("wheel_sr3.dff", 1074 ) 
    engineReplaceModel(dff, 1074) 
    dff = engineLoadDFF("wheel_sr4.dff", 1081 ) 
    engineReplaceModel(dff, 1081) 
    dff = engineLoadDFF("wheel_sr5.dff", 1080 ) 
    engineReplaceModel(dff, 1080) 
    dff = engineLoadDFF("wheel_sr6.dff", 1073 ) 
    engineReplaceModel(dff, 1073) 
    end 
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
    addCommandHandler ( "reloadcar", replaceModel ) 

I know there is some part wrong, because i need to get the "J2_wheels" into the veh_mods.ide and i dont know how.

The pack i'm using is this one: http://www.gtadl.com/juiced-2-hin-wheels-pack-3/

Just in case you feel glad to help

Posted (edited)

You haven't declared the TXD model arguments.

txd = engineLoadTXD("J2_wheels.txd") 
engineImportTXD(txd, MODEL) 

Edited by Guest
Posted
Is that for new model adding? I'm new in this, and everytime you correct me, i need to know what the fix means

You have to enter the model ID you want to change.

Posted
Is that for new model adding? I'm new in this, and everytime you correct me, i need to know what the fix means

You have to enter the model ID you want to change.

The J2_wheels is a custom txd that technically would load all the tuning shop wheels, technically it doesnt have a model number

Posted
Is that for new model adding? I'm new in this, and everytime you correct me, i need to know what the fix means

You have to enter the model ID you want to change.

The J2_wheels is a custom txd that technically would load all the tuning shop wheels, technically it doesnt have a model number

You have to repeat the code For All Dff

Example :

function replaceModel()  
   txd = engineLoadTXD("J2_wheels.txd",  ) 
    engineImportTXD(txd, ) 
    dff = engineLoadDFF("wheel_gn1.dff", 1082 ) 
    engineReplaceModel(dff, 1082) 
   txd = engineLoadTXD("J3_wheels.txd",  ) 
    engineImportTXD(txd, ) 
    dff = engineLoadDFF("wheel_gn2.dff", 1082 ) 
    engineReplaceModel(dff, 1082) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  
addCommandHandler ( "reloadcar", replaceModel ) 

Posted

You have to enter the model ID you want to change.

The J2_wheels is a custom txd that technically would load all the tuning shop wheels, technically it doesnt have a model number

You have to repeat the code For All Dff

Example :

function replaceModel()  
   txd = engineLoadTXD("J2_wheels.txd",  ) 
    engineImportTXD(txd, ) 
    dff = engineLoadDFF("wheel_gn1.dff", 1082 ) 
    engineReplaceModel(dff, 1082) 
   txd = engineLoadTXD("J3_wheels.txd",  ) 
    engineImportTXD(txd, ) 
    dff = engineLoadDFF("wheel_gn2.dff", 1082 ) 
    engineReplaceModel(dff, 1082) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  
addCommandHandler ( "reloadcar", replaceModel ) 

But there isn't a J3_wheels. Its just one file

Posted

Eh... is this J2_wheels.txd included in GTA or is this some fully custom thing? Because you can't get it to work I suppose. You have to have a separate TXD for each model.

Posted
Eh... is this J2_wheels.txd included in GTA or is this some fully custom thing? Because you can't get it to work I suppose. You have to have a separate TXD for each model.

A custom thing. Thats why i linked the wheels url.

So i break that J2 thing into many txds or something?

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