Advertisement
SRSbladez

Untitled

Jul 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 22.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using LSPD_First_Response.Engine.Scripting;
  7. using LSPD_First_Response.Engine.Scripting.Entities;
  8. using LSPD_First_Response.Mod.Callouts;
  9. using LSPD_First_Response.Mod.API;
  10. using LSPD_First_Response.Engine;
  11. using Rage;
  12. using System.Diagnostics;
  13. using Rage.Attributes;
  14. using Rage.Native;
  15. using DarkmyreAPI;
  16. using System.Windows.Forms;
  17. using RoadIncidentCallouts;
  18. using RoadIncident_Callouts;
  19. using ComputerPlus;
  20. using System.Drawing;
  21. using System.IO;
  22.  
  23. namespace RoadIncident_Callouts.Callouts
  24. {
  25.     [CalloutInfo("Severe Vehicle Crash", CalloutProbability.High)]
  26.     public class SevereVehicleCrash : Callout
  27.     {
  28.         public Blip PedBlip;
  29.         public Blip SuspectBlip;
  30.         public Blip Trooper1Blip;
  31.         public Blip CopBlip;
  32.         public Blip VehicleBlip;
  33.         public Blip AmboBlip;
  34.         public Vehicle AmboVehicle;
  35.         public Vehicle CopVehicle;
  36.         public Vector3 SpawnPoint;
  37.         public Vector3 AmboPos;
  38.         public Ped AmboPed;
  39.         public Vector3 cone1pos;
  40.         public Vector3 cone2pos;
  41.         public Vector3 cone3pos;
  42.         public Vector3 cone4pos;
  43.         public Vector3 cone5pos;
  44.         public Vehicle SuspectVehicle;
  45.         public EConvostate state1;
  46.         private Vector3 CalloutPositionTrooperCar1;
  47.         private Vector3 CalloutPositionTrooperCar2;
  48.         public Vehicle Victimvehicle;
  49.         public Ped Victimped;
  50.         public Ped CopPed;
  51.         public Ped SuspectPed;
  52.         public Ped Trooper1;
  53.         public Vector3 Victim1pos;
  54.         public Vector3 AmboPedPos;
  55.         public Vector3 CopVehicleSpawn;
  56.         public Vector3 Suspectvehiclepos;
  57.         public Vector3 Suspectpos;
  58.         public Vector3 sp;
  59.         public Rage.Object cone1;
  60.         public Rage.Object cone2;
  61.         public Rage.Object cone3;
  62.         public Rage.Object cone4;
  63.         public Rage.Object cone5;
  64.         public Vector3 CopPos;
  65.         public Persona SuspectPedPersona, VictimPedPersona;
  66.         private int dialog1WithCopIndex;
  67.         private int dialog2WithVicIndex;
  68.         private int dialog3WithSusIndex;
  69.         private SpawnHelper CopPedPos1, VictimPedPos1, SuspectPedPos1, ParaPedPos1, CopVehiclePos1, VictimVehiclePos1, SuspectVehiclePos1, ParaVehiclePos1;
  70.         private ECalloutState calloutState;
  71.         private EDialog dialog;
  72.         private readonly List<SpawnHelper> CopPedPos1List = new List<SpawnHelper>
  73.         {
  74.             new SpawnHelper(new Vector3(666.14f, -1747.15f, 29.24f), 63.85f)
  75.         };
  76.         private readonly List<SpawnHelper> VictimPedPos1List = new List<SpawnHelper>
  77.         {
  78.             new SpawnHelper(new Vector3(677.62f, -1750.26f, 29.15f), 221.41f, "Innocence", "Boulevard")
  79.         };
  80.         private readonly List<SpawnHelper> SuspectPedPos1List = new List<SpawnHelper>
  81.         {
  82.             new SpawnHelper(new Vector3(669.05f, -1751.20f, 29.30f), 333.41f)
  83.         };
  84.         private readonly List<SpawnHelper> ParaPedPos1List = new List<SpawnHelper>
  85.         {
  86.             new SpawnHelper(new Vector3(685.11f, -1748.25f, 29.28f), 266.08f)
  87.         };
  88.         private readonly List<SpawnHelper> CopVehiclePos1List = new List<SpawnHelper>
  89.         {
  90.             new SpawnHelper(new Vector3(664.74f, -1748.62f, 28.66f), 266.46f)
  91.         };
  92.         private readonly List<SpawnHelper> VictimVehiclePos1List = new List<SpawnHelper>
  93.         {
  94.             new SpawnHelper(new Vector3(672.27f, -1748.53f, 28.79f), 250.05f)
  95.         };
  96.         private readonly List<SpawnHelper> SuspectVehiclePos1List = new List<SpawnHelper>
  97.         {
  98.             new SpawnHelper(new Vector3(676.95f, -1749.16f, 28.85f), 305.59f)
  99.         };
  100.         private readonly List<SpawnHelper> ParaVehiclePos1List = new List<SpawnHelper>
  101.         {
  102.             new SpawnHelper(new Vector3(684.16f, -1750.06f, 28.91f), 264.52f)
  103.         };
  104.         private readonly List<string> dialog1WithCop = new List<string>
  105.         {
  106.             "~b~You:~s~ Hello Officer, what seems to be the problem today? (1/3)",
  107.             $"~b~Officer:~s~ Well what I saw was the victim's car get rammed, almost pitted by the suspect. They stopped, got out and started spewing shit at each other, I'd speak with the victim first, and see where it goes from there. (2/3)",
  108.             "~b~You:~s~ Thanks officer.. (3/3)",
  109.         };
  110.         private readonly List<string> dialog2WithVic = new List<string>
  111.         {
  112.             "~b~You:~s~ Hello sir, can you tell me what happened. (1/5)",
  113.             "~g~Victim:~s~ Hi there, so what I remember is that I was heading to my friends place for a beer and shit, and BOOM! out of no where, this dumbass hits me and continues to ram my side like he pitted me. (2/5)",
  114.             "~b~You:~s~ Okay thank you sir, are you injured in any way? (3/5)",
  115.             "~g~Victim~s~ No sir, the ambo over there checked me and him out, I'm fine but the fuckhead over there has a sprained wrist. (4/5)",
  116.             "~b~You:~s~ Okay sir, can you please wait here while I have a chat with the ~r~suspect~s~. (5/5)",
  117.         };
  118.         private readonly List<string> dialog3WithSus = new List<string>
  119.         {
  120.             "~b~You:~s~ hello sir, can I talk to you about the accident please? (1/2)",
  121.             "~r~Suspect:~s~ Fuck off you dumbass pig, I'm not saying one fucking word to you, he cut me off so I had all right to hit him, now fuck off and leave me alone! (2/2)",
  122.         };
  123.         private static readonly string SuspectName = "SuspectName";
  124.         private string _SuspectName;
  125.         private readonly List<Entity> SpawnedEntities = new List<Entity>();
  126.         private readonly List<Blip> SpawnedBlips = new List<Blip>();
  127.         private bool computerPlusRunning;
  128.         private Guid callID;
  129.  
  130.         public override bool OnBeforeCalloutDisplayed()
  131.         {
  132.             computerPlusRunning = Utils.IsLSPDFRPluginRunning("ComputerPlus", new Version("1.3.0.0"));
  133.             CopPedPos1 = Utils.getNearestSpawnHelper(Utils.Player.Position, CopPedPos1List);
  134.             ParaPedPos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, ParaPedPos1List);
  135.             VictimPedPos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, VictimPedPos1List);
  136.             SuspectPedPos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, SuspectPedPos1List);
  137.             CopVehiclePos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, CopVehiclePos1List);
  138.             ParaVehiclePos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, ParaVehiclePos1List);
  139.             VictimVehiclePos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, VictimVehiclePos1List);
  140.             SuspectVehiclePos1 = Utils.getNearestSpawnHelper(CopPedPos1.location, SuspectVehiclePos1List);
  141.             cone1pos = new Vector3(667.31f, -1745.94f, 28.03f);
  142.             cone2pos = new Vector3(670.84f, -1744.64f, 28.33f);
  143.             cone3pos = new Vector3(674.98f, -1745.02f, 28.33f);
  144.             cone4pos = new Vector3(679.13f, -1745.47f, 28.34f);
  145.             cone5pos = new Vector3(681.52f, -1747.75f, 28.28f);
  146.  
  147.             CalloutMessage = "Severe Vehicle Crash";
  148.             CalloutPosition = VictimPedPos1.location;
  149.  
  150.             var a = Utils.Random.Next(1, 3);
  151.             dialog = a == 1 ? EDialog.Dialog1 : EDialog.Dialog2;
  152.  
  153.             Functions.PlayScannerAudioUsingPosition($"WE_HAVE MVA_01 NEAR_UHM {RoadIncidentCallouts.WorldZone.GetAudioForZoneAtPosition(VictimPedPos1.location)} RESPOND_CODE_2", VictimPedPos1.location);
  154.             ShowCalloutAreaBlipBeforeAccepting(VictimPedPos1.location, 50f);
  155.             //AddMinimumDistanceCheck(50f, VicPos.location);
  156.  
  157.             if (computerPlusRunning)
  158.                 callID = ComputerPlusWrapper.CreateCallout("Motor Vehicle Accident", "Motor Vehicle Accident",
  159.                     VictimPedPos1.location, (int)EResponseType.Code_2,
  160.                     $"An Officer near ~y~{VictimPedPos1.area}~w~, ~y~{VictimPedPos1.street}~w~ reports a very severe vehicle crash and requires assistance.");
  161.  
  162.             return base.OnBeforeCalloutDisplayed();
  163.         }
  164.         public override bool OnCalloutAccepted()
  165.         {
  166.             cone5 = new Rage.Object("prop_mp_cone_01", cone5pos, 264.24f);
  167.             cone4 = new Rage.Object("prop_mp_cone_01", cone4pos, 264.24f);
  168.             cone3 = new Rage.Object("prop_mp_cone_01", cone3pos, 264.24f);
  169.             cone2 = new Rage.Object("prop_mp_cone_01", cone2pos, 264.24f);
  170.             cone1 = new Rage.Object("prop_mp_cone_01", cone1pos, 264.24f);
  171.  
  172.             Game.DisplayNotification($"Go to the ~o~Scene~w~ of the ~o~accident~w~ near ~y~{VictimPedPos1.area}~w~, ~y~{VictimPedPos1.street}~w~ and speak with the ~b~Officer");
  173.             Game.DisplayHelp($"Press ~b~X~w~ to end the callout", 5000);
  174.             Game.DisplayNotification($"~b~Dispatch~w~: An Officer near {VictimPedPos1.area}, {VictimPedPos1.street} reports a very severe vehicle crash and requires assistance.");
  175.  
  176.             CopPed = CopPedPrep(CopPedPos1.location, CopPedPos1.heading);
  177.             AmboPed = ParaPedPrep(ParaPedPos1.location, ParaPedPos1.heading);
  178.             Victimped = VictimPrep(VictimPedPos1.location, VictimPedPos1.heading);
  179.             SuspectPed = SuspectPedPrep(SuspectPedPos1.location, SuspectPedPos1.heading);
  180.             CopVehicle = CopVehiclePrep(CopVehiclePos1.location, CopVehiclePos1.heading);
  181.             AmboVehicle = ParaVehiclePrep(ParaVehiclePos1.location, ParaVehiclePos1.heading);
  182.             Victimvehicle = VictimVehiclePrep(VictimVehiclePos1.location, VictimVehiclePos1.heading);
  183.             SuspectVehicle = SuspectVehiclePrep(SuspectVehiclePos1.location, SuspectVehiclePos1.heading);
  184.  
  185.             if (CopPed && AmboPed && Victimped && SuspectPed && CopVehicle && AmboVehicle && Victimvehicle && SuspectVehicle)
  186.             {
  187.                 SpawnedEntities.Add(CopPed);
  188.                 SpawnedEntities.Add(AmboPed);
  189.                 SpawnedEntities.Add(Victimped);
  190.                 SpawnedEntities.Add(SuspectPed);
  191.                 SpawnedEntities.Add(CopVehicle);
  192.                 SpawnedEntities.Add(AmboVehicle);
  193.                 SpawnedEntities.Add(Victimvehicle);
  194.                 SpawnedEntities.Add(SuspectVehicle);
  195.  
  196.                 CopBlip = CopPed.AttachBlip();
  197.                 CopBlip.Color = Color.LightBlue;
  198.                 CopBlip.EnableRoute(Color.LightBlue);
  199.                 CopBlip.Scale = 0.8f;
  200.                 CopBlip.Name = "Officer";
  201.                 SpawnedBlips.Add(CopBlip);
  202.  
  203.                 Trooper1Blip = Victimped.AttachBlip();
  204.                 Trooper1Blip.Color = Color.Green;
  205.                 Trooper1Blip.Scale = 0.6f;
  206.                 Trooper1Blip.Name = "Victim";
  207.                 SpawnedBlips.Add(Trooper1Blip);
  208.  
  209.                 SuspectBlip = SuspectPed.AttachBlip();
  210.                 SuspectBlip.Color = Color.Red;
  211.                 SuspectBlip.Scale = 0.6f;
  212.                 SuspectBlip.Name = "Suspect";
  213.                 SpawnedBlips.Add(SuspectBlip);
  214.  
  215.                 Victimvehicle.Damage(5f, 1500f);
  216.                 SuspectVehicle.Damage(8f, 2100f);
  217.  
  218.                 VictimPedPersona = Functions.GetPersonaForPed(Victimped);
  219.                 SuspectPedPersona = Functions.GetPersonaForPed(SuspectPed);
  220.                 _SuspectName = SuspectPedPersona.FullName;
  221.             }
  222.  
  223.             if (computerPlusRunning)
  224.                 ComputerPlusWrapper.SetCalloutStatusToUnitResponding(callID);
  225.  
  226.             return base.OnCalloutAccepted();
  227.         }
  228.         public override void OnCalloutNotAccepted()
  229.         {
  230.             if (Victimped.Exists()) Victimped.Delete();
  231.             if (Victimvehicle.Exists()) Victimvehicle.Delete();
  232.             if (SuspectBlip.Exists()) SuspectBlip.Delete();
  233.             if (SuspectVehicle.Exists()) SuspectVehicle.Delete();
  234.             if (SuspectPed.Exists()) SuspectPed.Delete();
  235.             if (CopBlip.Exists()) CopBlip.Delete();
  236.             if (PedBlip.Exists()) PedBlip.Delete();
  237.             if (VehicleBlip.Exists()) VehicleBlip.Delete();
  238.             if (CopPed.Exists()) CopPed.Delete();
  239.             if (AmboPed.Exists()) AmboPed.Delete();
  240.             if (AmboVehicle.Exists()) AmboVehicle.Delete();
  241.             if (CopVehicle.Exists()) CopVehicle.Delete();
  242.             base.OnCalloutNotAccepted();
  243.         }
  244.         public override void Process()
  245.         {
  246.             if (CopPed)
  247.             {
  248.                 if (CopPed.IsAlive)
  249.                 {
  250.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(CopPed) <= 3.5f)
  251.                     {
  252.                         CopBlip.DisableRoute();
  253.                         calloutState = ECalloutState.SpeakWithCopPed;
  254.                     }
  255.                 }
  256.             }
  257.             if (CopPed)
  258.             {
  259.                 if (CopPed.IsAlive)
  260.                 {
  261.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(CopPed) <= 2.5f)
  262.                     {
  263.                         if (Game.IsKeyDown(Keys.T))
  264.                         {
  265.                             if (dialog == EDialog.Dialog1)
  266.                             {
  267.                                 if (dialog1WithCopIndex < dialog1WithCop.Count)
  268.                                 {
  269.                                     Game.DisplaySubtitle(dialog1WithCop[dialog1WithCopIndex]);
  270.                                     dialog1WithCopIndex++;
  271.                                 }
  272.                             }
  273.                             if (dialog1WithCopIndex == 3 || dialog2WithVicIndex == 5)
  274.                             {
  275.                                 GameFiber.StartNew(delegate
  276.                                 {
  277.                                     GameFiber.Sleep(1500);
  278.                                     CopPed.Tasks.Clear();
  279.                                     Game.DisplayNotification("Speak with the ~g~Victim");
  280.                                     calloutState = ECalloutState.SpokeWithCopPed;
  281.                                 });
  282.                             }
  283.                         }
  284.                     }
  285.                 }
  286.             }
  287.             calloutState = ECalloutState.SpokeWithCopPed;
  288.             if (Victimped)
  289.             {
  290.                 if (Victimped.IsAlive)
  291.                 {
  292.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(Victimped) <= 2.5f)
  293.                     {
  294.                         Victimped.PlayAmbientSpeech("GENERIC_HI");
  295.  
  296.                         calloutState = ECalloutState.SpeakWithVicPed;
  297.                     }
  298.                 }
  299.             }
  300.             calloutState = ECalloutState.SpeakWithVicPed;
  301.             if (Victimped)
  302.             {
  303.                 if (Victimped.IsAlive)
  304.                 {
  305.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(Victimped) <= 2.5f)
  306.                     {
  307.                         if (Game.IsKeyDown(Keys.T))
  308.                         {
  309.                             if (dialog == EDialog.Dialog1)
  310.                             {
  311.                                 if (dialog2WithVicIndex < dialog2WithVic.Count)
  312.                                 {
  313.                                     Game.DisplaySubtitle(dialog2WithVic[dialog2WithVicIndex]);
  314.                                     dialog2WithVicIndex++;
  315.                                 }
  316.                             }
  317.                             if (dialog2WithVicIndex == 5 || dialog3WithSusIndex == 2)
  318.                             {
  319.                                 GameFiber.StartNew(delegate
  320.                                 {
  321.                                     GameFiber.Sleep(3500);
  322.                                     Victimped.Tasks.Clear();
  323.                                     Game.DisplayNotification("Speak to the ~r~Suspect");
  324.                                     calloutState = ECalloutState.SpokeWithVicPed;
  325.                                 });
  326.                             }
  327.                         }
  328.                     }
  329.                 }
  330.             }
  331.             calloutState = ECalloutState.SpokeWithVicPed;
  332.             if (SuspectPed)
  333.             {
  334.                 if (SuspectPed.IsAlive)
  335.                 {
  336.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(SuspectPed) <= 2.5f)
  337.                     {
  338.                         calloutState = ECalloutState.SpeakWithSuspectPed;
  339.                     }
  340.                 }
  341.             }
  342.             calloutState = ECalloutState.SpeakWithSuspectPed;
  343.             if (SuspectPed)
  344.             {
  345.                 if (SuspectPed.IsAlive)
  346.                 {
  347.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(SuspectPed) <= 2.5f)
  348.                     {
  349.                         if (Game.IsKeyDown(Keys.T))
  350.                         {
  351.                             if (dialog == EDialog.Dialog1)
  352.                             {
  353.                                 if (dialog3WithSusIndex < dialog3WithSus.Count)
  354.                                 {
  355.                                     Game.DisplaySubtitle(dialog3WithSus[dialog3WithSusIndex]);
  356.                                     dialog3WithSusIndex++;
  357.                                 }
  358.                             }
  359.                             if (dialog3WithSusIndex == 2)
  360.                             {
  361.                                 GameFiber.Sleep(6500);
  362.                                 Game.DisplayNotification("Arrest the ~r~suspect~s~, and get the vehicles towed");
  363.                                 SuspectPed.Tasks.Clear();
  364.                                 calloutState = ECalloutState.ArrestSuspect;
  365.                             }
  366.                         }
  367.                     }
  368.                 }
  369.             }
  370.             calloutState = ECalloutState.ArrestSuspect;
  371.             if (Functions.IsPedArrested(SuspectPed))
  372.             {
  373.                 End();
  374.             }
  375.  
  376.             if (Game.IsKeyDown(Keys.X))
  377.             {
  378.                 try
  379.                 {
  380.                     const string audioFileName = "CODE_4_RETURN_TO_PATROL.wav";
  381.                     "Pressed EndCalloutKey".AddLog();
  382.                     Game.DisplayNotification($"~b~{Settings.OfficerName}~w~: Dispatch, I have cleared the last call, show me code 4.");
  383.                     if (File.Exists($"lspdfr/Police Scanner/RoadIncidentCallouts_Audio/{audioFileName}"))
  384.                         Functions.PlayScannerAudio(audioFileName);
  385.                     else $"Failed to locate file '{audioFileName}.wav', verify installation".AddLog();
  386.                     End();
  387.                 }
  388.                 catch (Exception ex)
  389.                 {
  390.                     $"Error occured trying to end the callout, error is: {ex}".AddLog();
  391.                 }
  392.             }
  393.             FinalizeDialog();
  394.  
  395.             base.Process();
  396.         }
  397.  
  398.         private void FinalizeDialog()
  399.         {
  400.             dialog1WithCop[3] = dialog1WithCop[3].Replace(SuspectName, _SuspectName);
  401.             dialog2WithVic[5] = dialog2WithVic[5].Replace(SuspectName, _SuspectName);
  402.         }
  403.  
  404.         private enum EDialog
  405.         {
  406.             Dialog1,
  407.             Dialog2
  408.         }
  409.  
  410.         private enum ECalloutState
  411.         {
  412.             SpeakWithCop,
  413.             SpokeWithCop,
  414.             SpeakWithSuspect,
  415.             ArrestSuspect,
  416.             SpeakWithSuspectPed,
  417.             SpokeWithVicPed,
  418.             SpeakWithVicPed,
  419.             SpokeWithCopPed,
  420.             SpeakWithCopPed
  421.         }
  422.         private Ped CopPedPrep(Vector3 position, float heading)
  423.         {
  424.             var ped = new Ped("s_m_y_cop_01", position, heading)
  425.             {
  426.                 IsPersistent = true,
  427.                 BlockPermanentEvents = true
  428.             };
  429.             return ped;
  430.         }
  431.         private Ped ParaPedPrep(Vector3 position, float heading)
  432.         {
  433.             var ped = new Ped("s_m_m_paramedic_01", position, heading)
  434.             {
  435.                 IsPersistent = true,
  436.                 BlockPermanentEvents = true
  437.             };
  438.             return ped;
  439.         }
  440.         private Ped VictimPrep(Vector3 position, float heading)
  441.         {
  442.             string[] models = { "a_f_o_soucent_02", "a_m_m_bevhills_02", "a_m_m_eastsa_02", "a_m_m_malibu_01", "a_f_m_tourist_01", "a_m_m_socenlat_01", "a_m_m_skidrow_01", "a_f_y_hipster_04", "a_m_m_stlat_02", "a_m_m_tourist_01" };
  443.             var ped = new Ped(MathHelper.Choose(models), position, heading);
  444.             ped.IsPersistent = true;
  445.             ped.BlockPermanentEvents = true;
  446.             return ped;
  447.         }
  448.         private Ped SuspectPedPrep(Vector3 position, float heading)
  449.         {
  450.             string[] models = { "a_m_o_soucent_02", "a_m_y_beachvesp_01", "a_m_y_beachvesp_02", "a_m_y_bevhills_02", "a_m_y_bevhills_01", "a_m_y_downtown_01", "a_m_y_eastsa_02", "a_m_y_genstreet_02", "a_m_y_latino_01" };
  451.             var ped = new Ped(MathHelper.Choose(models), position, heading)
  452.             {
  453.                 IsPersistent = true,
  454.                 BlockPermanentEvents = true
  455.             };
  456.             return ped;
  457.         }
  458.         private Vehicle CopVehiclePrep(Vector3 position, float heading)
  459.         {
  460.             var vehicle = new Vehicle(Utils.GetPoliceVehicleModelForPosition(position), position, heading)
  461.             {
  462.                 IsPersistent = true
  463.             };
  464.             vehicle.RandomizeLicensePlate();
  465.             vehicle.IsSirenOn = true;
  466.             vehicle.IsSirenSilent = true;
  467.             return vehicle;
  468.         }
  469.         private Vehicle ParaVehiclePrep(Vector3 position, float heading)
  470.         {
  471.             var vehicle = new Vehicle("ambulance", position, heading)
  472.             {
  473.                 IsPersistent = true
  474.             };
  475.             vehicle.RandomizeLicensePlate();
  476.             vehicle.IsSirenOn = true;
  477.             vehicle.IsSirenSilent = true;
  478.             return vehicle;
  479.         }
  480.         private Vehicle VictimVehiclePrep(Vector3 position, float heading)
  481.         {
  482.             string[] models = { "asterope", "banshee", "bjxl", "blista", "buccaneer", "bullet", "cogcabrio", "dilettante", "emperor2", "felon" };
  483.             var vehicle = new Vehicle(MathHelper.Choose(models), position, heading)
  484.             {
  485.                 IsPersistent = true
  486.             };
  487.             vehicle.RandomizeLicensePlate();
  488.             vehicle.AlarmTimeLeft = new TimeSpan(0, 5, 0);
  489.             return vehicle;
  490.         }
  491.         private Vehicle SuspectVehiclePrep(Vector3 position, float heading)
  492.         {
  493.             string[] models = { "adder", "asea", "baller", "bison", "bobcatxl", "carbonizzare", "cavalcade", "elegy2", "f620", "fq2" };
  494.             var vehicle = new Vehicle(MathHelper.Choose(models), position, heading)
  495.             {
  496.                 IsPersistent = true
  497.             };
  498.             vehicle.RandomizeLicensePlate();
  499.             return vehicle;    
  500.         }
  501.     }
  502. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement