Advertisement
SRSbladez

Untitled

Jul 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 22.60 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 readonly 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 picador get rammed, almost pitted by the fugitive. They stopped, got out and started spewing shit at each other, be careful with the ~r~suspect~s~, he's quite hostile. (2/3)",
  108.             "~b~You:~s~ Thanks officer, I'll deal with the victim first, and then the suspect. (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 fugitive 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.             Functions.PlayScannerAudioUsingPosition($"WE_HAVE MVA_01 NEAR_UHM {RoadIncidentCallouts.WorldZone.GetAudioForZoneAtPosition(VictimPedPos1.location)} RESPOND_CODE_2", VictimPedPos1.location);
  151.             ShowCalloutAreaBlipBeforeAccepting(VictimPedPos1.location, 50f);
  152.             //AddMinimumDistanceCheck(50f, VicPos.location);
  153.  
  154.             if (computerPlusRunning)
  155.                 callID = ComputerPlusWrapper.CreateCallout("Motor Vehicle Accident", "Motor Vehicle Accident",
  156.                     VictimPedPos1.location, (int)EResponseType.Code_2,
  157.                     $"An Officer near ~y~{VictimPedPos1.area}~w~, ~y~{VictimPedPos1.street}~w~ reports a very severe vehicle crash and requires assistance.");
  158.  
  159.             return base.OnBeforeCalloutDisplayed();
  160.         }
  161.         public override bool OnCalloutAccepted()
  162.         {
  163.             cone5 = new Rage.Object("prop_mp_cone_01", cone5pos, 264.24f);
  164.             cone4 = new Rage.Object("prop_mp_cone_01", cone4pos, 264.24f);
  165.             cone3 = new Rage.Object("prop_mp_cone_01", cone3pos, 264.24f);
  166.             cone2 = new Rage.Object("prop_mp_cone_01", cone2pos, 264.24f);
  167.             cone1 = new Rage.Object("prop_mp_cone_01", cone1pos, 264.24f);
  168.  
  169.             Game.DisplaySubtitle($"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", 6500);
  170.             Game.DisplayHelp($"Press ~b~X~w~ to end the callout", 5000);
  171.             Game.DisplayNotification($"~b~Dispatch~w~: An Officer near {VictimPedPos1.area}, {VictimPedPos1.street} reports a very severe vehicle crash and requires assistance.");
  172.  
  173.             CopPed = CopPedPrep(CopPedPos1.location, CopPedPos1.heading);
  174.             AmboPed = ParaPedPrep(ParaPedPos1.location, ParaPedPos1.heading);
  175.             Victimped = VictimPrep(VictimPedPos1.location, VictimPedPos1.heading);
  176.             SuspectPed = SuspectPedPrep(SuspectPedPos1.location, SuspectPedPos1.heading);
  177.             CopVehicle = CopVehiclePrep(CopVehiclePos1.location, CopVehiclePos1.heading);
  178.             AmboVehicle = ParaVehiclePrep(ParaVehiclePos1.location, ParaVehiclePos1.heading);
  179.             Victimvehicle = VictimVehiclePrep(VictimVehiclePos1.location, VictimVehiclePos1.heading);
  180.             SuspectVehicle = SuspectVehiclePrep(SuspectVehiclePos1.location, SuspectVehiclePos1.heading);
  181.  
  182.             CopBlip = CopPed.AttachBlip();
  183.             CopBlip.EnableRoute(Color.Blue);
  184.             CopBlip.Scale = 0.8f;
  185.             CopBlip.Name = "Officer";
  186.             SpawnedBlips.Add(CopBlip);
  187.  
  188.             Trooper1Blip = Victimped.AttachBlip();
  189.             Trooper1Blip.Color = Color.Green;
  190.             Trooper1Blip.Scale = 0.6f;
  191.             Trooper1Blip.Name = "Victim";
  192.             SpawnedBlips.Add(Trooper1Blip);
  193.  
  194.             SuspectBlip = SuspectPed.AttachBlip();
  195.             SuspectBlip.Color = Color.Red;
  196.             SuspectBlip.Scale = 0.6f;
  197.             SuspectBlip.Name = "Suspect";
  198.             SpawnedBlips.Add(SuspectBlip);
  199.  
  200.             Victimvehicle.Damage(11f, 1000f);
  201.             SuspectVehicle.Damage(5f, 2500f);
  202.  
  203.             VictimPedPersona = Functions.GetPersonaForPed(Victimped);
  204.             SuspectPedPersona = Functions.GetPersonaForPed(SuspectPed);
  205.             _SuspectName = SuspectPedPersona.FullName;
  206.  
  207.             return base.OnCalloutAccepted();
  208.         }
  209.         public override void OnCalloutNotAccepted()
  210.         {
  211.             if (Victimped.Exists()) Victimped.Delete();
  212.             if (Victimvehicle.Exists()) Victimvehicle.Delete();
  213.             if (SuspectBlip.Exists()) SuspectBlip.Delete();
  214.             if (SuspectVehicle.Exists()) SuspectVehicle.Delete();
  215.             if (SuspectPed.Exists()) SuspectPed.Delete();
  216.             if (CopBlip.Exists()) CopBlip.Delete();
  217.             if (PedBlip.Exists()) PedBlip.Delete();
  218.             if (VehicleBlip.Exists()) VehicleBlip.Delete();
  219.             base.OnCalloutNotAccepted();
  220.         }
  221.         public override void Process()
  222.         {
  223.             if (Game.IsKeyDown(Settings.EndCalloutKey))
  224.             {
  225.                 try
  226.                 {
  227.                     const string audioFileName = "CODE_4_RETURN_TO_PATROL.wav";
  228.                     "Pressed EndCalloutKey".AddLog();
  229.                     Game.DisplayNotification($"~b~{Settings.OfficerName}~w~: Dispatch, I have cleared the last call, show me code 4.");
  230.                     if (File.Exists($"lspdfr/Police Scanner/RoadIncidentCallouts_Audio/{audioFileName}"))
  231.                         Functions.PlayScannerAudio(audioFileName);
  232.                     else $"Failed to locate file '{audioFileName}.wav', verify installation".AddLog();
  233.                     End();
  234.                 }
  235.                 catch (Exception ex)
  236.                 {
  237.                     $"Error occured trying to end the callout, error is: {ex}".AddLog();
  238.                 }
  239.             }
  240.  
  241.             FinalizeDialog();
  242.  
  243.             HandleCallout();
  244.  
  245.             base.Process();
  246.         }
  247.  
  248.         public override void End()
  249.         {
  250.             if (Victimvehicle)
  251.                 if (Victimvehicle.IsAlarmSounding)
  252.                     Victimvehicle.AlarmTimeLeft = new TimeSpan(0, 0, 0);
  253.  
  254.             if (SpawnedBlips.Count > 0)
  255.             {
  256.                 foreach (var VARIABLE in SpawnedBlips)
  257.                 {
  258.                     if (VARIABLE)
  259.                     {
  260.                         VARIABLE.Delete();
  261.                     }
  262.                 }
  263.             }
  264.  
  265.             if (SpawnedEntities.Count > 0)
  266.             {
  267.                 foreach (var VARIABLE in SpawnedEntities)
  268.                 {
  269.                     if (VARIABLE)
  270.                     {
  271.                         VARIABLE.Dismiss();
  272.                     }
  273.                 }
  274.             }
  275.  
  276.             if (computerPlusRunning)
  277.                 ComputerPlusWrapper.ConcludeCallout(callID);
  278.  
  279.             base.End();
  280.         }
  281.  
  282.         private void HandleCallout()
  283.         {
  284.  
  285.             if (CopPed)
  286.             {
  287.                 if (CopPed.IsAlive)
  288.                 {
  289.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(CopPed) <= 3.5f)
  290.                     {
  291.                         VehicleBlip.DisableRoute();
  292.                         calloutState = ECalloutState.SpeakWithCopPed;
  293.                     }
  294.                 }
  295.             }
  296.             if (CopPed)
  297.             {
  298.                 if (CopPed.IsAlive)
  299.                 {
  300.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(CopPed) <= 2.5f)
  301.                     {
  302.                         if (Game.IsKeyDown(Keys.T))
  303.                         {
  304.                             if (dialog == EDialog.Dialog1)
  305.                             {
  306.                                 if (dialog1WithCopIndex < dialog1WithCop.Count)
  307.                                 {
  308.                                     Game.DisplaySubtitle(dialog1WithCop[dialog1WithCopIndex]);
  309.                                     dialog1WithCopIndex++;
  310.                                 }
  311.                             }
  312.                             if (dialog1WithCopIndex == 3 || dialog2WithVicIndex == 5)
  313.                             {
  314.                                 GameFiber.StartNew(delegate
  315.                                 {
  316.                                     GameFiber.Sleep(3000);
  317.                                     CopPed.Tasks.Clear();
  318.                                     Game.DisplayNotification("Speak with the ~g~Victim");
  319.                                     calloutState = ECalloutState.SpokeWithCopPed;
  320.                                 });
  321.                             }
  322.                         }
  323.                     }
  324.                 }
  325.             }
  326.             calloutState = ECalloutState.SpokeWithCopPed;
  327.             if (Victimped)
  328.             {
  329.                 if (Victimped.IsAlive)
  330.                 {
  331.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(Victimped) <= 2.5f)
  332.                     {
  333.                         Victimped.PlayAmbientSpeech("GENERIC_HI");
  334.  
  335.                         calloutState = ECalloutState.SpeakWithVicPed;
  336.                     }
  337.                 }
  338.             }
  339.             calloutState = ECalloutState.SpeakWithVicPed;
  340.             if (Victimped)
  341.             {
  342.                 if (Victimped.IsAlive)
  343.                 {
  344.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(Victimped) <= 2.5f)
  345.                     {
  346.                         if (Game.IsKeyDown(Keys.T))
  347.                         {
  348.                             if (dialog == EDialog.Dialog1)
  349.                             {
  350.                                 if (dialog2WithVicIndex < dialog2WithVic.Count)
  351.                                 {
  352.                                     Game.DisplaySubtitle(dialog2WithVic[dialog2WithVicIndex]);
  353.                                     dialog2WithVicIndex++;
  354.                                 }
  355.                             }
  356.                             if (dialog2WithVicIndex == 5 || dialog3WithSusIndex == 2)
  357.                             {
  358.                                 GameFiber.StartNew(delegate
  359.                                 {
  360.                                     GameFiber.Sleep(3500);
  361.                                     Victimped.Tasks.Clear();
  362.                                     Game.DisplayNotification("Speak to the ~r~Suspect");
  363.                                     calloutState = ECalloutState.SpokeWithVicPed;
  364.                                 });
  365.                             }
  366.                         }
  367.                     }
  368.                 }
  369.             }
  370.             calloutState = ECalloutState.SpokeWithVicPed;
  371.             if (SuspectPed)
  372.             {
  373.                 if (SuspectPed.IsAlive)
  374.                 {
  375.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(SuspectPed) <= 2.5f)
  376.                     {
  377.                         calloutState = ECalloutState.SpeakWithSuspectPed;
  378.                     }
  379.                 }
  380.             }
  381.             calloutState = ECalloutState.SpeakWithSuspectPed;
  382.             if (SuspectPed)
  383.             {
  384.                 if (SuspectPed.IsAlive)
  385.                 {
  386.                     if (Game.LocalPlayer.Character.Position.DistanceTo2D(SuspectPed) <= 2.5f)
  387.                     {
  388.                         if (Game.IsKeyDown(Keys.T))
  389.                         {
  390.                             if (dialog == EDialog.Dialog1)
  391.                             {
  392.                                 if (dialog3WithSusIndex < dialog3WithSus.Count)
  393.                                 {
  394.                                     Game.DisplaySubtitle(dialog3WithSus[dialog3WithSusIndex]);
  395.                                     dialog3WithSusIndex++;
  396.                                 }
  397.                             }
  398.                             if (dialog3WithSusIndex == 2)
  399.                             {
  400.                                 GameFiber.Sleep(6500);
  401.                                 Game.DisplayNotification("Arrest the ~r~suspect~s~, and get the vehicles towed");
  402.                                 SuspectPed.Tasks.Clear();
  403.                                 calloutState = ECalloutState.ArrestSuspect;
  404.                             }
  405.                         }
  406.                     }
  407.                 }
  408.             }
  409.             calloutState = ECalloutState.ArrestSuspect;
  410.             if (Functions.IsPedArrested(SuspectPed))
  411.             {
  412.                 End();
  413.             }
  414.         }
  415.  
  416.         private void FinalizeDialog()
  417.         {
  418.             dialog1WithCop[3] = dialog1WithCop[3].Replace(SuspectName, _SuspectName);
  419.             dialog2WithVic[5] = dialog2WithVic[5].Replace(SuspectName, _SuspectName);
  420.         }
  421.  
  422.         private enum EDialog
  423.         {
  424.             Dialog1
  425.         }
  426.  
  427.         private enum ECalloutState
  428.         {
  429.             SpeakWithCop,
  430.             SpokeWithCop,
  431.             SpeakWithSuspect,
  432.             ArrestSuspect,
  433.             SpeakWithSuspectPed,
  434.             SpokeWithVicPed,
  435.             SpeakWithVicPed,
  436.             SpokeWithCopPed,
  437.             SpeakWithCopPed
  438.         }
  439.         private Ped CopPedPrep(Vector3 position, float heading)
  440.         {
  441.             var ped = new Ped(Utils.GetPolicePedModelForPosition(position), position, heading)
  442.             {
  443.                 IsPersistent = true,
  444.                 BlockPermanentEvents = true
  445.             };
  446.             return ped;
  447.         }
  448.         private Ped ParaPedPrep(Vector3 position, float heading)
  449.         {
  450.             var ped = new Ped("s_m_m_paramedic_01", position, heading)
  451.             {
  452.                 IsPersistent = true,
  453.                 BlockPermanentEvents = true
  454.             };
  455.             return ped;
  456.         }
  457.         private Ped VictimPrep(Vector3 position, float heading)
  458.         {
  459.             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" };
  460.             var ped = new Ped(MathHelper.Choose(models), position, heading);
  461.             ped.IsPersistent = true;
  462.             ped.BlockPermanentEvents = true;
  463.             return ped;
  464.         }
  465.         private Ped SuspectPedPrep(Vector3 position, float heading)
  466.         {
  467.             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" };
  468.             var ped = new Ped(MathHelper.Choose(models), position, heading)
  469.             {
  470.                 IsPersistent = true,
  471.                 BlockPermanentEvents = true
  472.             };
  473.             return ped;
  474.         }
  475.         private Vehicle CopVehiclePrep(Vector3 position, float heading)
  476.         {
  477.             var vehicle = new Vehicle(Utils.GetPoliceVehicleModelForPosition(position), position, heading)
  478.             {
  479.                 IsPersistent = true
  480.             };
  481.             vehicle.RandomizeLicensePlate();
  482.             vehicle.IsSirenOn = true;
  483.             vehicle.IsSirenSilent = true;
  484.             return vehicle;
  485.         }
  486.         private Vehicle ParaVehiclePrep(Vector3 position, float heading)
  487.         {
  488.             var vehicle = new Vehicle("ambulance", position, heading)
  489.             {
  490.                 IsPersistent = true
  491.             };
  492.             vehicle.RandomizeLicensePlate();
  493.             vehicle.IsSirenOn = true;
  494.             vehicle.IsSirenSilent = true;
  495.             return vehicle;
  496.         }
  497.         private Vehicle VictimVehiclePrep(Vector3 position, float heading)
  498.         {
  499.             string[] models = { "asterope", "banshee", "bjxl", "blista", "buccaneer", "bullet", "cogcabrio", "dilettante", "emperor2", "felon" };
  500.             var vehicle = new Vehicle(MathHelper.Choose(models), position, heading)
  501.             {
  502.                 IsPersistent = true
  503.             };
  504.             vehicle.RandomizeLicensePlate();
  505.             vehicle.AlarmTimeLeft = new TimeSpan(0, 5, 0);
  506.             return vehicle;
  507.         }
  508.         private Vehicle SuspectVehiclePrep(Vector3 position, float heading)
  509.         {
  510.             string[] models = { "adder", "asea", "baller", "bison", "bobcatxl", "carbonizzare", "cavalcade", "elegy2", "f620", "fq2" };
  511.             var vehicle = new Vehicle(MathHelper.Choose(models), position, heading)
  512.             {
  513.                 IsPersistent = true
  514.             };
  515.             vehicle.RandomizeLicensePlate();
  516.             return vehicle;
  517.         }
  518.     }
  519. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement