Beispiel #1
0
        public static uint DeclareSubjectStatus(Ped ped)
        {
            string status;
            string radioStatus;

            if (!ped.Exists())
            {
                status      = "<font color=\"red\">escaped</font>";
                radioStatus = "SUSPECT_LAST_SEEN IN_OR_ON_POSITION ATTEMPT_FIND";
            }
            else if (Integreate.StopThePed && ped.IsDead && ArrestedBySTP.Contains(ped))
            {
                status      = "<font color=\"lime\">in custody</font>";
                radioStatus = "SUSPECT_APPREHENDED";
            }
            else if (ped.IsDead)
            {
                status      = "<font color=\"lime\">down</font>";
                radioStatus = "PASSIFIED";
            }
            else if (Functions.IsPedArrested(ped))
            {
                status      = "<font color=\"lime\">in custody</font>";
                radioStatus = "SUSPECT_APPREHENDED";
            }
            else
            {
                status      = "<font color=\"blueviolet\">innocent</font>";
                radioStatus = "";
            }
            Functions.PlayScannerAudioUsingPosition("ATTENTION_ALL_UNITS " + radioStatus + " NO_ADDITIONAL_SUPPORT", Game.LocalPlayer.Character.Position);
            return(ScannerHelper.DisplayDispatchDialogue("Dispatch", "Code 4, suspect is " + status));
        }
Beispiel #2
0
        public override bool OnBeforeCalloutDisplayed()
        {
            spawn = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(200f));

            ShowCalloutAreaBlipBeforeAccepting(spawn, 30f);
            AddMinimumDistanceCheck(20f, spawn);

            situation       = (EDocumentLackSituation)MathHelper.GetRandomInteger(0, 1);
            CalloutMessage  = situation == EDocumentLackSituation.Insurance ? "Uninsured Vehicle" : "Unregistered Vehicle";
            CalloutPosition = spawn;

            Functions.PlayScannerAudioUsingPosition("CITIZENS_REPORT CRIME_DANGEROUS_DRIVING IN_OR_ON_POSITION", spawn);

            return(base.OnBeforeCalloutDisplayed());
        }
        public static void GiveParkingTicket(GiveParkingTicketEvent parkingTicketEvent)
        {
            Vehicle vehicle      = parkingTicketEvent.Vehicle;
            string  modelName    = vehicle.Model.Name.ToLower();
            string  licencePlate = vehicle.LicensePlate;
            string  lexemArticle = ParkingTicketsEventHandler.Vowels.Contains <string>(modelName[0].ToString()) ? "an" : "a";

            string licencePlateAudioMessage = "";

            if (ParkingTicketsEventHandler.Numbers.Contains <string>(modelName.Last().ToString()))
            {
                modelName = modelName.Substring(0, modelName.Length - 1);
            }
            modelName = char.ToUpper(modelName[0]) + modelName.Substring(1);

            foreach (char character in licencePlate)
            {
                if (!Char.IsWhiteSpace(character))
                {
                    licencePlateAudioMessage = licencePlateAudioMessage + " " + character;
                }
            }

            ParkingTicketsEventHandler.Infos.Enabled = true;
            ParkingTicketsEventHandler.Infos.Text    = "Vehicle " + modelName + " (" + licencePlate + ")";
            ParkingTicketsEventHandler.Infos.Enabled = false;

            Game.DisplayNotification("~g~Traffic Officer ~s~is reporting an ~r~illegally parked vehicle.");
            Game.DisplayNotification("~b~Processing a parking ticket (" + parkingTicketEvent.Amount + ") for " + lexemArticle + " ~r~" + modelName + "~b~ with licence plate: ~r~" + licencePlate + ".");
            Game.DisplayNotification("~b~The offending ~r~" + modelName + " ~b~is parked on ~o~" + World.GetStreetName(vehicle.Position) + ".");


            PedsManager.LocalPlayer().Inventory.GiveNewWeapon(new WeaponAsset("WEAPON_UNARMED"), 0, true);
            Rage.Object notepad   = new Rage.Object("prop_notepad_02", PedsManager.LocalPlayer().Position);
            int         boneIndex = NativeFunction.Natives.GET_PED_BONE_INDEX <int>(PedsManager.LocalPlayer(), (int)PedBoneId.LeftThumb2);

            NativeFunction.Natives.ATTACH_ENTITY_TO_ENTITY(notepad, PedsManager.LocalPlayer(), boneIndex, 0f, 0f, 0f, 0f, 0f, 0f, true, false, false, false, 2, 1);
            PedsManager.LocalPlayer().Tasks.PlayAnimation("veh@busted_std", "issue_ticket_cop", 1f, AnimationFlags.Loop | AnimationFlags.UpperBodyOnly).WaitForCompletion(8000);
            notepad.Delete();

            vehicle.IsPersistent = false;
            PedsManager.LocalPlayer().Tasks.PlayAnimation("random@arrests", "generic_radio_enter", 0.7f, AnimationFlags.UpperBodyOnly | AnimationFlags.StayInEndFrame).WaitForCompletion(1500);
            GameFiber.Sleep(2000);
            FunctionsLSPDFR.PlayScannerAudioUsingPosition("INTRO_01 OFFICERS_REPORT_02 ILLEGALLY_PARKED_VEHICLE IN_OR_ON_POSITION INTRO_02  OUTRO_03 TARGET_VEHICLE_LICENCE_PLATE UHH" + licencePlateAudioMessage + " NOISE_SHORT CODE4_ADAM OFFICER_INTRO_02 PROCEED_WITH_PATROL NOISE_SHORT OUTRO_02", PedsManager.LocalPlayer().Position);
            PedsManager.LocalPlayer().Tasks.PlayAnimation("random@arrests", "generic_radio_exit", 1.0f, AnimationFlags.UpperBodyOnly);
            ParkingTicketsEventHandler.AlreadyGivedTicketsLicencePlateCollection.Add(vehicle.LicensePlate);
        }