[HOW-TO] [QUICK TUTORIAL] How to use custom sounds?

Introduction


Hello! My name is Serena K. I already made a forum post quite a while ago on a other subject regarding FiveM Servers. That one was specificly was about how to fix your emergency lights & A other one about how you could set-up a FiveM server with Radmin VPN. So if you like my work and my posts please give them a like to get them seen on the forums. I will always try to be as kind as possible and be as clear with my instructions as I can be!


Table of content


So we are going over a few things in this sector. I haven’t seen any tutorials about how to actualy use a CUSTOM sound. Yes you can go over to your hash and change it to be a GTA-V stock vehicle but not really like a file such as a .meta file. Here I will explain how I did it.

:warning: DISCLAIMER:
This method doesn’t seem to ALWAYS work. It could be that one moment you are hearing sound and the other moment you’re not. In general the engine sounds will always work. But if it has for example a siren sound the siren might not work. I as of now have not found a fix for this. In 1 server(My Dev Server) the siren was on but in my main server (even after clearing cache) you wouldn’t be able to hear it.

Setting Up Resource Files

For this to work we would need to set up a basic resource. So I went ahead and got you all settled with files that you would possibly need.

I used this SAHP Pack from the GTA-V Mods website.

__resource.lua

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
 
files {
    'vehicles.meta',
    'carvariations.meta',
    'carcols.meta',
    'handling.meta',
    'vehiclelayouts.meta',
    'FAKEDLC_game.dat151.rel',
    'FAKEDLC_sounds.dat54.rel',
}

data_file 'HANDLING_FILE' 'handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'
data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta'
data_file 'AUDIO_GAMEDATA' 'FAKEDLC_game.dat'
data_file 'AUDIO_SOUNDDATA' 'FAKEDLC_sounds.dat'

So the FAKEDLC part should be changed to the name that is before the breaking _ part.

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
 
files {
    'vehicles.meta',
    'carvariations.meta',
    'carcols.meta',
    'handling.meta',
    'vehiclelayouts.meta',
    'jmsahp_game.dat151.rel',
    'jmsahp_sounds.dat54.rel',
}

data_file 'HANDLING_FILE' 'handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'
data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta'
data_file 'AUDIO_GAMEDATA' 'jmsahp_game.dat'
data_file 'AUDIO_SOUNDDATA' 'jmsahp_sounds.dat'

The jmsahp is the FAKEDLC part. Keep in mind that there is only .rel files being loaded in this tutorial. Which are then .dat files later in the resource.

To my general knowledge .dat151.rel will ALWAYS become AUDIO_GAMEDATA & .dat54.rel will ALWAYS become AUDIO_SOUNDDATA.

Once you have made your __resource.lua file and have set your vehicle stream folder and extracte all meta files we are ready to move on.

Setting Up Sound Files

Setting up the sound files aren’t actually that complicated. This tutorial will only cover the .dat.rel files as I have personally not worked with .awc files before.

When you have your resource folder setup this include all .meta files & the stream folder with all it’s contents (Vehicle .ytf / .ytd) files. You need to go back in OpenIV and head over to the x64/audio/config there should be 2 files there that end in .rel those are the files that you want in the same path as your .meta files. Making that the root of your resource folder if you copied __resource.lua that is above.

That is it using the __resource.lua above you are now setup and should have something that looks like this.

image

As you see the .rel files are in the same path as the .meta files.

Testing It In Game

While in the Server

When you’re in the server and have permissions you can type /refresh and /start resourceName and it should start fine then you can drive around and the vehicles should have audio.

NOTE:
Sirens might still be default GTA

Outside of the server

In your console you can type /refresh and /start resourceName and you can see the resource starting up.

That is all for now.
if you have any errors or crashes at all don’t be afraid to send me a PM on here or on my discord listed below.


Ending


This article was written by Serena K It would be appreciated if you do not take credit to yourself when mentioning this.

Other Tutorials


Fix Emergency Lights
Guide on using RADMIN VPN


1 Like

what if my sound files dont have the .rel how would i go about making one

The only tutorial that has helped me, thank you!

Hello,

Sorry for my lack of response I recently got very very busy trying to properly code my framework.

But my shortest answer is I don’t quite know. I haven’t encountered any addon vehicles which had something else then a .rel file.

Regards,
Izumi Sachako