Jump to content

QUESTION: Car Mod Maker


Recommended Posts

Ye, here:

function mod()  -- clientside 
  txd = engineLoadTXD("name.txd", 425 ) -- name.txd = txd file, 425 = car id 
  engineImportTXD(dff, 425) 
  dff = engineLoadDFF("name.dff", 425 ) -- name.dff = dff file, 425 = car id 
  engineReplaceModel(dff, 425) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), mod) 

Link to comment
local tVehicles = 
{ 
    { txd = 'data/infernus.txd', txdID = 411, dff = 'data/infernus.dff', dffID = 411 }; 
    { txd = 'data/elegy.txd', txdID = 562, dff = 'data/elegy.dff', dffID = 562 }; 
} 
  
addEventHandler ( 'onClientResourceStart', resourceRoot,  
    function ( ) 
        for _, vehicle in pairs ( tVehicles ) do 
            engineReplaceModel  (  
                                    engineLoadDFF ( vehicle.dff, vehicle.dffID ), 
                                    vehicle.dffID 
                                ); 
            engineImportTXD     ( 
                                    engineLoadTXD ( vehicle.txd, vehicle.txdID ), 
                                    vehicle.txdID 
                                ); 
        end 
    end 
) 

To add more vehicles to the table do:

{ txd = 'pathToTheTXD', txdID = idOfTheTxdFile, dff = 'pathToTheDFF', dffID = idOfTheDffFile }; 

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