BerkieBb / pma-sirensync

The best siren sync resource to utilise in FiveM
MIT License
58 stars 21 forks source link

Question #2

Closed DogsGoBark closed 2 years ago

DogsGoBark commented 2 years ago

Does it support the use of wm server sirens?

RequestScriptAudioBank("DLC_WMSIRENS\\SIRENPACK_ONE", false)
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_ALPHA", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_BRAVO", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_CHARLIE", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
BerkieBb commented 2 years ago

Yes it does, the sound that you want can be replaced on a vehicle from the config, but that does require you to build the resource again

DogsGoBark commented 2 years ago

So I assume something like this?

export const HornOverride: Map<number, string> = new Map<number, string>()
    .set(GetHashKey("police3"), "DLC_WMSIRENS\\SIRENPACK_ONE");

export const PrimarySirenOverride: Map<number, string | string[]> = new Map<number, string | string[]>()
    .set(GetHashKey("police3"), ["SIREN_ALPHA", "SIREN_BRAVO", "SIREN_CHARLIE"]);

export const Debug: boolean = false;
BerkieBb commented 2 years ago

The primary sound override is good, but the horn override is for the horn of the vehicle, not an audio bank

DogsGoBark commented 2 years ago

The primary sound override is good, but the horn override is for the horn of the vehicle, not an audio bank

How will it know to use that DLC?

BerkieBb commented 2 years ago

I guess you'd have to request it seperatelt then, bht I'll take a look tomorrow on adding something for that

BerkieBb commented 2 years ago

Added in https://github.com/BerkieBb/pma-sirensync/commit/296a1838705ffb996968a473fffaedb3a7dcc29a

BerkieBb commented 2 years ago

https://github.com/BerkieBb/pma-sirensync/commit/8d8bf1e5871085e64939cba3319a62cb1aea0795 as a followup as I forgot some things