Jump to content
Mr. Green Gaming

How to use custom vehicle, object's skin & music in MTA


Recommended Posts

Custom Vehicle

1) First you have to find a good custom vehicle for your map. There are a lots of site where you can download a tons custom vehicle.

http://www.thegtaplace.com/

http://www.gtainside.com/en/news.php

http://gta-worldmods.t-n-network.de/phpkit/start/include.php?path=start.php

Google is your friend! ;)

Copy the txd and the dff file into your map folder. (You can find your map here: MTA San Andreas\server\mods\deathmatch\resources\)

Important: Some vehicle have different handling (more slippery) and big size. Dont use more than 5MB. If the txd file big, it is possible to cut the size with TXD workshop programe. You can download the programe here: http://www.thegtaplace.com/downloads/f722-txd-workshop-4-0b It is free.

Open the *.txd file with workshop. You can see the texture list. Sometimes custom model makers forgot compress the textures. Compress all of them. Or if you have photoshop skill you can change the poli number too. But this is another totorial.

But it is easyer use custom vehicle with less size.

Note: When you download a vehicle, generally the txd and the dff file's name one of GTA SA vehicle's name (infernus, turismo, ect). Coz the custom vehicle made for change that original vehicle.

For example: Acura Rsx Shark Speed http://www.gtainside.com/en/download.php?do=comments&cat=321&start=0&id=27675&orderBy= This one made for change infernus. You have to test some custom model to find the best one. Which has not too big file and has same handling.

2) Script:

Use notepad or Lua for Windows program (http://code.google.com/p/luaforwindows/)


addEventHandler('onClientResourceStart', resourceRoot,
function()
txd = engineLoadTXD ( "***.txd" ) -- ***.txd: the txd file what you want use. for exampe infernus.txd
engineImportTXD ( txd, *** ) -- ***: the original vehicle id what you want replace. for example 411

dff = engineLoadDFF ( "***.dff", *** ) -- ***.dff: the dff file what you want use. for exampla infernus.dff. *** the original vehicle id what you want replace. for example 411
engineReplaceModel ( dff, *** ) -- the original vehicle id what you want replace. for example 411
end
)

GTA SA vehicle id list: http://wiki.mtasa.com/index.php?title=Vehicle_IDs and you can find vehicle id in your map file too. for example: <spawnpoint id="spawnpoint (Infernus) (30)" vehicle="411 ...

Example script file: This one replace infernus

addEventHandler('onClientResourceStart', resourceRoot, 
function()
txd = engineLoadTXD ( "infernus.txd" )
engineImportTXD ( txd, 411 )

dff = engineLoadDFF ( "infernus.dff", 411 )
engineReplaceModel ( dff, 411 )
end
)

Save your script file and put it in your map folder. For examle: vehicle.lua or car.lua or what you want.

3) meta.xml

You have the script and the model now. You have to load your script and the model in the meta file. Put this 3 line in your map's meta.xml file:


<file src="***.txd" /> --***.txd: the txd file what you used. for example infernus.txd (It is necessary to use the same name that you used in your vehicle script file)
<file src="***.dff" /> --***.dff: the dff file what you used. for example infernus.dff (It is necessary to use the same name that you used in your vehicle script file)
<script src="***.lua" type="client" /> --***.lua: the lua file what you made. for example vehicle.lua or car.lua

Example meta file:


<meta>
<file src="infernus.txd" />
<file src="infernus.dff" />
<script src="vehicle.lua" type="client" />
<info gamemodes="race" type="map"... ect ect
</meta>

4) Map file:

You are almost done. When you test your map, the custom model is loading now. BUT. As you can see your new custom model has original wheels.

Open your map file with notepad and use this command in every spawnpoint line:

upgrades="0"

For example:

<spawnpoint id="spawnpoint (Infernus) (1)" vehicle="411" interior="0" posX="3946.408203125" posY="-2606.8208007813" posZ="11.070000648499" rotX="0" rotY="0" rotZ="179.99450683594" upgrades="0" />

When you use more custom model in your map you have to use this 'upgrades="0"' command in vehicle change cp(s). Like this:


<checkpoint id="checkpoint (4)" type="checkpoint" color="#FF000099" size="7" interior="0" nextid="checkpoint (5)" posX="3268.640625" posY="-2551.8454589844" posZ="30.288398742676" rotX="0" rotY="0" rotZ="0" vehicle="434" upgrades="0" />

Some site where you can find more info:

MTA wiki: http://wiki.mtasa.com/wiki/Main_Page

Official MTA forum: http://forum.multitheftauto.com/

Custom Music by BinSlayer

Go to this link and copy and paste everything from it to a "music.lua" file, which you will put in the map archive:

http://www.xoti.net/stuff/uploads/music_3bfb.lua

Next, put your music file in a folder called "files"(create it!) in your map-archive as "music.mp3"

Then edit your meta.xml and add the following right BEFORE the </meta> line:

<file src="files/music.mp3" />
<script src="music.lua" type="client" />

Make sure all files are in the right place. This should do the trick. Have fun mapping!

Custom Object Skin

You need this utils:

imgtool download

txdworkshop download

Photoshop or paint.

notepad

mta :)download

Open map editor

put this object where you want (put a spawnpoint close to the object): billbrdlan_10 id:4238

save your map.

Start imgtool, open this file: C:\Program Files (x86)\Rockstar Games\GTA San Andreas\models\gta3.img

edit, search, billbrd01_lan

commands, extract, save it where you want. (Maybe you should make a Temp folder somewhere and save every temporary files there)

open the saved file (billbrd01_lan.txd) with txdworkshop

you can see 5 image, select heat_02, export, bmp, save

open the saved file with paint or photoshop and edit the picture as you wish (http://cooltext.com/ to make logo. easy to use)

save the picture what you made

open txd workshop again

file, new, 32BPP

import, find your modified picture

double click on the small picture. You have to see Image properties now. name: heat_02, compressed, ok. Save your file as skin.txd in your map folder. (You can find your map here: C:\Program Files (x86)\MTA San Andreas\server\mods\deathmatch\resources\yourmapname)

Notepad

save this script as model.lua into your map folder


addEventHandler('onClientResourceStart', resourceRoot,
function()

txd_nick = engineLoadTXD ( "skin.txd" )
engineImportTXD ( txd_nick, 4238 )

end
)

open meta.xml with notepad

put this two line after <meta>


<script src="model.lua" type="client" />
<file src="skin.txd" />

save

Start your map in the editor

mtascreen20110106230626.jpg

If you want modifie other object you have to check this page: link

Last but not least! Custom model + music + custom object = Download Hell

So do not use all of them!

Edited by CsenaHUN
Link to comment

How to add custom music to your maps!

Go to this link and copy and paste everything from it to a "music.lua" file, which you will put in the map archive:

http://www.xoti.net/stuff/uploads/music_3bfb.lua

Next, put your music file in a folder called "files"(create it!) in your map-archive as "music.mp3"

Then edit your meta.xml and add the following right BEFORE the </meta> line:


<file src="files/music.mp3" />
<script src="music.lua" type="client" />

Make sure all files are in the right place. This should do the trick. Have fun mapping!

Csena: maybe you can add this to the first post so it's more visible :)

Edited by BinSlayer
Link to comment
  • 2 months later...

can some1 help me im trying to add a custom model but i need to change the handling i got the handling.cfg code but how do i turn that into a script?

CHEETAH 1200.0 2500.0 1.8 0.0 -0.15 -0.2 70 0.75 0.90 0.48 5 230.0 30.0 10.0 R P 8.0 0.58 0 30.0 1.0 0.13 5.0 0.25 -0.13 0.45 0.3 0.15 0.54 105000 c0002004 204000 0 0 1

Link to comment
  • 4 weeks later...
  • 1 month later...

Well, this will be fucking long totorial (to write it).

You need this utils:

imgtool download

txdworkshop download

Photoshop or paint.

notepad

mta :)download

Open map editor

put this object where you want (put a spawnpoint close to the object): billbrdlan_10 id:4238

save your map.

Start imgtool, open this file: C:\Program Files (x86)\Rockstar Games\GTA San Andreas\models\gta3.img

edit, search, billbrd01_lan

commands, extract, save it where you want. (Maybe you should make a Temp folder somewhere and save every temporary files there)

open the saved file (billbrd01_lan.txd) with txdworkshop

you can see 5 image, select heat_02, export, bmp, save

open the saved file with paint or photoshop and edit the picture as you wish (http://cooltext.com/ to make logo. easy to use)

save the picture what you made

open txd workshop again

file, new, 32BPP

import, find your modified picture

double click on the small picture. You have to see Image properties now. name: heat_02, compressed, ok. Save your file as skin.txd in your map folder. (You can find your map here: C:\Program Files (x86)\MTA San Andreas\server\mods\deathmatch\resources\yourmapname)

Notepad

save this script as model.lua into your map folder


addEventHandler('onClientResourceStart', resourceRoot,
function()

txd_nick = engineLoadTXD ( "skin.txd" )
engineImportTXD ( txd_nick, 4238 )

end
)

open meta.xml with notepad

put this two line after <meta>


<script src="model.lua" type="client" />
<file src="skin.txd" />

save

Start your map in the editor

mtascreen20110106230626.jpg

If you want modifie other object you have to check this page: link

Edited by CsenaHUN
Link to comment

Nice tutorial csena! and could you please tell me what version of ENB you are using? mine seems to bug the game. :meh: :meh: :meh:

He's using a totally different mod called UltraThing. Well not totally different because it adds a similiar affect.

You can find it in his thread here:

Link to comment

Thanks mate, awesome post, though, i have some questions, hope you ll have soon some time to answer.

1.I cant find id of vehiclelights128.I need it so i can add HQLMv2 mod into my server (high quality lights mod v2).

2.Do you know how to add song, so it only plays on certain places like 10 meters around spawn point, or just first 30 secs, when players logs in ?

3. Is it possible to add handling lines for custom vehicles i added to server, or is it possible to add whole handling.cfg so to players that connect to the server, that handling overwrites their own while in the server ?

I heard that it's not yet possible, but they said they ll implement it in 1.1 version, just want to make it sure.

Edited by rijads
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...