Left 4 Green: How to use custom vehicle, object's skin & music in MTA - Left 4 Green

Jump to content

Toggle shoutbox Thu'umbox

rui_troia  : (22 May 2012 - 22:45) See yah
rui_troia  : (22 May 2012 - 22:45) Brand new map of CSS by me is out! http://gamebanana.com/css/maps/166036
Gunslinger  : (22 May 2012 - 22:44) that mean no Dòner Kebeb for mej
Gunslinger  : (22 May 2012 - 22:44) but then i got no teeth!
xeim  : (22 May 2012 - 22:34) RIP I OUT !
Gunslinger  : (22 May 2012 - 22:25) fuck my brace it make me dont wanna eat and i cant even put the food in my mounth BECAUSE IT FILLS ALMOST WHOLE MY MOUNTH have lesser than a half space to eat mah food and now i cant even FUS RO DAH! :(
rui_troia  : (22 May 2012 - 22:23) Derpfuck. Bye lads, ladies and Headcrabs.(Also female headcrabs)
Dr.Minky  : (22 May 2012 - 22:17) Yes sir
Baron Baconeer  : (22 May 2012 - 22:17) 173 works hard and plays harder.
Baron Baconeer  : (22 May 2012 - 22:17) Get your ass back there.
Baron Baconeer  : (22 May 2012 - 22:17) Minky.
Dr.Minky  : (22 May 2012 - 22:17) Ugh
Luke Nukem  : (22 May 2012 - 21:55) Going to code :(
Dr.Minky  : (22 May 2012 - 21:54) Gonna play SCP
Dr.Minky  : (22 May 2012 - 21:54) http://www.livestream.com/drminky
Luke Nukem  : (22 May 2012 - 21:53) The feel of rust against my salad fingers is almost orgasmic
Luke Nukem  : (22 May 2012 - 21:52) I like Rusty Spoons.... http://www.youtube.com/watch?v=M3iOROuTuMA
Gunslinger  : (22 May 2012 - 21:52) kh¨'pdjhidh'
Baron Baconeer  : (22 May 2012 - 21:51) Dr. Minky.
Dr.Minky  : (22 May 2012 - 21:50) Rusty taps
Resize Shouts Area
  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

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

#1 User is offline   CsenaHUN 

  • Zombie Meat
  • 2

Posted 08 August 2010 - 13:46

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...?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.thegtapla...d-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...=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.c.../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.co...tle=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

Posted Image

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!

This post has been edited by CsenaHUN: 17 January 2011 - 00:52

+
Drive on the pavement. Accidents always happen on the road.
0

#2 User is offline   Bandit 

  • Zombie Meat
  • Server Admins
    22

Posted 08 August 2010 - 13:50

Thanks a lot! Really useful.
Going to use this in my new map.
+
Posted Image
0

#3 User is offline   .:SDK:. 

  • Zombie Meat
  • Server Admins
    5

Posted 08 August 2010 - 13:58

Nice tutorial Csena
0

#4 User is offline   CyriusG 

  • Very cyrius...
  • Greens
  • Pip
  • 6

Posted 08 August 2010 - 14:22

Good tutorial. :)
0

#5 User is offline   BinSlayer 

  • Survivor
  • Server Admins
  • PipPip
  • 31

Posted 08 August 2010 - 14:54

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 :)

This post has been edited by BinSlayer: 08 August 2010 - 14:56

0

#6 User is offline   Bandit 

  • Zombie Meat
  • Server Admins
    22

Posted 14 August 2010 - 00:41

Please sticky this.
+
Posted Image
0

#7 User is offline   BlueYoshi97 

  • Rest In Peace, good Wood Elf! ;-(
  • Server Admins
  • PipPipPipPipPip
  • 75

Posted 14 August 2010 - 01:57

Thank you so much! :mr-green:
+
Posted Image
Made By Legendary Wonder TK.
0

#8 User is offline   Cookie 

  • Horde Decoy
  • Server Admins
  • Pip
  • 33

Posted 20 August 2010 - 15:04

Thnx BinSlayer it worked. :yeah:
0

#9 User is offline   xerox 

  • Zombie Meat
  • 0

Posted 30 October 2010 - 15:03

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
0

#10 User is offline   dodgecharger123 

  • Zombie Meat
  • 0

Posted 26 November 2010 - 07:31

I still doesn't understand the 'files' in map archive. May i know where's the map archive? Im a newbie in mapping. :(
+
Posted Image
0

#11 User is offline   CsenaHUN 

  • Zombie Meat
  • 2

Posted 26 November 2010 - 11:45

You can find your map here: MTA San Andreas\server\mods\deathmatch\resources\yourmap
+
Drive on the pavement. Accidents always happen on the road.
0

#12 User is offline   BabaJaga 

  • Zombie Meat
  • 0

Posted 06 January 2011 - 18:33

and i can to my map embed billboard with my nick, can it?

something like this:

This post has been edited by BabaJaga: 06 January 2011 - 18:36

0

#13 User is offline   .:SDK:. 

  • Zombie Meat
  • Server Admins
    5

Posted 06 January 2011 - 19:40

Sure, download it here, install it, start a local server, do some scripting magic, copy the files, and integrate in your race map.

Or ask Emanuel how he did it.
0

#14 User is offline   CsenaHUN 

  • Zombie Meat
  • 2

Posted 06 January 2011 - 23:54

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

Posted Image

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

This post has been edited by CsenaHUN: 07 January 2011 - 16:52

+
Drive on the pavement. Accidents always happen on the road.
0

#15 User is offline   FOTL.Emanuel 

  • Zombie Meat
  • 0

Posted 07 January 2011 - 01:43

Pretty much what i was going to say, even the object page i use is the same :P
+
Posted Image
0

#16 User is offline   BabaJaga 

  • Zombie Meat
  • 0

Posted 07 January 2011 - 07:38

wow, thanks Csena, this i was searching ...
0

#17 User is offline   p0w3rfull1 

  • Zombie Meat
  • 0

Posted 07 January 2011 - 14:55

thx Csena ;)
0

#18 User is offline   Bandit 

  • Zombie Meat
  • Server Admins
    22

Posted 12 January 2011 - 18:21

Please sticky!
+
Posted Image
0

#19 User is offline   terminator 

  • Zombie Meat
  • 200

Posted 12 January 2011 - 21:25

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:
+
Desktop-1-MSI GTX560|6GB DDR3 1333|i7 2600K@ 4,2|2TB
desktop-2- ASUS9800GT|4GBDDR2 800|Q8200 @ 2,33GHZ|410GB
laptop-1- ASUS N53JQ- NvidiaGT425m|i7 740qm @ 2,93GHZ|4GB DDR3|500GB
laptop-2- Toshiba Satelite -HD3470|4GB DDR2|AMD dualcore @ 2,0ghz|320GB

Clavus : (05 February 2012 - 23:01) his account is suspended for a week
Clavus : (05 February 2012 - 23:01) terminator is the first dude to ever reach the warn level threshold afaik



I've gone where no one's gone before!
0

#20 User is online   Darkstar 

  • DOVAKING
  • Global Admins
  • PipPipPipPipPipPip
  • 124

Posted 12 January 2011 - 21:31

Pinned.
+
Posted Image
0

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users