
Air horn script
#21
Guest_francismori7_*
Gepost 10 juli 2008 - 05:35
#22
Guest_lord_bonev_*
Gepost 10 juli 2008 - 09:38
#23
Guest_Caddi17_*
Gepost 10 juli 2008 - 02:33
#24
Guest_francismori7_*
#25
Guest_Caddi17_*
#26
Guest_francismori7_*
#27
Guest_Caddi17_*
#28
Guest_firefighter116_*
Gepost 10 juli 2008 - 05:17
#29
Guest_Caddi17_*
#30
Gepost 10 juli 2008 - 05:30
Wanna play multiplayer without any of the commitment? Emergency Planet hosts casual multiplayer to all its members! Contact me for more information
Executive Director: EMP Gulag
Do you have a warning that you want to go away, or are you facing another punishment you don't want? Contact me for the NEW alternative!
#31
Guest_Caddi17_*
Gepost 10 juli 2008 - 05:41
#32
Guest_francismori7_*
Gepost 10 juli 2008 - 06:21
Caddi17, on Jul 10 2008, 10:58 AM, said:
airhorn.wav: Emergency 4\Mods\Los Angeles Mod v1.5\Audio\Fx\sirensOk, ill take yours then, where do i put it?
Create a new file in "Emergency 4\Mods\Los Angeles Mod v1.5\Scripts\Game\Command" named "LAHorn.script". Put this code in it:
int DummyGroup = 22; object VcmdHorn : CommandScript { VcmdHorn() { SetIcon("sirens"); SetCursor("sirens"); SetRestrictions(RESTRICT_SELFEXECUTE); SetPossibleCallers(ACTOR_VEHICLE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Target->IsValid() || Target->GetID() != Caller->GetID()) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vehicle v(Caller); int hornsoundID; Vector CarPos = v.GetPosition(); hornsoundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/airhorn.wav", CarPos, false); //Audio::StopSample(hornsoundID); } }; object DummyHasSiren : CommandScript { DummyHasSiren() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { } };
Add the command to all the cars you want it to in the editor. The command is "VcmdHorn".
PS: Everything is fixed and works perfectly.
Airhorn.wav uploaded:
#33
Guest_Caddi17_*
Gepost 10 juli 2008 - 06:50

#35
Guest_Caddi17_*
Gepost 11 juli 2008 - 02:25
EDIT: never mind i got it working
#36
Gepost 11 juli 2008 - 05:07

object VcmdHorn : CommandScript { VcmdHorn() { SetIcon("sirens"); SetCursor("sirens"); SetRestrictions(RESTRICT_SELFEXECUTE); SetPossibleCallers(ACTOR_VEHICLE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; return true; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Target->IsValid() || Target->GetID() != Caller->GetID()) return false; return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Audio::PlaySample3D("mod:Audio/FX/Sirens/airhorn.wav", Caller->GetPosition(), false); } };
#37
Guest_francismori7_*
Gepost 11 juli 2008 - 05:30
#38
Gepost 11 juli 2008 - 06:11
Signature removed. Please use a smaller image.
#39
Guest_francismori7_*
#40
Gepost 11 juli 2008 - 08:04
francismori7, on Jul 11 2008, 06:30 PM, said:
Hoppah, you should include this in 1.7 because LA uses many times the air horn.
No, it's not usefull. I would prefer a whole menu where you can between sirens (yelp, horn, wail etc..), but that's only possible in missionscripts.