Great work; I can’t code for the life of me, so how would you go about creating that if statement?
Is it possible to go over the 15mb limit with this or no?
Hi,
Thanks for showing an interest in WM-ServerSirens. I am glad you are looking to use the resource and I’d recommend using this snippet of code in lua I just created for this purpose.
local vehicle = GetVehiclePedIsUsing(PlayerPedId())
local model = GetEntityModel(vehicle)
if (model == GetHashKey('police2') then
PlaySoundFromEntity(-1, “SIREN_ALPHA”, veh, “DLC_WMSIRENS_SOUNDSET”, 0, 0)
end
This checks if the vehicle the ped is currently in, is equal to “police2”, if this is the case, it will play “SIREN_ALPHA”. This is adjustable and I would recomend editing it to your needs.
Best wishes,
London Studios & Walshey
Hello Lutton,
if newstate == 1 then
if useFiretruckSiren(veh) then
snd_lxsiren[veh] = GetSoundId()
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_DELTA", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
TogMuteDfltSrnForVeh(veh, true)
else
snd_lxsiren[veh] = GetSoundId()
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_ALPHA", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
TogMuteDfltSrnForVeh(veh, true)
end
elseif newstate == 2 then
if useFiretruckSiren(veh) then
snd_lxsiren[veh] = GetSoundId()
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_ECHO", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
TogMuteDfltSrnForVeh(veh, true)
else
snd_lxsiren[veh] = GetSoundId()
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_BRAVO", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
TogMuteDfltSrnForVeh(veh, true)
end
elseif newstate == 3 then
if useFiretruckSiren(veh) then
snd_lxsiren[veh] = GetSoundId()
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_FOXTROT", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
TogMuteDfltSrnForVeh(veh, true)
else
snd_lxsiren[veh] = GetSoundId()
PlaySoundFromEntity(snd_lxsiren[veh], "SIREN_CHARLIE", veh, "DLC_WMSIRENS_SOUNDSET", 0, 0)
TogMuteDfltSrnForVeh(veh, true)
end
The code above is from luxart however it has been edited to do what you’ve asked for. Let me know if you have any issues.
You would want to add vehicles in eModelWithFireSrn.
Regards,
Walshey.
Once again I am incompetent; where is that?
Edit: Disregard I found it.
I have no sound when I toggle the siren
Hello Nee011,
I’m sorry to hear this.
Have you watched the YouTube video listed above in the post?
That should hopefully assist you.
If you have any further questions please specify and reply.
Thanks,
Walshey.
Hi im using Non Els and I got the main 3 sirens set to you`re awesome script but was wondering what do i change for the secondary siren and bullhorn using luxart for the siren controls
Hey 2 questions
Is it possible to add more sirens? and is it possible to change the distense you can here the sirens ?
Scripts works perfectly in every way and super easy to set up ty
Hello Peter,
I’m glad you like it!
Some point next week I shall be adding an additional 8 tones.
The easiest solution to reduce the distance of how far the siren can be heard from would be to reduce the sound of the .wav file.
Let me know if that’s solved the solution.
Regards,
Walshey.
How hard would it be to add rumbler sirens to this?
Should be in the standard pack already so easy
Watch the video he postet it is simple and a complete guide
cant wait for the extra sirens i found 1 problem/bug. when i fx use the delta as a air horn. and play it the simultaneously with a siren the horn just keeps going? dont think it likes 2 tones at the same time.
But the rest works and syncs as it should
Hello,
You would need to use audacity and change the sound to mono instead of stereo and then re-import them into your OAC folder.
For the MrDaGree ELS how would you go about calling the
PlaySoundFromEntity(-1, “SIREN_CHARLIE”, veh, “DLC_WMSIRENS_SOUNDSET”, 0, 0)
right now im doing it like this
if(xml.root.el[i].kids[ex].name== “MainHorn”) then
a.sounds.mainHorn = {}
if elem.attr[‘InterruptsSiren’] == “true” then a.sounds.mainHorn.interrupt = true else a.sounds.mainHorn.interrupt = false end
a.sounds.mainHorn.audioString = PlaySoundFromEntity(-1, “SIREN_CHARLIE”, veh, “DLC_WMSIRENS_SOUNDSET”, 0, 0)
end
but don’t seem to allow it because of the PlaySoundFromEntity
Hold on… Am I seing things? After 3 years of hereing from multiple developers they were making this… its finally here?
Hello, i have error with this script and LUX.
Error parsing script @lux_vehcontrol/client.lua in resource lux_vehcontrol: @lux_vehcontrol/client.lua:23: unexpected symbol near ‘</226>’
Failed to load script client.lua
That problem stirng
RequestScriptAudioBank(“DLC_WMSIRENS\SIRENPACK_ONE”, false)
You require a double backslash. Hope that helps
No, i have double backslash, fivem forum why is it showing one.
With two backslash not working.