illestiraqi Posted October 18, 2012 Share Posted October 18, 2012 I would like to know if its possible to add a custom vehicle or add a custom skin? Link to comment
Mossy Posted October 18, 2012 Share Posted October 18, 2012 custom vehicle http://mta.dzek.eu/vehicle/ Which uses the function engineLoadTXD custom skin? Look at viewtopic.php?f=91&t=37337 Link to comment
myonlake Posted October 19, 2012 Share Posted October 19, 2012 I think the fact that you give a link to an automatic generator doesn't teach him anything - only that he gets what he wants without putting any effort to it. First of all, texture replacements are client-side and work as a normal resource. You need two files for normal purposes (TXD, DFF). You need to load these files via the meta.xml file and via the client-side .lua file. I made you a simple example of how it can be done. I do not suggest generators because it takes more time than doing this manually. If you want to improve your lua skills in MTA, then you should just script everything by yourself and not use anyone else's scripts - just saying. Replacing the skin ID 9 skin_txd = engineLoadTXD("models/9.txd") engineImportTXD(skin_txd, 9) skin_dff = engineLoadDFF("models/9.dff", 0) engineReplaceModel(skin_dff, 9) Replacing the vehicle ID 411 (Infernus) vehicle_txd = engineLoadTXD("models/Infernus.txd") engineImportTXD(vehicle_txd, 411) vehicle_dff = engineLoadDFF("models/Infernus.dff", 411) engineReplaceModel(vehicle_dff, 411) If you want to replace something else than vehicles, then your engineLoadDFF's second argument must be a zero. Otherwise you must enter the vehicle ID. <meta> <info name="Replacement of textures" type="script" /> <script src="c_replace.lua" type="client" /> <file src="models/9.txd" /> <file src="models/9.dff" /> <file src="models/Infernus.txd" /> <file src="models/Infernus.dff" /> </meta> Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now