Guest User

Untitled

a guest
Jun 11th, 2016
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.05 KB | None | 0 0
  1.  
  2. const char IMG[] = "sosi";
  3.  
  4. const char EACTION_FINDPATH[] = "EActionFindPath";
  5.  
  6. const char DUMMY_HASSIREN[] = "DUMMYHasSiren";
  7. const char DUMMY_UPDATEPOS[] = "DUMMYUpdatePos";
  8. const char DUMMY_FINDPATH[] = "DUMMYFindPath";
  9.  
  10. const char CMD_MOVETO[] = "MoveTo";
  11.  
  12. const char NAME_DUMMYOBJECT[] = "HelpingObjekt_Roger";
  13.  
  14. // POMPIER FEU
  15.  
  16. const char PROTO_POMPIER1[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccf1.e4p" count[] = "3" />
  17. const char PROTO_POMPIER2[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccf2.e4p" count[] = "3" />
  18. const char PROTO_POMPIER3[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccf3.e4p" count[] = "3" />
  19. const char PROTO_POMPIER4[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccl.e4p" count[] = "3" />
  20. const char PROTO_POMPIER5[] = "mod:Prototypes/Vehicles/01 POMPIERS/cfm.e4p" count[] = "3" />
  21. const char PROTO_POMPIER6[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccgc.e4p" count[] = "3" />
  22. const char PROTO_POMPIER7[] = "mod:Prototypes/Vehicles/01 POMPIERS/ccr.e4p" count[] = "3" />
  23. const char PROTO_POMPIER8[] = "mod:Prototypes/Vehicles/01 POMPIERS/CDHR.e4p" count[] = "3" />
  24. const char PROTO_POMPIER9[] = "mod:Prototypes/Vehicles/01 POMPIERS/emod1.e4p" count[] = "3" />
  25. const char PROTO_POMPIER10[] = "mod:Prototypes/Vehicles/01 POMPIERS/emod2.e4p" count[] = "3" />
  26. const char PROTO_POMPIER11[] = "mod:Prototypes/Vehicles/01 POMPIERS/epa1.e4p" count[] = "3" />
  27. const char PROTO_POMPIER12[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt1.e4p" count[] = "3" />
  28. const char PROTO_POMPIER13[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt2.e4p" count[] = "3" />
  29. const char PROTO_POMPIER14[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt3.e4p" count[] = "3" />
  30. const char PROTO_POMPIER15[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt4.e4p" count[] = "3" />
  31. const char PROTO_POMPIER16[] = "mod:Prototypes/Vehicles/01 POMPIERS/fpt5.e4p" count[] = "3" />
  32. const char PROTO_POMPIER17[] = "mod:Prototypes/Vehicles/01 POMPIERS/fptl1.e4p" count[] = "3" />
  33. const char PROTO_POMPIER18[] = "mod:Prototypes/Vehicles/01 POMPIERS/fptl2.e4p" count[] = "3" />
  34. const char PROTO_POMPIER19[] = "mod:Prototypes/Vehicles/01 POMPIERS/fptl3.e4p" count[] = "3" />
  35. const char PROTO_POMPIER20[] = "mod:Prototypes/Vehicles/01 POMPIERS/fsd.e4p" count[] = "3" />
  36. const char PROTO_POMPIER21[] = "mod:Prototypes/Vehicles/01 POMPIERS/FSR4.e4p" count[] = "3" />
  37. const char PROTO_POMPIER22[] = "mod:Prototypes/Vehicles/01 POMPIERS/FSR2.e4p" count[] = "3" />
  38. const char PROTO_POMPIER23[] = "mod:Prototypes/Vehicles/01 POMPIERS/fsr3.e4p" count[] = "3" />
  39. const char PROTO_POMPIER25[] = "mod:Prototypes/Vehicles/01 POMPIERS/VBS.e4p" count[] = "3" />
  40. const char PROTO_POMPIER30[] = "mod:Prototypes/Vehicles/01 POMPIERS/vlhr1.e4p" count[] = "3" />
  41. const char PROTO_POMPIER31[] = "mod:Prototypes/Vehicles/01 POMPIERS/vpl.e4p" count[] = "3" />
  42. const char PROTO_POMPIER41[] = "mod:Prototypes/Vehicles/01 POMPIERS/VSEC1.e4p" count[] = "3" />
  43. const char PROTO_POMPIER42[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsec2.e4p" count[] = "3" />
  44. const char PROTO_POMPIER43[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsm1.e4p" count[] = "3" />
  45. const char PROTO_POMPIER44[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsr1.e4p" count[] = "3" />
  46. const char PROTO_POMPIER45[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsr2.e4p" count[] = "3" />
  47. const char PROTO_POMPIER46[] = "mod:Prototypes/Vehicles/01 POMPIERS/vtu1.e4p" count[] = "3" />
  48. const char PROTO_POMPIER47[] = "mod:Prototypes/Vehicles/01 POMPIERS/vtu2.e4p" count[] = "3" />
  49.  
  50. // POMPIERS SANTE
  51.  
  52. const char PROTO_POMPIER32[] = "mod:Prototypes/Vehicles/01 POMPIERS/vpma.e4p" count[] = "3" />
  53. const char PROTO_POMPIER33[] = "mod:Prototypes/Vehicles/01 POMPIERS/vraad.e4p" count[] = "3" />
  54. const char PROTO_POMPIER34[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav1.e4p" count[] = "3" />
  55. const char PROTO_POMPIER35[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav2.e4p" count[] = "3" />
  56. const char PROTO_POMPIER36[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav3.e4p" count[] = "3" />
  57. const char PROTO_POMPIER37[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav4.e4p" count[] = "3" />
  58. const char PROTO_POMPIER38[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav5.e4p" count[] = "3" />
  59. const char PROTO_POMPIER39[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav6.e4p" count[] = "3" />
  60. const char PROTO_POMPIER40[] = "mod:Prototypes/Vehicles/01 POMPIERS/vsav7.e4p" count[] = "3" />
  61. const char PROTO_POMPIER24[] = "mod:Prototypes/Vehicles/01 POMPIERS/ps4.e4p" count[] = "3" />
  62. const char PROTO_POMPIER26[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl1.e4p" count[] = "3" />
  63. const char PROTO_POMPIER27[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl2.e4p" count[] = "3" />
  64. const char PROTO_POMPIER28[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl3.e4p" count[] = "3" />
  65. const char PROTO_POMPIER29[] = "mod:Prototypes/Vehicles/01 POMPIERS/vl4.e4p" count[] = "3" />
  66.  
  67. // SAMU
  68.  
  69. const char PROTO_SAMU1[] = "mod:Prototypes/Vehicles/Ambulance/PF_FOURGON1.e4p" count[] = "3" />
  70. const char PROTO_SAMU2[] = "mod:Prototypes/Vehicles/02 SAMU/4x4samu1.e4p" count[] = "3" />
  71. const char PROTO_SAMU3[] = "mod:Prototypes/Vehicles/02 SAMU/c8samu.e4p" count[] = "3" />
  72. const char PROTO_SAMU4[] = "mod:Prototypes/Vehicles/02 SAMU/cmaxsamu1.e4p" count[] = "3" />
  73. const char PROTO_SAMU5[] = "mod:Prototypes/Vehicles/02 SAMU/cmaxsamu2e4p" count[] = "3" />
  74. const char PROTO_SAMU6[] = "mod:Prototypes/Vehicles/02 SAMU/cmaxsamu3.e4p" count[] = "3" />
  75. const char PROTO_SAMU7[] = "mod:Prototypes/Vehicles/02 SAMU/ducatosamu1.e4p" count[] = "3" />
  76. const char PROTO_SAMU8[] = "mod:Prototypes/Vehicles/02 SAMU/ducatosamu2.e4p" count[] = "3" />
  77. const char PROTO_SAMU9[] = "mod:Prototypes/Vehicles/02 SAMU/mastersamu1.e4p" count[] = "3" />
  78. const char PROTO_SAMU10[] = "mod:Prototypes/Vehicles/02 SAMU/mastersamu2.e4p" count[] = "3" />
  79. const char PROTO_SAMU11[] = "mod:Prototypes/Vehicles/02 SAMU/mastersamu3.e4p" count[] = "3" />
  80. const char PROTO_SAMU12[] = "mod:Prototypes/Vehicles/02 SAMU/smaxsamu1.e4p" count[] = "3" />
  81.  
  82. // POLICE GENDARMERIE
  83.  
  84. const char PROTO_POLICE1[] = "mod:Prototypes/Vehicles/01 POLICE/bac1.e4p" count[] = "5" />
  85. const char PROTO_POLICE2[] = "mod:Prototypes/Vehicles/01 POLICE/bac2.e4p" count[] = "5" />
  86. const char PROTO_POLICE4[] = "mod:Prototypes/Vehicles/01 POLICE/bac3.e4p" count[] = "5" />
  87. const char PROTO_POLICE5[] = "mod:Prototypes/Vehicles/01 POLICE/berlingo.e4p" count[] = "5" />
  88. const char PROTO_POLICE6[] = "mod:Prototypes/Vehicles/01 POLICE/c4gn1.e4p" count[] = "5" />
  89. const char PROTO_POLICE7[] = "mod:Prototypes/Vehicles/01 POLICE/c4gn2.e4p" count[] = "5" />
  90. const char PROTO_POLICE8[] = "mod:Prototypes/Vehicles/01 POLICE/c4gn3.e4p" count[] = "5" />
  91. const char PROTO_POLICE9[] = "mod:Prototypes/Vehicles/01 POLICE/c5muni.e4p" count[] = "5" />
  92. const char PROTO_POLICE10[] = "mod:Prototypes/Vehicles/01 POLICE/c8gend.e4p" count[] = "5" />
  93. const char PROTO_POLICE11[] = "mod:Prototypes/Vehicles/01 POLICE/CANONCRS.e4p" count[] = "5" />
  94. const char PROTO_POLICE12[] = "mod:Prototypes/Vehicles/01 POLICE/defendergn.e4p" count[] = "5" />
  95. const char PROTO_POLICE13[] = "mod:Prototypes/Vehicles/01 POLICE/defendervigi.e4p" count[] = "5" />
  96. const char PROTO_POLICE14[] = "mod:Prototypes/Vehicles/01 POLICE/deminage.e4p" count[] = "5" />
  97. const char PROTO_POLICE15[] = "mod:Prototypes/Vehicles/01 POLICE/estategendarmerie.e4p" count[] = "5" />
  98. const char PROTO_POLICE16[] = "mod:Prototypes/Vehicles/01 POLICE/estatepn.e4p" count[] = "5" />
  99. const char PROTO_POLICE17[] = "mod:Prototypes/Vehicles/01 POLICE/expertgn1.e4p" count[] = "5" />
  100. const char PROTO_POLICE18[] = "mod:Prototypes/Vehicles/01 POLICE/expertgn2.e4p" count[] = "5" />
  101. const char PROTO_POLICE19[] = "mod:Prototypes/Vehicles/01 POLICE/expertgn3.e4p" count[] = "5" />
  102. const char PROTO_POLICE20[] = "mod:Prototypes/Vehicles/01 POLICE/expertpn.e4p" count[] = "5" />
  103. const char PROTO_POLICE21[] = "mod:Prototypes/Vehicles/01 POLICE/expertmuni.e4p" count[] = "5" />
  104. const char PROTO_POLICE22[] = "mod:Prototypes/Vehicles/01 POLICE/focusgn1.e4p" count[] = "5" />
  105. const char PROTO_POLICE23[] = "mod:Prototypes/Vehicles/01 POLICE/focusgn2.e4p" count[] = "5" />
  106. const char PROTO_POLICE24[] = "mod:Prototypes/Vehicles/01 POLICE/gm1.e4p" count[] = "5" />
  107. const char PROTO_POLICE25[] = "mod:Prototypes/Vehicles/01 POLICE/kangoo.e4p" count[] = "5" />
  108. const char PROTO_POLICE26[] = "mod:Prototypes/Vehicles/01 POLICE/kangoo1.e4p" count[] = "5" />
  109. const char PROTO_POLICE27[] = "mod:Prototypes/Vehicles/01 POLICE/kangoo2.e4p" count[] = "5" />
  110. const char PROTO_POLICE28[] = "mod:Prototypes/Vehicles/01 POLICE/kangooPM.e4p" count[] = "5" />
  111. const char PROTO_POLICE29[] = "mod:Prototypes/Vehicles/01 POLICE/Master_CRS.e4p" count[] = "5" />
  112. const char PROTO_POLICE30[] = "mod:Prototypes/Vehicles/01 POLICE/Master_PNfourgon.e4p" count[] = "5" />
  113. const char PROTO_POLICE31[] = "mod:Prototypes/Vehicles/01 POLICE/master_policebalisage.e4p" count[] = "5" />
  114. const char PROTO_POLICE32[] = "mod:Prototypes/Vehicles/01 POLICE/MeganeRS.e4p" count[] = "5" />
  115. const char PROTO_POLICE33[] = "mod:Prototypes/Vehicles/01 POLICE/peugeot308.e4p" count[] = "5" />
  116. const char PROTO_POLICE34[] = "mod:Prototypes/Vehicles/01 POLICE/Subaru.e4p" count[] = "5" />
  117. const char PROTO_POLICE35[] = "mod:Prototypes/Vehicles/01 POLICE/TepeePolm.e4p" count[] = "5" />
  118. const char PROTO_POLICE36[] = "mod:Prototypes/Vehicles/01 POLICE/trafic.e4p" count[] = "5" />
  119. const char PROTO_POLICE37[] = "mod:Prototypes/Vehicles/01 POLICE/traficpn1.e4p" count[] = "5" />
  120. const char PROTO_POLICE38[] = "mod:Prototypes/Vehicles/01 POLICE/traficpnhd.e4p" count[] = "5" />
  121. const char PROTO_POLICE39[] = "mod:Prototypes/Vehicles/01 POLICE/TRANSIT_crs.e4p" count[] = "5" />
  122. const char PROTO_POLICE40[] = "mod:Prototypes/Vehicles/01 POLICE/transit-pn.e4p" count[] = "5" />
  123. const char PROTO_POLICE41[] = "mod:Prototypes/Vehicles/01 POLICE/VP_Scenic.e4p" count[] = "5" />
  124.  
  125. // SERVICES TECHNIQUES
  126.  
  127. const char PROTO_EDF[] = "mod:Prototypes/Vehicles/TEC/erdf.e4p";
  128. const char PROTO_VP8[] = "mod:Prototypes/Vehicles/TEC/VP8.e4p";
  129. const char PROTO_SAN[] = "mod:Prototypes/Vehicles/TEC/Sanef01.e4p";
  130.  
  131.  
  132. int DummyGroup = 20;
  133.  
  134. // 01.0
  135. object VCmdSiren : CommandScript
  136. {
  137. VCmdSiren()
  138. {
  139. SetIcon(IMG);
  140. SetCursor(IMG);
  141. SetRestrictions(RESTRICT_SELFEXECUTE);
  142. }
  143.  
  144. bool CheckPossible(GameObject *Caller)
  145. {
  146. if (!Caller->IsValid())
  147. return false;
  148.  
  149. if (Caller->GetType() == ACTOR_VEHICLE)
  150. {
  151. return true;
  152. }
  153.  
  154. return false;
  155. }
  156.  
  157. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  158. {
  159. if (!Target->IsValid() || Target->GetID() != Caller->GetID())
  160. return false;
  161.  
  162. if (!Caller->HasCommand(CMD_MOVETO) || Caller->GetType() != ACTOR_VEHICLE)
  163. return false;
  164.  
  165. return true;
  166. }
  167.  
  168. void PushActions(GameObject *Caller, Actor *Target, int childID)
  169. {
  170. Vehicle v(Caller);
  171. if (Game::IsMultiplayer())
  172. {
  173. int PlayerID = v.GetPlayerMP();
  174. v.SetPlayerMP(PlayerID);
  175. }
  176. if (!v.HasCommand(DUMMY_HASSIREN) && (childID != 2 && childID != 1))
  177. {
  178.  
  179. int soundID;
  180. v.EnableBlueLights(true);
  181. Vector CarPos = v.GetPosition();
  182.  
  183.  
  184. // DEBUT VEHICULES POMPIER
  185.  
  186. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER1) == 0)
  187. {
  188.  
  189. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  190. v.AttachSound(soundID);
  191. }
  192.  
  193. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER2) == 0)
  194. {
  195.  
  196. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  197. v.AttachSound(soundID);
  198. }
  199.  
  200. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER3) == 0)
  201. {
  202.  
  203. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  204. v.AttachSound(soundID);
  205. }
  206.  
  207. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER4) == 0)
  208. {
  209.  
  210. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  211. v.AttachSound(soundID);
  212. }
  213.  
  214. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER5) == 0)
  215. {
  216.  
  217. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  218. v.AttachSound(soundID);
  219. }
  220.  
  221. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER6) == 0)
  222. {
  223.  
  224. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  225. v.AttachSound(soundID);
  226. }
  227.  
  228. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER7) == 0)
  229. {
  230.  
  231. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  232. v.AttachSound(soundID);
  233. }
  234.  
  235. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER8) == 0)
  236. {
  237.  
  238. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  239. v.AttachSound(soundID);
  240. }
  241.  
  242. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER9) == 0)
  243. {
  244.  
  245. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  246. v.AttachSound(soundID);
  247. }
  248.  
  249. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER10) == 0)
  250. {
  251.  
  252. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  253. v.AttachSound(soundID);
  254. }
  255.  
  256. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER11) == 0)
  257. {
  258.  
  259. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  260. v.AttachSound(soundID);
  261. }
  262.  
  263. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER12) == 0)
  264. {
  265.  
  266. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  267. v.AttachSound(soundID);
  268. }
  269.  
  270. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER13) == 0)
  271. {
  272.  
  273. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  274. v.AttachSound(soundID);
  275. }
  276.  
  277. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER14) == 0)
  278. {
  279.  
  280. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  281. v.AttachSound(soundID);
  282. }
  283.  
  284. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER15) == 0)
  285. {
  286.  
  287. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  288. v.AttachSound(soundID);
  289. }
  290.  
  291. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER16) == 0)
  292. {
  293.  
  294. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  295. v.AttachSound(soundID);
  296. }
  297.  
  298. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER17) == 0)
  299. {
  300.  
  301. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  302. v.AttachSound(soundID);
  303. }
  304.  
  305. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER18) == 0)
  306. {
  307.  
  308. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  309. v.AttachSound(soundID);
  310. }
  311.  
  312. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER19) == 0)
  313. {
  314.  
  315. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  316. v.AttachSound(soundID);
  317. }
  318.  
  319. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER20) == 0)
  320. {
  321.  
  322. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  323. v.AttachSound(soundID);
  324. }
  325.  
  326. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER21) == 0)
  327. {
  328.  
  329. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  330. v.AttachSound(soundID);
  331. }
  332.  
  333. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER22) == 0)
  334. {
  335.  
  336. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  337. v.AttachSound(soundID);
  338. }
  339.  
  340. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER23) == 0)
  341. {
  342.  
  343. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  344. v.AttachSound(soundID);
  345. }
  346.  
  347. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER24) == 0)
  348. {
  349.  
  350. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  351. v.AttachSound(soundID);
  352. }
  353.  
  354. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER25) == 0)
  355. {
  356.  
  357. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  358. v.AttachSound(soundID);
  359. }
  360.  
  361. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER26) == 0)
  362. {
  363.  
  364. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  365. v.AttachSound(soundID);
  366. }
  367.  
  368. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER27) == 0)
  369. {
  370.  
  371. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  372. v.AttachSound(soundID);
  373. }
  374.  
  375. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER28) == 0)
  376. {
  377.  
  378. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  379. v.AttachSound(soundID);
  380. }
  381.  
  382. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER29) == 0)
  383. {
  384.  
  385. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  386. v.AttachSound(soundID);
  387. }
  388.  
  389. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIE30) == 0)
  390. {
  391.  
  392. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  393. v.AttachSound(soundID);
  394. }
  395.  
  396. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER31) == 0)
  397. {
  398.  
  399. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  400. v.AttachSound(soundID);
  401. }
  402.  
  403. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER32) == 0)
  404. {
  405.  
  406. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  407. v.AttachSound(soundID);
  408. }
  409.  
  410. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER33) == 0)
  411. {
  412.  
  413. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  414. v.AttachSound(soundID);
  415. }
  416.  
  417. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER34) == 0)
  418. {
  419.  
  420. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  421. v.AttachSound(soundID);
  422. }
  423.  
  424. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER35) == 0)
  425. {
  426.  
  427. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  428. v.AttachSound(soundID);
  429. }
  430.  
  431. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER36) == 0)
  432. {
  433.  
  434. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  435. v.AttachSound(soundID);
  436. }
  437.  
  438. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER37) == 0)
  439. {
  440.  
  441. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  442. v.AttachSound(soundID);
  443. }
  444.  
  445. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER38) == 0)
  446. {
  447.  
  448. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  449. v.AttachSound(soundID);
  450. }
  451.  
  452. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER39) == 0)
  453. {
  454.  
  455. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  456. v.AttachSound(soundID);
  457. }
  458.  
  459. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER40) == 0)
  460. {
  461.  
  462. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  463. v.AttachSound(soundID);
  464. }
  465.  
  466. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER41) == 0)
  467. {
  468.  
  469. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  470. v.AttachSound(soundID);
  471. }
  472.  
  473. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER42) == 0)
  474. {
  475.  
  476. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  477. v.AttachSound(soundID);
  478. }
  479.  
  480. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER43) == 0)
  481. {
  482.  
  483. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  484. v.AttachSound(soundID);
  485. }
  486.  
  487. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER44) == 0)
  488. {
  489.  
  490. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  491. v.AttachSound(soundID);
  492. }
  493.  
  494. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER45) == 0)
  495. {
  496.  
  497. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  498. v.AttachSound(soundID);
  499. }
  500.  
  501. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER46) == 0)
  502. {
  503.  
  504. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  505. v.AttachSound(soundID);
  506. }
  507.  
  508. if (StrCompare(v.GetPrototypeFileName(), PROTO_POMPIER47) == 0)
  509. {
  510.  
  511. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/pompiers.wav", CarPos, true);
  512. v.AttachSound(soundID);
  513. }
  514.  
  515. // FIN VEHICULES POMPIERS
  516.  
  517.  
  518.  
  519.  
  520. // DEBUT VEHICULES SAMU
  521.  
  522.  
  523. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU1) == 0)
  524. {
  525.  
  526. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  527. v.AttachSound(soundID);
  528. }
  529.  
  530. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU2) == 0)
  531. {
  532.  
  533. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  534. v.AttachSound(soundID);
  535. }
  536.  
  537. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU3) == 0)
  538. {
  539.  
  540. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  541. v.AttachSound(soundID);
  542. }
  543.  
  544. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU7) == 0)
  545. {
  546.  
  547. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  548. v.AttachSound(soundID);
  549. }
  550.  
  551. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU5) == 0)
  552. {
  553.  
  554. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  555. v.AttachSound(soundID);
  556. }
  557.  
  558. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU6) == 0)
  559. {
  560.  
  561. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  562. v.AttachSound(soundID);
  563. }
  564.  
  565. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU7) == 0)
  566. {
  567.  
  568. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  569. v.AttachSound(soundID);
  570. }
  571.  
  572. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU8) == 0)
  573. {
  574.  
  575. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  576. v.AttachSound(soundID);
  577. }
  578.  
  579. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU9) == 0)
  580. {
  581.  
  582. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  583. v.AttachSound(soundID);
  584. }
  585.  
  586. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU10) == 0)
  587. {
  588.  
  589. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  590. v.AttachSound(soundID);
  591. }
  592.  
  593. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU11) == 0)
  594. {
  595.  
  596. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  597. v.AttachSound(soundID);
  598. }
  599.  
  600. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAMU12) == 0)
  601. {
  602.  
  603. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/samu.wav", CarPos, true);
  604. v.AttachSound(soundID);
  605. }
  606.  
  607. // FIN VEHICULES SAMU
  608.  
  609.  
  610. // DEBUT VEHICULES POLICE GENDARMERIE
  611.  
  612. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE1) == 0)
  613. {
  614.  
  615. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  616. v.AttachSound(soundID);
  617. }
  618.  
  619. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE2) == 0)
  620. {
  621.  
  622. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  623. v.AttachSound(soundID);
  624. }
  625.  
  626. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE3) == 0)
  627. {
  628.  
  629. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  630. v.AttachSound(soundID);
  631. }
  632.  
  633. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE4) == 0)
  634. {
  635.  
  636. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  637. v.AttachSound(soundID);
  638. }
  639.  
  640. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE9) == 0)
  641. {
  642.  
  643. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  644. v.AttachSound(soundID);
  645. }
  646.  
  647. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE11) == 0)
  648. {
  649.  
  650. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  651. v.AttachSound(soundID);
  652. }
  653.  
  654. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE14) == 0)
  655. {
  656.  
  657. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  658. v.AttachSound(soundID);
  659. }
  660.  
  661. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE16) == 0)
  662. {
  663.  
  664. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  665. v.AttachSound(soundID);
  666. }
  667.  
  668. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE20) == 0)
  669. {
  670.  
  671. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  672. v.AttachSound(soundID);
  673. }
  674.  
  675. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE21) == 0)
  676. {
  677.  
  678. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  679. v.AttachSound(soundID);
  680. }
  681.  
  682. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE25) == 0)
  683. {
  684.  
  685. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  686. v.AttachSound(soundID);
  687. }
  688.  
  689. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE28) == 0)
  690. {
  691.  
  692. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  693. v.AttachSound(soundID);
  694. }
  695.  
  696. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE29) == 0)
  697. {
  698.  
  699. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  700. v.AttachSound(soundID);
  701. }
  702.  
  703. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE30) == 0)
  704. {
  705.  
  706. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  707. v.AttachSound(soundID);
  708. }
  709.  
  710. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE31) == 0)
  711. {
  712.  
  713. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  714. v.AttachSound(soundID);
  715. }
  716.  
  717. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE33) == 0)
  718. {
  719.  
  720. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  721. v.AttachSound(soundID);
  722. }
  723.  
  724. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE35) == 0)
  725. {
  726.  
  727. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  728. v.AttachSound(soundID);
  729. }
  730.  
  731. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE37) == 0)
  732. {
  733.  
  734. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  735. v.AttachSound(soundID);
  736. }
  737.  
  738. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE38) == 0)
  739. {
  740.  
  741. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  742. v.AttachSound(soundID);
  743. }
  744.  
  745. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE39) == 0)
  746. {
  747.  
  748. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  749. v.AttachSound(soundID);
  750. }
  751.  
  752. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE40) == 0)
  753. {
  754.  
  755. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  756. v.AttachSound(soundID);
  757. }
  758.  
  759. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE41) == 0)
  760. {
  761.  
  762. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/police.wav", CarPos, true);
  763. v.AttachSound(soundID);
  764. }
  765.  
  766. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE6) == 0)
  767. {
  768.  
  769. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  770. v.AttachSound(soundID);
  771. }
  772.  
  773. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE7) == 0)
  774. {
  775.  
  776. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  777. v.AttachSound(soundID);
  778. }
  779.  
  780. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE8) == 0)
  781. {
  782.  
  783. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  784. v.AttachSound(soundID);
  785. }
  786.  
  787. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE10) == 0)
  788. {
  789.  
  790. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  791. v.AttachSound(soundID);
  792. }
  793.  
  794. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE12) == 0)
  795. {
  796.  
  797. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  798. v.AttachSound(soundID);
  799. }
  800.  
  801. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE13) == 0)
  802. {
  803.  
  804. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  805. v.AttachSound(soundID);
  806. }
  807.  
  808. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE15) == 0)
  809. {
  810.  
  811. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  812. v.AttachSound(soundID);
  813. }
  814.  
  815. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE17) == 0)
  816. {
  817.  
  818. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  819. v.AttachSound(soundID);
  820. }
  821.  
  822. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE18) == 0)
  823. {
  824.  
  825. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  826. v.AttachSound(soundID);
  827. }
  828.  
  829. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE19) == 0)
  830. {
  831.  
  832. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  833. v.AttachSound(soundID);
  834. }
  835.  
  836. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE22) == 0)
  837. {
  838.  
  839. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  840. v.AttachSound(soundID);
  841. }
  842.  
  843. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE23) == 0)
  844. {
  845.  
  846. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  847. v.AttachSound(soundID);
  848. }
  849.  
  850. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE24) == 0)
  851. {
  852.  
  853. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  854. v.AttachSound(soundID);
  855. }
  856.  
  857. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE26) == 0)
  858. {
  859.  
  860. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  861. v.AttachSound(soundID);
  862. }
  863.  
  864. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE27) == 0)
  865. {
  866.  
  867. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  868. v.AttachSound(soundID);
  869. }
  870.  
  871. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE32) == 0)
  872. {
  873.  
  874. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  875. v.AttachSound(soundID);
  876. }
  877.  
  878. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE34) == 0)
  879. {
  880.  
  881. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  882. v.AttachSound(soundID);
  883. }
  884.  
  885. if (StrCompare(v.GetPrototypeFileName(), PROTO_POLICE36) == 0)
  886. {
  887.  
  888. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/gendarmerie.wav", CarPos, true);
  889. v.AttachSound(soundID);
  890. }
  891.  
  892. // FIN VEHICULES POLICE
  893.  
  894. // DEBUT VEHICULES SERVICES TECHNIQUES
  895.  
  896. //Vehicules de TEC - debut
  897.  
  898. if (StrCompare(v.GetPrototypeFileName(), PROTO_EDF) == 0)
  899. {
  900.  
  901. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/asa.wav", CarPos, true);
  902. v.AttachSound(soundID);
  903. }
  904.  
  905.  
  906. if (StrCompare(v.GetPrototypeFileName(), PROTO_VP8) == 0)
  907. {
  908.  
  909. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/asa.wav", CarPos, true);
  910. v.AttachSound(soundID);
  911. }
  912.  
  913.  
  914. if (StrCompare(v.GetPrototypeFileName(), PROTO_SAN) == 0)
  915. {
  916.  
  917. soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/asa.wav", CarPos, true);
  918. v.AttachSound(soundID);
  919. }
  920.  
  921.  
  922. //FIN VEHICULES SERVICES TECHNIQUES
  923.  
  924.  
  925. GameObject mDummy = Game::CreateObject("mod:Prototypes/Objects/Misc/empty.e4p", NAME_DUMMYOBJECT);
  926.  
  927. if (Game::IsMultiplayer())
  928. {
  929. int PlayerID = mDummy.GetPlayerMP();
  930. mDummy.SetPlayerMP(PlayerID);
  931. }
  932. mDummy.Hide();
  933. mDummy.SetPosition(CarPos);
  934. mDummy.SetUserData(soundID);
  935. mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, &v, soundID, false);
  936. v.SetUserData(soundID);
  937. v.AssignCommand(DUMMY_HASSIREN);
  938.  
  939. return;
  940. }
  941.  
  942. if (v.HasCommand(DUMMY_HASSIREN))
  943. {
  944. if (childID == 1)
  945. {
  946. v.EnableBlueLights(false);
  947. }
  948.  
  949. if (v.HasCommand(DUMMY_HASSIREN))
  950. {
  951. int ref = Caller->GetUserData();
  952. Audio::StopSample(ref);
  953.  
  954. GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT);
  955. for(int i=0; i<list.GetNumObjects(); i++)
  956. {
  957. GameObject *obj = list.GetObject(i);
  958. if (obj->GetUserData() == ref)
  959. {
  960. int mSirTest = i;
  961. }
  962. }
  963.  
  964. GameObject *obj = list.GetObject(mSirTest);
  965. obj->PushActionDeleteOwner(ACTION_NEWLIST);
  966. v.RemoveCommand(DUMMY_HASSIREN);
  967. }
  968.  
  969. return;
  970. }
  971. }
  972. };
  973.  
  974. // 01.1
  975. object DUMMYUpdatePos : CommandScript
  976. {
  977. DUMMYUpdatePos()
  978. {
  979. SetGroupID(DummyGroup);
  980. }
  981.  
  982. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  983. {
  984. }
  985.  
  986. void PushActions(GameObject *Caller, Actor *Target, int childID)
  987. {
  988. Vehicle v(Target);
  989. if (Game::IsMultiplayer())
  990. {
  991. int PlayerID = v.GetPlayerMP();
  992. v.SetPlayerMP(PlayerID);
  993. }
  994. GameObject mDummy(Caller);
  995. if (Game::IsMultiplayer())
  996. {
  997. int PlayerID = mDummy.GetPlayerMP();
  998. mDummy.SetPlayerMP(PlayerID);
  999. }
  1000. Vector CarPos = v.GetPosition();
  1001.  
  1002. if (v.IsDestroyed() || !v.IsValid())
  1003. {
  1004. int ref = mDummy.GetUserData();
  1005. Audio::StopSample(ref);
  1006.  
  1007. mDummy.PushActionDeleteOwner(ACTION_NEWLIST);
  1008. } else
  1009. {
  1010. mDummy.SetPosition(CarPos);
  1011. Audio::UpdatePos(childID, CarPos, true);
  1012. if (v.IsCurrentAction(EACTION_FINDPATH))
  1013. {
  1014. if (!v.HasCommand(DUMMY_FINDPATH))
  1015. {
  1016. v.AssignCommand(DUMMY_FINDPATH);
  1017. }
  1018. }
  1019. mDummy.PushActionExecuteCommand(ACTION_NEWLIST, DUMMY_UPDATEPOS, Target, childID, false);
  1020. }
  1021.  
  1022. if (v.HasCommand(DUMMY_FINDPATH))
  1023. {
  1024. if (!v.IsCurrentAction(EACTION_FINDPATH) && v.GetNumActions() == 0)
  1025. {
  1026. v.RemoveCommand(DUMMY_HASSIREN);
  1027. v.RemoveCommand(DUMMY_FINDPATH);
  1028.  
  1029. int ref = Caller->GetUserData();
  1030. Audio::StopSample(ref);
  1031.  
  1032. GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT);
  1033. for(int i = 0; i < list.GetNumObjects(); i++)
  1034. {
  1035. GameObject *obj = list.GetObject(i);
  1036. if (obj->GetUserData() == ref)
  1037. {
  1038. int mSirTest = i;
  1039.  
  1040. GameObject *obj = list.GetObject(mSirTest);
  1041. obj->PushActionDeleteOwner(ACTION_NEWLIST);
  1042. v.RemoveCommand(DUMMY_HASSIREN);
  1043. if (v.HasCommand(DUMMY_FINDPATH))
  1044. {
  1045. v.RemoveCommand(DUMMY_FINDPATH);
  1046. }
  1047. }
  1048. }
  1049. }
  1050. }
  1051. }
  1052. };
  1053.  
  1054. // 01.2
  1055. object DUMMYDisableSiren : CommandScript
  1056. {
  1057. DUMMYDisableSiren()
  1058. {
  1059. SetGroupID(DummyGroup);
  1060. }
  1061.  
  1062. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  1063. {
  1064. }
  1065.  
  1066. void PushActions(GameObject *Caller, Actor *Target, int childID)
  1067. {
  1068. Vehicle v(Caller);
  1069.  
  1070. if (childID == 1)
  1071. {
  1072. v.EnableBlueLights(false);
  1073. }
  1074.  
  1075. int ref = Caller->GetUserData();
  1076. Audio::StopSample(ref);
  1077.  
  1078. GameObjectList list = Game::GetGameObjects(NAME_DUMMYOBJECT);
  1079. for(int i = 0; i < list.GetNumObjects(); i++)
  1080. {
  1081. GameObject *obj = list.GetObject(i);
  1082. if (obj->GetUserData() == ref)
  1083. {
  1084. int mSirTest = i;
  1085.  
  1086. GameObject *obj = list.GetObject(mSirTest);
  1087. obj->PushActionDeleteOwner(ACTION_NEWLIST);
  1088. v.RemoveCommand(DUMMY_HASSIREN);
  1089. if (v.HasCommand(DUMMY_FINDPATH))
  1090. {
  1091. v.RemoveCommand(DUMMY_FINDPATH);
  1092. }
  1093. }
  1094. }
  1095. }
  1096. };
  1097.  
  1098. // 01.3
  1099. object DUMMYFindPath : CommandScript
  1100. {
  1101. DUMMYFindPath()
  1102. {
  1103. SetGroupID(DummyGroup);
  1104. }
  1105.  
  1106. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  1107. {
  1108. return false;
  1109. }
  1110.  
  1111. void PushActions(GameObject *Caller, Actor *Target, int childID)
  1112. {
  1113. }
  1114. };
  1115.  
  1116. // 01.4
  1117. object DUMMYHasSiren : CommandScript
  1118. {
  1119. DUMMYHasSiren()
  1120. {
  1121. SetGroupID(DummyGroup);
  1122. }
  1123.  
  1124. bool CheckGroupVisibility(GameObject *Caller)
  1125. {
  1126. return false;
  1127. }
  1128.  
  1129. bool CheckPossible(GameObject *Caller)
  1130. {
  1131. return false;
  1132. }
  1133.  
  1134.  
  1135. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  1136. {
  1137. return false;
  1138. }
  1139.  
  1140. void PushActions(GameObject *Caller, Actor *Target, int childID)
  1141. {
  1142. }
  1143. };
Advertisement
Add Comment
Please, Sign In to add comment