
Air horn script
#81
Posted 16 August 2008 - 06:12 PM
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!
#82
Posted 16 August 2008 - 06:15 PM
you fill the car with whatever you like, then you click rapid deploy, the first 4 in the vehicle, get hoses, once I had a whole team of paramedics put out a fire... of course, two got to close and burnt to a crisp :lol:
Oooo, I'm so trying that out in the next MP game...
Dedicated EMS player for online
#83
Posted 12 June 2009 - 09:12 PM
How do you create a new file?airhorn.wav: Emergency 4\Mods\Los Angeles Mod v1.5\Audio\Fx\sirens
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:


If you love playling as police, fire, or ems come join http://ertrpg.forumotion.ca/forum.htm the online text roleplaying game.
#84
Posted 12 June 2009 - 09:29 PM

"A model is only as good as it's skin"
#85
Posted 12 June 2009 - 09:36 PM


If you love playling as police, fire, or ems come join http://ertrpg.forumotion.ca/forum.htm the online text roleplaying game.
#86
Posted 12 June 2009 - 09:58 PM
I was wondering what the script was for Nyxos Q-Siren? Thanks!
#87
Posted 12 June 2009 - 11:15 PM


If you love playling as police, fire, or ems come join http://ertrpg.forumotion.ca/forum.htm the online text roleplaying game.
#88
Posted 12 June 2009 - 11:29 PM

"A model is only as good as it's skin"
#89
Posted 12 June 2009 - 11:39 PM
got it thanks


If you love playling as police, fire, or ems come join http://ertrpg.forumotion.ca/forum.htm the online text roleplaying game.
#90
Guest_NPD-Traffic_*
Posted 13 June 2009 - 12:56 AM

#91
Posted 13 June 2009 - 05:16 AM
Right click in windows, got to new, choose any file, i usually go with txt file, and rename it something.script and leave the txt part out. Then open it with whatever you use to edit script. I prefer a freeware app called notepad2.How do you create a new file?
I would look at the autosiren script(that may not be the exact name but you get the idea) and change out the variables to point to your airhorn rather then the siren.Very nice i was wondering is thee a way it the sound i chose for airhorn can repeat it self non stop until i shut it off. im going for dual tones
i got a manaual electric sirens i wanted to add a EQ2b wail or Q siren for this new commando but it does stop automatically can anyone give me a pointer on how to.
Not sure I explained that very well, but do you get the idea?
Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.
Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE
If you appreciate my work, then please donate. Every little bit helps!
#92
Guest_NPD-Traffic_*
Posted 13 June 2009 - 12:59 PM
Right click in windows, got to new, choose any file, i usually go with txt file, and rename it something.script and leave the txt part out. Then open it with whatever you use to edit script. I prefer a freeware app called notepad2.
I would look at the autosiren script(that may not be the exact name but you get the idea) and change out the variables to point to your airhorn rather then the siren.
Not sure I explained that very well, but do you get the idea?
So something like this
int DummyGroup = 22;
object VcmdHorn _linenums:0'>[left]int DummyGroup = 22;object VcmdHorn : CommandScript{ VcmdHorn() { SetIcon("Dual"); SetCursor("Dual"); 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; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Caller->RemoveCommand(CMD_Dual_ON); Caller->AssignCommand(CMD_Dual_OFF); }};object Vcmddualoff : CommandScript{ Vcmddualoff() { SetIcon("Dual"); SetCursor("Dual"); SetGroupID(DummyGroup); SetGroupLeader(true); SetRestrictions(RESTRICT_SELFEXECUTE); } bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return false; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if (!Caller->IsValid() || !Target->IsValid() || Target->GetID() != Caller->GetID()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { return true; } return true; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Caller->RemoveCommand(CMD_dual_OFF); Caller->AssignCommand(CMD_dual_ON); }};object DummyHasSiren : CommandScript{ DummyHasSiren() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { }};
Im thinking im wrong but this is what i got when i mixed parts togeather:
I suck at scripting

#94
Posted 14 June 2009 - 10:30 AM
Please DO NOT PM ME for help. Ask your questions on the forum to help others with the same issue.
Enhance your LA Mod Freeplay Experience with LA Mod 2.0 4x4 Submod.
Los Angeles Mod v2.0 4x4 W00ds Map v1 - BETA RELEASE
If you appreciate my work, then please donate. Every little bit helps!
#95
Posted 14 June 2009 - 11:33 AM
Nice dispatch pearl. Any chance you could clear it up a bit? The voice is kind of toned out, or did you mean for that?
Thanks!
my voice is just that mono tone.... i'll give it another try though.... any requests? lol i can get some LA tones and just add my own dispatch....
requests are welcome
#96
Guest_xxGTAPRO4LIFExx_*
Posted 04 October 2009 - 10:03 PM
airhorn.wav: Emergency 4\Mods\Los Angeles Mod v1.5\Audio\Fx\sirens
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:
Ok Ive gone to the editor and added the script, but how do I save it?
#97
Posted 04 October 2009 - 10:13 PM
And xxGTAPRO4LIFExx you cannot save it as ur em4 folder has the settings of Read only! u need to change tht by right clicking on Emergency4 folder click properties and then uncheck read only and click apply, tht u should solve ur problem, hope it helps!
#98
Guest_xxGTAPRO4LIFExx_*
Posted 05 October 2009 - 12:29 AM
could someone re upload the sounds for download as i cant download any of the files for the sounds already in this post!
And xxGTAPRO4LIFExx you cannot save it as ur em4 folder has the settings of Read only! u need to change tht by right clicking on Emergency4 folder click properties and then uncheck read only and click apply, tht u should solve ur problem, hope it helps!
It didnt work, I dont think Im installing it right. Can someone send me their game files with it already installed?
could someone re upload the sounds for download as i cant download any of the files for the sounds already in this post!
And xxGTAPRO4LIFExx you cannot save it as ur em4 folder has the settings of Read only! u need to change tht by right clicking on Emergency4 folder click properties and then uncheck read only and click apply, tht u should solve ur problem, hope it helps!
Right Click and Save Target As
#99
Guest_[SAP]Francis_*
#100
Posted 05 October 2009 - 11:17 AM