Custom sounds

You can find sound installation instructions in the Sound Installation section.

To run custom sound, you need add to your resource fxmanifest.lua file:

    shared_scripts {
        '@5s_lib/init.lua'
    }

Client exports

Play local sound for client

    fs.utils.PlayLocalSound(soundDict, soundName, ?soundBank)

    --example

    fs.utils.PlayLocalSound('5s_testsounds', 'test_sound')

Play sound from entity

    fs.utils.PlaySoundFromEntity(soundDict, soundName, entity, networked, ?soundBank)

    --example

    fs.utils.PlaySoundFromEntity('5s_testsounds', 'test_sound', PlayerPedId(), false)

Play sound from coordinates

Server exports

Play local sound for client

Play sound from entity

Play sound from coordinates

Last updated