Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const char IMG[] = "sosi";
- const char EACTION_FINDPATH[] = "EActionFindPath";
- const char DUMMY_HASSIREN[] = "DUMMYHasSiren";
- const char DUMMY_UPDATEPOS[] = "DUMMYUpdatePos";
- const char DUMMY_FINDPATH[] = "DUMMYFindPath";
- const char CMD_MOVETO[] = "MoveTo";
- const char NAME_DUMMYOBJECT[] = "HelpingObjekt_Roger";
- // POMPIER FEU
- const char PROTO_POMPIER1[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccf1.e4p" count[] = "3" />
- const char PROTO_POMPIER2[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccf2.e4p" count[] = "3" />
- const char PROTO_POMPIER3[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccf3.e4p" count[] = "3" />
- const char PROTO_POMPIER4[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccl.e4p" count[] = "3" />
- const char PROTO_POMPIER5[] = "mod:Prototypes/Vehicles/01 POMPIERS/cfm.e4p" count[] = "3" />
- const char PROTO_POMPIER6[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccgc.e4p" count[] = "3" />
- const char PROTO_POMPIER7[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccr.e4p" count[] = "3" />
- const char PROTO_POMPIER8[] = "mod:Prototypes/Vehicles/01 POMPIERS/CDHR.e4p" count[] = "3" />
- const char PROTO_POMPIER9[] = "mod:Prototypes/Vehicles/01 POMPIERS/emod1.e4p" count[] = "3" />
- const char PROTO_POMPIER10[] = "mod:Prototypes/Vehicles/01 POMPIERS/emod2.e4p" count[] = "3" />
- const char PROTO_POMPIER11[] = "mod:Prototypes/Vehicles/01 POMPIERS/epa1.e4p" count[] = "3" />
- const char PROTO_POMPIER12[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt1.e4p" count[] = "3" />
- const char PROTO_POMPIER13[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt2.e4p" count[] = "3" />
- const char PROTO_POMPIER14[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt3.e4p" count[] = "3" />
- const char PROTO_POMPIER15[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt4.e4p" count[] = "3" />
- const char PROTO_POMPIER16[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt5.e4p" count[] = "3" />
- const char PROTO_POMPIER17[] = "mod:Prototypes/Vehicles/01 POMPIERS/fptl1.e4p" count[] = "3" />
- const char PROTO_POMPIER18[] = "mod:Prototypes/Vehicles/01 POMPIERS/fptl2.e4p" count[] = "3" />
- const char PROTO_POMPIER19[] = "mod:Prototypes/Vehicles/01 POMPIERS/fptl3.e4p" count[] = "3" />
- const char PROTO_POMPIER20[] = "mod:Prototypes/Vehicles/01 POMPIERS/fsd.e4p" count[] = "3" />
- const char PROTO_POMPIER21[] = "mod:Prototypes/Vehicles/01 POMPIERS/FSR4.e4p" count[] = "3" />
- const char PROTO_POMPIER22[] = "mod:Prototypes/Vehicles/01 POMPIERS/FSR2.e4p" count[] = "3" />
- const char PROTO_POMPIER23[] = "mod:Prototypes/Vehicles/01 POMPIERS/fsr3.e4p" count[] = "3" />
- const char PROTO_POMPIER25[] = "mod:Prototypes/Vehicles/01 POMPIERS/VBS.e4p" count[] = "3" />
- const char PROTO_POMPIER30[] = "mod:Prototypes/Vehicles/01 POMPIERS/vlhr1.e4p" count[] = "3" />
- const char PROTO_POMPIER31[] = "mod:Prototypes/Vehicles/01 POMPIERS/vpl.e4p" count[] = "3" />
- const char PROTO_POMPIER41[] = "mod:Prototypes/Vehicles/01 POMPIERS/VSEC1.e4p" count[] = "3" />
- const char PROTO_POMPIER42[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsec2.e4p" count[] = "3" />
- const char PROTO_POMPIER43[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsm1.e4p" count[] = "3" />
- const char PROTO_POMPIER44[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsr1.e4p" count[] = "3" />
- const char PROTO_POMPIER45[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsr2.e4p" count[] = "3" />
- const char PROTO_POMPIER46[] = "mod:Prototypes/Vehicles/01 POMPIERS/vtu1.e4p" count[] = "3" />
- const char PROTO_POMPIER47[] = "mod:Prototypes/Vehicles/01 POMPIERS/vtu2.e4p" count[] = "3" />
- // POMPIERS SANTE
- const char PROTO_POMPIER32[] = "mod:Prototypes/Vehicles/01 POMPIERS/vpma.e4p" count[] = "3" />
- const char PROTO_POMPIER33[] = "mod:Prototypes/Vehicles/01 POMPIERS/vraad.e4p" count[] = "3" />
- const char PROTO_POMPIER34[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav1.e4p" count[] = "3" />
- const char PROTO_POMPIER35[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav2.e4p" count[] = "3" />
- const char PROTO_POMPIER36[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav3.e4p" count[] = "3" />
- const char PROTO_POMPIER37[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav4.e4p" count[] = "3" />
- const char PROTO_POMPIER38[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav5.e4p" count[] = "3" />
- const char PROTO_POMPIER39[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav6.e4p" count[] = "3" />
- const char PROTO_POMPIER40[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav7.e4p" count[] = "3" />
- const char PROTO_POMPIER24[] = "mod:Prototypes/Vehicles/01 POMPIERS/ps4.e4p" count[] = "3" />
- const char PROTO_POMPIER26[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl1.e4p" count[] = "3" />
- const char PROTO_POMPIER27[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl2.e4p" count[] = "3" />
- const char PROTO_POMPIER28[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl3.e4p" count[] = "3" />
- const char PROTO_POMPIER29[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl4.e4p" count[] = "3" />
- // SAMU
- const char PROTO_SAMU1[] = "mod:Prototypes/Vehicles/Ambulance/PF_FOURGON1.e4p" count[] = "3" />
- const char PROTO_SAMU2[] = "mod:Prototypes/Vehicles/02 SAMU/4x4samu1.e4p" count[] = "3" />
- const char PROTO_SAMU3[] = "mod:Prototypes/Vehicles/02 SAMU/c8samu.e4p" count[] = "3" />
- const char PROTO_SAMU4[] = "mod:Prototypes/Vehicles/02 SAMU/cmaxsamu1.e4p" count[] = "3" />
- const char PROTO_SAMU5[] = "mod:Prototypes/Vehicles/02 SAMU/cmaxsamu2e4p" count[] = "3" />
- const char PROTO_SAMU6[] = "mod:Prototypes/Vehicles/02 SAMU/cmaxsamu3.e4p" count[] = "3" />
- const char PROTO_SAMU7[] = "mod:Prototypes/Vehicles/02 SAMU/ducatosamu1.e4p" count[] = "3" />
- const char PROTO_SAMU8[] = "mod:Prototypes/Vehicles/02 SAMU/ducatosamu2.e4p" count[] = "3" />
- const char PROTO_SAMU9[] = "mod:Prototypes/Vehicles/02 SAMU/mastersamu1.e4p" count[] = "3" />
- const char PROTO_SAMU10[] = "mod:Prototypes/Vehicles/02 SAMU/mastersamu2.e4p" count[] = "3" />
- const char PROTO_SAMU11[] = "mod:Prototypes/Vehicles/02 SAMU/mastersamu3.e4p" count[] = "3" />
- const char PROTO_SAMU12[] = "mod:Prototypes/Vehicles/02 SAMU/smaxsamu1.e4p" count[] = "3" />
- // POLICE GENDARMERIE
- const char PROTO_POLICE1[] = "mod:Prototypes/Vehicles/01 POLICE/bac1.e4p" count[] = "5" />
- const char PROTO_POLICE2[] = "mod:Prototypes/Vehicles/01 POLICE/bac2.e4p" count[] = "5" />
- const char PROTO_POLICE4[] = "mod:Prototypes/Vehicles/01 POLICE/bac3.e4p" count[] = "5" />
- const char PROTO_POLICE5[] = "mod:Prototypes/Vehicles/01 POLICE/berlingo.e4p" count[] = "5" />
- const char PROTO_POLICE6[] = "mod:Prototypes/Vehicles/01 POLICE/c4gn1.e4p" count[] = "5" />
- const char PROTO_POLICE7[] = "mod:Prototypes/Vehicles/01 POLICE/c4gn2.e4p" count[] = "5" />
- const char PROTO_POLICE8[] = "mod:Prototypes/Vehicles/01 POLICE/c4gn3.e4p" count[] = "5" />
- const char PROTO_POLICE9[] = "mod:Prototypes/Vehicles/01 POLICE/c5muni.e4p" count[] = "5" />
- const char PROTO_POLICE10[] = "mod:Prototypes/Vehicles/01 POLICE/c8gend.e4p" count[] = "5" />
- const char PROTO_POLICE11[] = "mod:Prototypes/Vehicles/01 POLICE/CANONCRS.e4p" count[] = "5" />
- const char PROTO_POLICE12[] = "mod:Prototypes/Vehicles/01 POLICE/defendergn.e4p" count[] = "5" />
- const char PROTO_POLICE13[] = "mod:Prototypes/Vehicles/01 POLICE/defendervigi.e4p" count[] = "5" />
- const char PROTO_POLICE14[] = "mod:Prototypes/Vehicles/01 POLICE/deminage.e4p" count[] = "5" />
- const char PROTO_POLICE15[] = "mod:Prototypes/Vehicles/01 POLICE/estategendarmerie.e4p" count[] = "5" />
- const char PROTO_POLICE16[] = "mod:Prototypes/Vehicles/01 POLICE/estatepn.e4p" count[] = "5" />
- const char PROTO_POLICE17[] = "mod:Prototypes/Vehicles/01 POLICE/expertgn1.e4p" count[] = "5" />
- const char PROTO_POLICE18[] = "mod:Prototypes/Vehicles/01 POLICE/expertgn2.e4p" count[] = "5" />
- const char PROTO_POLICE19[] = "mod:Prototypes/Vehicles/01 POLICE/expertgn3.e4p" count[] = "5" />
- const char PROTO_POLICE20[] = "mod:Prototypes/Vehicles/01 POLICE/expertpn.e4p" count[] = "5" />
- const char PROTO_POLICE21[] = "mod:Prototypes/Vehicles/01 POLICE/expertmuni.e4p" count[] = "5" />
- const char PROTO_POLICE22[] = "mod:Prototypes/Vehicles/01 POLICE/focusgn1.e4p" count[] = "5" />
- const char PROTO_POLICE23[] = "mod:Prototypes/Vehicles/01 POLICE/focusgn2.e4p" count[] = "5" />
- const char PROTO_POLICE24[] = "mod:Prototypes/Vehicles/01 POLICE/gm1.e4p" count[] = "5" />
- const char PROTO_POLICE25[] = "mod:Prototypes/Vehicles/01 POLICE/kangoo.e4p" count[] = "5" />
- const char PROTO_POLICE26[] = "mod:Prototypes/Vehicles/01 POLICE/kangoo1.e4p" count[] = "5" />
- const char PROTO_POLICE27[] = "mod:Prototypes/Vehicles/01 POLICE/kangoo2.e4p" count[] = "5" />
- const char PROTO_POLICE28[] = "mod:Prototypes/Vehicles/01 POLICE/kangooPM.e4p" count[] = "5" />
- const char PROTO_POLICE29[] = "mod:Prototypes/Vehicles/01 POLICE/Master_CRS.e4p" count[] = "5" />
- const char PROTO_POLICE30[] = "mod:Prototypes/Vehicles/01 POLICE/Master_PNfourgon.e4p" count[] = "5" />
- const char PROTO_POLICE31[] = "mod:Prototypes/Vehicles/01 POLICE/master_policebalisage.e4p" count[] = "5" />
- const char PROTO_POLICE32[] = "mod:Prototypes/Vehicles/01 POLICE/MeganeRS.e4p" count[] = "5" />
- const char PROTO_POLICE33[] = "mod:Prototypes/Vehicles/01 POLICE/peugeot308.e4p" count[] = "5" />
- const char PROTO_POLICE34[] = "mod:Prototypes/Vehicles/01 POLICE/Subaru.e4p" count[] = "5" />
- const char PROTO_POLICE35[] = "mod:Prototypes/Vehicles/01 POLICE/TepeePolm.e4p" count[] = "5" />
- const char PROTO_POLICE36[] = "mod:Prototypes/Vehicles/01 POLICE/trafic.e4p" count[] = "5" />
- const char PROTO_POLICE37[] = "mod:Prototypes/Vehicles/01 POLICE/traficpn1.e4p" count[] = "5" />
- const char PROTO_POLICE38[] = "mod:Prototypes/Vehicles/01 POLICE/traficpnhd.e4p" count[] = "5" />
- const char PROTO_POLICE39[] = "mod:Prototypes/Vehicles/01 POLICE/TRANSIT_crs.e4p" count[] = "5" />
- const char PROTO_POLICE40[] = "mod:Prototypes/Vehicles/01 POLICE/transit-pn.e4p" count[] = "5" />
- const char PROTO_POLICE41[] = "mod:Prototypes/Vehicles/01 POLICE/VP_Scenic.e4p" count[] = "5" />
- // SERVICES TECHNIQUES
- const char PROTO_EDF[] = "mod:Prototypes/Vehicles/TEC/erdf.e4p";
- const char PROTO_VP8[] = "mod:Prototypes/Vehicles/TEC/VP8.e4p";
- const char PROTO_SAN[] = "mod:Prototypes/Vehicles/TEC/Sanef01.e4p";
- int DummyGroup = 20;
- // 01.0
- object VCmdSiren : CommandScript
- {
- VCmdSiren()
- {
- SetIcon(IMG);
- SetCursor(IMG);
- 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 (!Target->IsValid() || Target->GetID() != Caller->GetID())
- return false;
- if (!Caller->HasCommand(CMD_MOVETO) || Caller->GetType() != ACTOR_VEHICLE)
- return false;
- return true;
- }
- void PushActions(GameObject *Caller, Actor *Target, int childID)
- {
- Vehicle v(Caller);
- if (Game::IsMultiplayer())
- {
- int PlayerID = v.GetPlayerMP();
- v.SetPlayerMP(PlayerID);
- }
- if (!v.HasCommand(DUMMY_HASSIREN) && (childID != 2 && childID != 1))
- {
- int soundID;
- v.EnableBlueLights(true);
- Vector CarPos = v.GetPosition();
- // DEBUT VEHICULES POMPIER
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER1) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER2) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER3) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER4) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER5) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER6) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER7) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER8) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER9) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER10) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER11) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER12) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER13) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER14) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER15) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER16) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER17) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER18) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER19) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER20) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER21) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER22) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER23) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER24) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER25) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER26) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER27) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER28) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER29) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIE30) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER31) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER32) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER33) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER34) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER35) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER36) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER37) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER38) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER39) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER40) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER41) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER42) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER43) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER44) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER45) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER46) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER47) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- // FIN VEHICULES POMPIERS
- // DEBUT VEHICULES SAMU
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU1) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU2) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU3) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU7) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU5) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU6) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU7) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU8) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU9) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU10) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU11) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU12) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- // FIN VEHICULES SAMU
- // DEBUT VEHICULES POLICE GENDARMERIE
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE1) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE2) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE3) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE4) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE9) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE11) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE14) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE16) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE20) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE21) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE25) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE28) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE29) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE30) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE31) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE33) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE35) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE37) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE38) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE39) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE40) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE41) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE6) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE7) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE8) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE10) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE12) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE13) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE15) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE17) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE18) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE19) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE22) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE23) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE24) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE26) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE27) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE32) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE34) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE36) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- // FIN VEHICULES POLICE
- // DEBUT VEHICULES SERVICES TECHNIQUES
- //Vehicules de TEC - debut
- if (StrCompare(v.GetPrototypeFileName(), PROTO_EDF) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/asa.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_VP8) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/asa.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- if (StrCompare(v.GetPrototypeFileName(), PROTO_SAN) == 0)
- {
- soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/asa.wav", CarPos, true);
- v.AttachSound(soundID);
- }
- //FIN VEHICULES SERVICES TECHNIQUES
- GameObject mDummy = Game::CreateObject("mod:Prototypes/Objects/Misc/empty.e4p", NAME_DUMMYOBJECT);
- if (Game::IsMultiplayer())
- {
- int PlayerID = mDummy.GetPlayerMP();
- mDummy.SetPlayerMP(PlayerID);
- }
- mDummy.Hide();
- mDummy.SetPosition(CarPos);
- mDummy.SetUserData(soundID);
- mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, &v, soundID, false);
- v.SetUserData(soundID);
- v.AssignCommand(DUMMY_HASSIREN);
- return;
- }
- if (v.HasCommand(DUMMY_HASSIREN))
- {
- if (childID == 1)
- {
- v.EnableBlueLights(false);
- }
- if (v.HasCommand(DUMMY_HASSIREN))
- {
- int ref = Caller->GetUserData();
- Audio::StopSample(ref);
- GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT);
- for(int i=0; i<list.GetNumObjects(); i++)
- {
- GameObject *obj = list.GetObject(i);
- if (obj->GetUserData() == ref)
- {
- int mSirTest = i;
- }
- }
- GameObject *obj = list.GetObject(mSirTest);
- obj->PushActionDeleteOwner(ACTION_NEWLIST);
- v.RemoveCommand(DUMMY_HASSIREN);
- }
- return;
- }
- }
- };
- // 01.1
- object DUMMYUpdatePos : CommandScript
- {
- DUMMYUpdatePos()
- {
- SetGroupID(DummyGroup);
- }
- bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
- {
- }
- void PushActions(GameObject *Caller, Actor *Target, int childID)
- {
- Vehicle v(Target);
- if (Game::IsMultiplayer())
- {
- int PlayerID = v.GetPlayerMP();
- v.SetPlayerMP(PlayerID);
- }
- GameObject mDummy(Caller);
- if (Game::IsMultiplayer())
- {
- int PlayerID = mDummy.GetPlayerMP();
- mDummy.SetPlayerMP(PlayerID);
- }
- Vector CarPos = v.GetPosition();
- if (v.IsDestroyed() || !v.IsValid())
- {
- int ref = mDummy.GetUserData();
- Audio::StopSample(ref);
- mDummy.PushActionDeleteOwner(ACTION_NEWLIST);
- } else
- {
- mDummy.SetPosition(CarPos);
- Audio::UpdatePos(childID, CarPos, true);
- if (v.IsCurrentAction(EACTION_FINDPATH))
- {
- if (!v.HasCommand(DUMMY_FINDPATH))
- {
- v.AssignCommand(DUMMY_FINDPATH);
- }
- }
- mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, Target, childID, false);
- }
- if (v.HasCommand(DUMMY_FINDPATH))
- {
- if (!v.IsCurrentAction(EACTION_FINDPATH) && v.GetNumActions() == 0)
- {
- v.RemoveCommand(DUMMY_HASSIREN);
- v.RemoveCommand(DUMMY_FINDPATH);
- int ref = Caller->GetUserData();
- Audio::StopSample(ref);
- GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT);
- for(int i = 0; i < list.GetNumObjects(); i++)
- {
- GameObject *obj = list.GetObject(i);
- if (obj->GetUserData() == ref)
- {
- int mSirTest = i;
- GameObject *obj = list.GetObject(mSirTest);
- obj->PushActionDeleteOwner(ACTION_NEWLIST);
- v.RemoveCommand(DUMMY_HASSIREN);
- if (v.HasCommand(DUMMY_FINDPATH))
- {
- v.RemoveCommand(DUMMY_FINDPATH);
- }
- }
- }
- }
- }
- }
- };
- // 01.2
- object DUMMYDisableSiren : CommandScript
- {
- DUMMYDisableSiren()
- {
- SetGroupID(DummyGroup);
- }
- bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
- {
- }
- void PushActions(GameObject *Caller, Actor *Target, int childID)
- {
- Vehicle v(Caller);
- if (childID == 1)
- {
- v.EnableBlueLights(false);
- }
- int ref = Caller->GetUserData();
- Audio::StopSample(ref);
- GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT);
- for(int i = 0; i < list.GetNumObjects(); i++)
- {
- GameObject *obj = list.GetObject(i);
- if (obj->GetUserData() == ref)
- {
- int mSirTest = i;
- GameObject *obj = list.GetObject(mSirTest);
- obj->PushActionDeleteOwner(ACTION_NEWLIST);
- v.RemoveCommand(DUMMY_HASSIREN);
- if (v.HasCommand(DUMMY_FINDPATH))
- {
- v.RemoveCommand(DUMMY_FINDPATH);
- }
- }
- }
- }
- };
- // 01.3
- object DUMMYFindPath : CommandScript
- {
- DUMMYFindPath()
- {
- SetGroupID(DummyGroup);
- }
- bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
- {
- return false;
- }
- void PushActions(GameObject *Caller, Actor *Target, int childID)
- {
- }
- };
- // 01.4
- object DUMMYHasSiren : CommandScript
- {
- DUMMYHasSiren()
- {
- SetGroupID(DummyGroup);
- }
- bool CheckGroupVisibility(GameObject *Caller)
- {
- return false;
- }
- bool CheckPossible(GameObject *Caller)
- {
- return false;
- }
- bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
- {
- return false;
- }
- void PushActions(GameObject *Caller, Actor *Target, int childID)
- {
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment