Jump to content

Modding/Replacing rims?


Chris_Canfield

Recommended Posts

Ok so I have car mods and skin mods but how would I replace rims? (aka tires)

Eg of skin mod

function onResourceStart()
--BREEN
BREEN = engineLoadTXD ( "skins/113.txd" )
engineImportTXD ( BREEN, 113 )
 
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)

Eg of car mod

function installAuto ( startedResource )
   if ( startedResource == getThisResource() ) then
       txd = engineLoadTXD ( "data/copcarvg.txd" )
       engineImportTXD ( txd, 598 )
       dff = engineLoadDFF ( "data/copcarvg.dff", 598 )
       engineReplaceModel ( dff, 598 )
   end
end
 
addEventHandler ( "onClientResourceStart", getRootElement(), installAuto )

So what would I do to make a tire mod? :S

Link to comment
In order to replace texture of a model you have to know its ID. Skins are models from 0 to 288. If wheel's ID is in that range then it won't replace the wheels texture but skin (character) with specified ID.

So I would do:

function installAuto ( startedResource )
   if ( startedResource == getThisResource() ) then
       txd = engineLoadTXD ( "data/wheeltexture.txd" )
       engineImportTXD ( txd, idofwheelhere )
       dff = engineLoadDFF ( "data/wheeltexture.dff", andhere )
       engineReplaceModel ( dff, alsohere )
   end
end
 
addEventHandler ( "onClientResourceStart", getRootElement(), installAuto )

?

Link to comment

You would not. Didn't I make myself clear? If wheels model ID is the same as different objects in GTA then you won't replace it. Besides, if you've read wiki you'd know you can only replace vehicles and objects.

This function replaces the given model in the given model ID with the DFF file passed. This function supports vehicles and objects at the moment.
Link to comment
You would not. Didn't I make myself clear? If wheels model ID is the same as different objects in GTA then you won't replace it. Besides, if you've read wiki you'd know you can only replace vehicles and objects.
This function replaces the given model in the given model ID with the DFF file passed. This function supports vehicles and objects at the moment.

mhm but in a youtube video I saw them replacing wheels, so therefor, it is possible.

Link to comment
You would not. Didn't I make myself clear? If wheels model ID is the same as different objects in GTA then you won't replace it. Besides, if you've read wiki you'd know you can only replace vehicles and objects.
This function replaces the given model in the given model ID with the DFF file passed. This function supports vehicles and objects at the moment.

mhm but in a youtube video I saw them replacing wheels, so therefor, it is possible.

Wheels are objects, just find the I.D

Link to comment

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