Skip to content
This repository was archived by the owner on Dec 25, 2022. It is now read-only.

Commit cef938f

Browse files
committed
Can use soundset in horn sounds now
1 parent 9200722 commit cef938f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Client/Effect/HornEffect.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,18 @@ public bool Expired
2626
public Task Init()
2727
{
2828
_sound = API.GetSoundId();
29+
string sound = Vehicles.GetAircraftHorn(_vehicle);
30+
string soundset = null;
31+
32+
if (sound.Contains(":"))
33+
{
34+
var parts = sound.Split(':');
35+
sound = parts[1];
36+
soundset = parts[0];
37+
}
38+
39+
API.PlaySoundFromEntity(_sound, sound, _vehicle, soundset, false, 0);
2940
API.SetHornEnabled(_vehicle, false);
30-
API.PlaySoundFromEntity(_sound, Vehicles.GetAircraftHorn(_vehicle), _vehicle, null, false, 0);
3141
return Task.FromResult(0);
3242
}
3343

0 commit comments

Comments
 (0)