Documentation

Setup

Install zyke_sounds and get the sounds other resources use.

#Download

Download zyke_sounds.zip from the latest release.

Download the release .zip, not GitHub's green Code → Download ZIP button. The source code is missing the built files the resource needs.

#Dependencies

Install zyke_lib and configure its framework. See Dependencies.

#Resource

Place the resource in your server's resources folder as zyke_sounds. Keep the folder name as it is, since other resources call it by name.

#Configuration

Edit shared/config.lua. Players open their own volume menu with /sounds by default. Use the Config reference for the current defaults.

#Start Order

Start it after zyke_lib and before every resource that plays sounds through it:

cfg
ensure zyke_lib
ensure zyke_sounds

#Verify

Run /sounds in game and play a preview from the menu.

#Sounds From Other Resources

All sounds used by our resources are bundled in zyke_sounds 0.7.5 and newer, in nui/sounds/. Keep zyke_sounds up to date and there is nothing to copy.

Several resources also ship their own sounds in extras/sounds/. You only need those if you run an older zyke_sounds, or one where you removed or replaced the bundled sounds:

  1. Copy the folder from the resource's extras/sounds/ into zyke_sounds/nui/sounds/, keeping its folder name.
  2. Restart zyke_sounds.
ResourceFolder in extras/sounds/Bundled in zyke_sounds as
Bollards (Beta)bollardsbollards/
Catalytic Converterscatalyticcatalytic/
Garagescarkey_beep.wavvehicles/
Laptoplaptoplaptop/
Smokingthe loose filessmoking/ and coughs/
Stabwheelsstabwheelsstabwheels/
Towing (Beta)towingtowing/
Vehicle Keysthe loose .wav filesvehicles/
Vehicle Liftsvehicleliftsvehiclelifts/

Any .mp3, .ogg, or .wav file anywhere under nui/sounds/ is found on start, including in sub-folders. A sound is played by its path without the extension, such as vehicles/vehicle_lock. A file name that is unique in the whole folder also works on its own, such as vehicle_lock.

#Your Own Sounds

Add your own files the same way: put them in a folder under zyke_sounds/nui/sounds/ and restart zyke_sounds. Use a folder of your own, so an update of zyke_sounds does not overwrite your files, and keep a copy of it to put back after a full reinstall. See Exports & Events to play them.