Coder Social home page Coder Social logo

sh3ldar / addoncarsounds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alberttheprince/addoncarsounds

1.0 0.0 0.0 7.41 MB

An example resource for streaming addon car sounds (and addon native audio if you know what you're doing) for FiveM

Lua 100.00%

addoncarsounds's Introduction

AddonCarSounds

Want to add add-on car sounds in a single resource? Tired of having dozens of unorganized folders/resources for your add-on car sounds? You can use this example resource as a starting point for organizing your engine sounds (and other native audio) into a single resource.

For this, I used:

https://www.gta5-mods.com/vehicles/annis-roxanne-add-on-tuning-sounds-liveries

https://www.gta5-mods.com/vehicles/maibatsu-sunrise-r-add-on-tuning-liveries-sounds

As an example of how to set this up.

Please match the file structure as it is in the folder.

When adding new car add-on sounds, look to the original named data_file listings:

data_file 'AUDIO_GAMEDATA' 'audioconfig/roxanne_game.dat'
data_file 'AUDIO_SOUNDDATA' 'audioconfig/roxanne_sounds.dat'
data_file 'AUDIO_WAVEPACK' 'sfx/dlc_roxanne'

These need to match the file names themselves, so don't use the name of the car, use the name of the audio files as you downloaded them.

How to add them to your fxmanifest.lua

Copy the format already present in the fxmanifest.lua. For example for a made-up car addon audio called the issipissi with files named the same:

data_file 'AUDIO_GAMEDATA' 'audioconfig/issipissi_game.dat'
data_file 'AUDIO_SOUNDDATA' 'audioconfig/issipissi_sounds.dat'
data_file 'AUDIO_WAVEPACK' 'sfx/dlc_issipissi'

So your fxmanifest.lua should look like this:

fx_version 'cerulean'
game 'gta5'

author 'PrinceAlbert'
description 'Custom Car Audio'

files {
    '**/**/*.dat151.rel',
    '**/**/*.dat54.rel',
    '**/**/*.awc',
}

data_file 'AUDIO_GAMEDATA' 'audioconfig/roxanne_game.dat'
data_file 'AUDIO_SOUNDDATA' 'audioconfig/roxanne_sounds.dat'
data_file 'AUDIO_WAVEPACK' 'sfx/dlc_roxanne'
data_file 'AUDIO_GAMEDATA' 'audioconfig/sunrise_game.dat'
data_file 'AUDIO_SOUNDDATA' 'audioconfig/sunrise_sounds.dat'
data_file 'AUDIO_WAVEPACK' 'sfx/dlc_sunrise'
data_file 'AUDIO_GAMEDATA' 'audioconfig/issipissi_game.dat'
data_file 'AUDIO_SOUNDDATA' 'audioconfig/issipissi_sounds.dat'
data_file 'AUDIO_WAVEPACK' 'sfx/dlc_issipissi'

As far as I can tell you cannot glob the data_files for audio. Do not change the format of the files, use it exactly how I've put them and the same naming conventions.

How do add audio to your add-on cars

Open the vehicles.meta of the car you want

Find the audioNameHash line and add the filename as it is written in the original file name (match if lower or uppercase):

      <audioNameHash>roxanne</audioNameHash>

Make sure this is ensured before your Add-on Car resource in the server.cfg

for example

ensure AddonCarSounds
ensure AddonCars

Credits

  • Popcorn Roleplay players for putting up with my random testing of audio. Come join our server and try it out today!
  • Thank you dexvo for clarifying/testing globbing in the fxmanifest.lua with regards to the data_file format.

addoncarsounds's People

Contributors

alberttheprince avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.