Jump to content

[Snippet] Custom Vehicle


CJGrove

Recommended Posts

There is much confuse about this therefore I thought I just start a new topic and I give the code with it.

Thanks to kevuwk

It is posible if the car is strange white strips and stuff.

Then you need to stop and start the script while in the server.

Change the green text.

carname.lua

function replaceModel() 
  txd = engineLoadTXD ( "[color=#008000]name.txd[/color]" ) 
  engineImportTXD ( txd, [color=#008000]CAR ID[/color]) 
  dff = engineLoadDFF ( "[color=#008000]name.dff[/color]", [color=#008000]CAR ID[/color]) 
  engineReplaceModel ( dff, [color=#008000]CAR ID[/color]) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 

meta.xml

<meta> 
    <info author="kevuwk" name="Custom Vehicle" version="1" type="script" /> 
    <script src="[color=#008000]carname.lua[/color]" type="client"/> 
    <file src="[color=#008000]name.dff[/color]" /> 
    <file src="[color=#008000]name.txd[/color]" /> 
</meta>  

Sorry for my bad English

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