Jump to content
Mr. Green Gaming

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


Recommended Posts

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.

1. Well I do not know is it possible or not to add this mod to your server since it made for gta sa not for mta. I see the addon has modified txt, so perhaps you can use it, but as I know vehlight do not have id.

Edit: San Andreas\data\maps\veh_mods\veh_mods.ide All veh addon has id, but lights not. So you have to find a way how you can define vehlight in your script.

2. It is not difficult. Check this site and this.

3. You are right. It is not possible yet, but it will be in 1.1. The only way I know to mod handling is Plod's script. Check this topic! You can download the script form here.

Edited by CsenaHUN
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.

1. Well I do not know is it possible or not to add this mod to your server since it made for gta sa not for mta. I see the addon has modified txt, so perhaps you can use it, but as I know vehlight do not have id.

Edit: San Andreas\data\maps\veh_mods\veh_mods.ide All veh addon has id, but lights not.

2. It is not difficult. Check this site and this.

3. You are right. It is not possible yet, but it will be in 1.1. The only way I know to mod handling is Plod's script. Check this topic! You can download the script form here.

Awesome, thanks for fast answers,

This handling script doesn't use the same format of handling, so i will wait for version 1.1.

song script,I managed to make it work :D

But it plays music on really short distance, here is code:

local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)

function maxdistanceFunc(command, param)

setSoundMaxDistance(sound, tonumber(param))

end

addCommandHandler("setmaxdistance", maxdistanceFunc)

its from wiki, i use the same, now the syntax is:

bool setSoundMaxDistance ( element sound, int distance )

so is it possible to attach sound to some element example radio, or car, and what happens if possible what happens if car moves, does the sound moves with it, i had in mind something like this:

bool setSoundMaxDistance ( vehicle id="vehicle (Buffalo) (5)" model="402" plate="GXYIBRZ" interior="0" dimension="0" color="1,1,0,0" posX="2817.7409667969" posY="-1092.3215332031" posZ="95.108978271484" rotX="0" rotY="0" rotZ="88.74755859375" sounds/song1.mp3, int 50 )

where (vehicle id=...) represents element, sounds/song1.mp3 represents sound, int =int, and 50 represents distance.

I know probably this is imposible how i described it, but could you just tell me where am i making mistakes ?

i am sorry for so many questions, i can't do anything with lua :/, but am willing to learn, i only can program a lil bit in c++ and that's it :/

( i did copy folder sounds in my gamemod zip, and song1.mp3 in it, put in meta.xml

following:

<script src="song1.lua" type="client" />

<file src="sounds/song1.mp3"/>

and song1.lua next to the meta.xml adn other files...)

Edited by rijads
Link to comment

Well I am mapper. I do not know how to set up server. You said you want a player join sound. You can use THIS script for your server.

btw I need some more information about your server. Is it race server? And I do not understand what is the point to attach sound to object or to vehicle.

You should search on the official MTA forum. I am 100% sure what you want, but check THIS TOPIC.

Link to comment

Well I am mapper. I do not know how to set up server. You said you want a player join sound. You can use THIS script for your server.

btw I need some more information about your server. Is it race server? And I do not understand what is the point to attach sound to object or to vehicle.

You should search on the official MTA forum. I am 100% sure what you want, but check THIS TOPIC.

I am running drift mode server, with 10+ custom cars,and importing still new ones! Making it look like in the movie tokyo drift, all the cars from the movie, + handling.cfg on server with link + tutorial how to backup original nadling adn use this drift hadnling.cfg while in that server.

I use more .map files , start.map is first and that is garage where player spawns and 2 cars in it, also teleport point, so when he wants to get out, it teleports him to mountain where there is a lot of cars, and he can drift downhil with them.

Also created teleport points, 4 diffirent garages, one just like in the movise, with cars, adn everything so he can drift through 4 floors.

Also using modshop in ever garage where players can upgrade their vehicles for money.

using also drift script which generates drift points while player is drifting.

Planing to make race script for drifters (2 points one on the top of garage, and second on the very end of it, + timelimit he has to amke it in that time or he looses, and player with more drift points wins the race)+ making bet system and pinkslips system so they can race for cash or cars.

other .map files are for vehicle spawn points, and other drift tracks.

hmm well, i ll first have to learn lua much more, and than i ll make it all XD.

Well that is pretty much i want to start with.

Thanks for your help ;)

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

You can find your map here: MTA San Andreas\server\mods\deathmatch\resources\yourmap

Nice Tutorial...

But 1 more the Tutorial at Music its need to be fixed.

Just open this link :

http://community.multitheftauto.com/index.php?p=resources&s=details&id=762

How to edit the ORIGINAL MUSIC to NEW MUSIC (This only be work on all map only) (Tutorial by Jason) :

1.Download the Script and Music on http://community.multitheftauto.com/index.php?p=resources&s=details&id=762

2.Open the Music.zip using Winrar.exe

3.CTRL + A on all files in Music.zip .IMPORTANT : Hold CTRL and click the meta file (The Problem is : Cant play map).

4.Drag the file (Music.lua and baseball.mp3) to your resources/map folder

5.If you want to change the music file (baseball.mp3) its easy,Just copy your favorite music and paste to your map and rename your music name to baseball . :D ENJOY! :D

Link to comment
  • 2 months later...

I am not really active nowdays, but I was playing on green today. There was a map (do not know the name) wherein I downloaded a song. The song size is 15 MB. WTF?! I like Mario Ranieri. He is a really good techno DJ, but I do not put his music in my maps. My favourite song is Mario Ranieri - Live at TechnoEnergy FM_2005. It is only 115 MB.

Before I reinstalled win7 my mta folder size was almost 4GB. 4GB!!!

I do not have problem with custom vehicle and custom texture or model, but I do not want download useless mp3 files, because I always turn the music off (Yoshi's musics are ok.).

There are tons of programs on the Internet that can compress mp3 files without loosing quality. FFS use them!

So let me help you guys.

Link

Edited by CsenaHUN
Link to comment
  • 3 weeks later...

Some TXD Editor has a Trojan Horse in it, I kept forgetting and retrying it again and again. :mr-green:

I'm not sure if it's the TXD Editor that you posted, [sKC]CsenaHUN. I think I used TXD Editor before and it was working fine. Maybe it's my AVG being weird. Anyway, if people don't wanna risk a potential virus, you could also use G-TXD. I used that to get custom object skins ingame, and works fine too, at least for me it does.

Link to comment

I am not really active nowdays, but I was playing on green today. There was a map (do not know the name) wherein I downloaded a song. The song size is 15 MB. WTF?! I like Mario Ranieri. He is a really good techno DJ, but I do not put his music in my maps. My favourite song is Mario Ranieri - Live at TechnoEnergy FM_2005. It is only 115 MB.

Before I reinstalled win7 my mta folder size was almost 4GB. 4GB!!!

I do not have problem with custom vehicle and custom texture or model, but I do not want download useless mp3 files, because I always turn the music off (Yoshi's musics are ok.).

There are tons of programs on the Internet that can compress mp3 files without loosing quality. FFS use them!

So let me help you guys.

Link

You can't compress mp3 without losing quality, less size leads to less qualty. Your tool is just another encoder.

Anyway, mp3 is outdated format, todays formats like ogg vorbis or aac give much better qualty for the same size. Ogg vorbis is open source format and Gta San Andreas uses it for sounds and radio stations, of course MTA support it too. So I suggest everyone to use ogg vorbis in your maps, quality setting q4 (128kbps) should be enough for ingame music to sound good. Every good audio converter support it, if you haven't got one then download this for example: http://www.mediacoderhq.com/audio/

Link to comment

I watched a video in youtube, it shows how to put bods, but I don't have ''mta folder''/mods/recourses/deathmatch/vehicle-mods-system folder, can someone post that folder with files in zip. file so I can have your coppy and put car mods, If you have that folder your self?

If you don't know where to look for folder, look at the video Intructions.

Link to comment

If you got MTA installed you should have it.

My path: D:\Program Files (x86)\MTA San Andreas\mods\deathmatch\resources

I don't have it, I tryed to reinstall this version, tryed installing newer version of MTA, but I only got a bug in my map editor checkpoint program.

The only folder in there is ''votemanager''

Link to comment

You dont get it, you cant have MTA without system files...

Go to the shortcut on your desktop, right click on it, and choose: "show file location" or something like that. It should pop up the folder you're looking for (or nearby).

Edit: I'm not so sure anymore what the problem is..

Edited by Mathematic
Link to comment
  • 1 month later...

Working on Awesome Coaster 2...

When adding upgrades="0" to my .map, the MTA map editor will NOT load it. It'll just say at the bottom that it's loading (blue background for the text), and MTA will freeze. Even after removing that little bit of code, it'll still do that until I completely clear out the upgrades="0" thing. The original wheels look kinda nice on the vehicle that will be in the map, so I'm not too worried about it, as everything works without upgrades="0".

Link to comment
  • 8 months later...

You need the following .lua in your map folder.

(paste it in notepad --> safe as --> catagory: all files (not .txt) --> name it music.lua)

function startMusic()
setRadioChannel(0)
song = playSound("files/music.mp3",true)
outputChatBox("Toggle music on/off using M")
end

function makeRadioStayOff()
setRadioChannel(0)
cancelEvent()
end

function toggleSong()
if not songOff then
setSoundVolume(song,0)
songOff = true
removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff)
else
setSoundVolume(song,1)
songOff = false
setRadioChannel(0)
addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff)
end
end

addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic)
addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff)
addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff)
addCommandHandler("mkmap1_racetheme",toggleSong)
bindKey("m","down","mkmap1_racetheme")

Then add the /files foder with the music.mp3 and edit the meta.xml and your done

Edited by hulpje
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...