Beispiel #1
0
        public override bool OnBeforeCalloutDisplayed()
        {
            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            this.CalloutMessage = "We have report of a stolen vehicle driving in " + area + ", available unit please respond.";

            string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
            string crimeMessage = "CRIM_A_STOLEN_VEHICLE";

            if (Common.GetRandomBool(0, 2, 1))
            {
                crimeMessage = "CRIM_A_CRIMINAL_IN_A_STOLEN_VEHICLE";
            }

            Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
Beispiel #2
0
        /// <summary>
        /// Called just before the callout message is being displayed. Return false if callout should be aborted.
        /// </summary>
        /// <returns>
        /// True if callout can be displayed, false if it should be aborted.
        /// </returns>
        public override bool OnBeforeCalloutDisplayed()
        {
            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            // Show user where callout is
            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            // Get area name
            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            this.CalloutMessage = string.Format("All units reports of a protest in progress, please advise.", area);


            // Play audio
            string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
            string crimeMessage = "CRIM_A_CIVIL_DISTURBANCE";

            if (Common.GetRandomBool(0, 2, 1))
            {
                crimeMessage = "CRIM_A_CIVIL_DISTURBANCE";
            }

            Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
Beispiel #3
0
        public override bool OnBeforeCalloutDisplayed()
        {
            spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);
            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            this.CalloutMessage = "We have report of random shooting in " + area + ", all units please respond.";

            string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
            string crimeMessage = "CRIM_A_SUSPECT_ARMED_AND_DANGEROUS";

            if (Common.GetRandomBool(0, 2, 1))
            {
                crimeMessage = "CRIM_CRIMINALS_DISTURBING_THE_PEACE";
            }

            Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
        public override bool OnBeforeCalloutDisplayed()
        {
            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            this.CalloutMessage = "Report of a prisoner transport truck has been hijacked in " + area + ", available unit please respond.";

            string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Officers);
            string crimeMessage = "CRIM_PRISON_BREAK";

            if (Common.GetRandomBool(0, 2, 1))
            {
                crimeMessage = "CRIM_A_CRIMINAL_RESISTING_ARREST";
            }

            Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
Beispiel #5
0
        /// <summary>
        /// Called just before the callout message is being displayed. Return false if callout should be aborted.
        /// </summary>
        /// <returns>
        /// True if callout can be displayed, false if it should be aborted.
        /// </returns>
        public override bool OnBeforeCalloutDisplayed()
        {
            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            // Show user where callout is
            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            // Get area name
            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_SHOOTOUT_MESSAGE"), area);


            // Play audio
            string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
            string crimeMessage = "CRIM_SHOTS_FIRED";

            if (Common.GetRandomBool(0, 2, 1))
            {
                crimeMessage = "CRIM_A_SHOOTING";
            }

            Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
        public override bool OnBeforeCalloutDisplayed()
        {
            spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);
            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            this.CalloutMessage = "Attention all units, terrorist attack in progress at " + area + ", all units please respond.";

            string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
            string crimeMessage = "CRIM_A_TERRORIST_ACTIVITY";

            if (Common.GetRandomBool(0, 2, 1))
            {
                crimeMessage = "CRIM_A_CRIMINAL_ON_A_GUN_SPREE";
            }

            Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
Beispiel #7
0
        /// <summary>
        /// Called just before the callout message is being displayed. Return false if callout should be aborted.
        /// </summary>
        /// <returns>
        /// True if callout can be displayed, false if it should be aborted.
        /// </returns>
        public override bool OnBeforeCalloutDisplayed()
        {
            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            // Show user where callout is
            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            // Get area name
            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            if (isOfficerCalledIn)
            {
                this.CalloutMessage = string.Format(Resources.CALLOUT_SV_NIKO_MESSAGE, area);

                // Play audio
                string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Officers);
                string crimeMessage = "CRIM_SHOTS_FIRED_AT_AN_OFFICER";
                if (Common.GetRandomBool(0, 2, 1))
                {
                    crimeMessage = "CRIM_AN_OFFICER_IN_DANGER_OF_FIREARM_DISCHARGE_FROM_SUSPECT";
                }

                Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION ALL_UNITS_PLEASE_RESPOND", this.spawnPoint.Position);
            }
            else
            {
                this.CalloutMessage = string.Format(Resources.CALLOUT_SV_NIKO_CIVIL_MSG, area);
                int rand = Common.GetRandomValue(0, 3);

                switch (rand)
                {
                // Play audio
                case 0:
                    string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
                    string crimeMessage = "CRIM_A_SUSPECT_ARMED_AND_DANGEROUS";
                    if (Common.GetRandomBool(0, 2, 1))
                    {
                        crimeMessage = "CRIM_CRIMINALS_DISTURBING_THE_PEACE";
                    }

                    Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);
                    break;

                case 1:
                    Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS INS_I_NEED_A_UNIT_FOR CRIM_POSSIBLE_TERRORIST_ACTIVITY IN_OR_ON_POSITION PLEASE_INVESTIGATE", this.spawnPoint.Position); break;

                case 2:
                    Functions.PlaySoundUsingPosition("THIS_IS_CONTROL UNITS_PLEASE_BE_ADVISED INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_TERRORIST_ACTIVITY IN_OR_ON_POSITION", this.spawnPoint.Position); break;
                }
            }

            return(base.OnBeforeCalloutDisplayed());
        }
Beispiel #8
0
        public override bool OnBeforeCalloutDisplayed()
        {
            CallType   = (EFirearmAttackType)Common.GetRandomEnumValue(typeof(EFirearmAttackType));
            spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);
            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            switch (CallType)
            {
            case EFirearmAttackType.Attack:
                string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);
                this.CalloutMessage = "We have report of Firearm Attack on an officer in " + area + ", all units please respond.";

                string audioMessageAt = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Officers);
                string crimeMessageAt = "CRIM_A_FIREARM_ATTACK_ON_AN_OFFICER";
                if (Common.GetRandomBool(0, 2, 1))
                {
                    crimeMessageAt = "CRIM_AN_OFFICER_ASSAULT";
                }

                Functions.PlaySoundUsingPosition(audioMessageAt + crimeMessageAt + " IN_OR_ON_POSITION", this.spawnPoint.Position);
                break;

            case EFirearmAttackType.TakingAim:
                string areaTA = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);
                this.CalloutMessage = "We have report of a suspect taking aim at an officer in " + areaTA + ", all units please respond.";

                string audioMessageTA = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Officers);
                string crimeMessageTA = "CRIM_A_FIREARM_ATTACK_ON_AN_OFFICER";
                if (Common.GetRandomBool(0, 2, 1))
                {
                    crimeMessageTA = "CRIM_AN_OFFICER_ASSAULT";
                }

                Functions.PlaySoundUsingPosition(audioMessageTA + crimeMessageTA + " IN_OR_ON_POSITION", this.spawnPoint.Position);
                break;

            case EFirearmAttackType.DrawGun:
                string areaDG = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);
                this.CalloutMessage = "We have report of a suspect holding a gun to officer, in " + areaDG + ".";

                string audioMessageDG = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Officers);
                string crimeMessageDG = "CRIM_A_TAKING_AIM_AT_OFFICER_WITH_A_FIREARM";
                Functions.PlaySoundUsingPosition(audioMessageDG + crimeMessageDG + " IN_OR_ON_POSITION", this.spawnPoint.Position);
                break;
            }
            return(base.OnBeforeCalloutDisplayed());
        }
Beispiel #9
0
        public override bool OnBeforeCalloutDisplayed()
        {
            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 20f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            return(base.OnBeforeCalloutDisplayed());
        }
        /// <summary>
        /// Called just before the callout message is being displayed. Return false if callout should be aborted.
        /// </summary>
        /// <returns>
        /// True if callout can be displayed, false if it should be aborted.
        /// </returns>
        public override bool OnBeforeCalloutDisplayed()
        {
            bool isReady = base.OnBeforeCalloutDisplayed();

            this.spawnPoint = Callout.GetSpawnPointInRange(LPlayer.LocalPlayer.Ped.Position, 100, 400);

            if (this.spawnPoint == SpawnPoint.Zero)
            {
                return(false);
            }

            // Show user where callout is
            this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPoint.Position, 50f);
            this.AddMinimumDistanceCheck(80f, this.spawnPoint.Position);

            // Get area name
            string area = Functions.GetAreaStringFromPosition(this.spawnPoint.Position);

            //this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_SHOOTOUT_MESSAGE"), area);

            // Play audio
            if (isOfficerCalledIn || isNGDRequestingAssistance)
            {
                int rand = Common.GetRandomValue(0, 3);
                switch (rand)
                {
                case 0:
                    this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("POLICE_SCANNER_OFFICER_ATTACKED"), area);
                    Functions.PlaySoundUsingPosition("THIS_IS_CONTROL INS_ALL_HANDS_TO CRIM_A_FIREARM_ATTACK_ON_AN_OFFICER IN_OR_ON_POSITION", this.spawnPoint.Position);
                    break;

                case 1:
                    this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("POLICE_SCANNER_OFFICER_ATTACKED"), area);
                    Functions.PlaySoundUsingPosition("THIS_IS_CONTROL INS_AVAILABLE_UNITS_RESPOND_TO CRIM_AN_OFFICER_ASSAULT IN_OR_ON_POSITION", this.spawnPoint.Position);
                    break;

                case 2:
                    this.CalloutMessage = string.Format(Resources.CALLOUT_SV_JOHNNY_MESSAGE, area);
                    string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Officers);
                    string crimeMessage = "CRIM_GANG_RELATED_VIOLENCE";
                    if (Common.GetRandomBool(0, 2, 1))
                    {
                        crimeMessage = "CRIM_CRIMINALS_DISTURBING_THE_PEACE";
                    }

                    Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);
                    break;
                }
            }
            else
            {
                this.CalloutMessage = string.Format(Resources.CALLOUT_SV_JOHNNY_MESSAGE, area);
                string audioMessage = Functions.CreateRandomAudioIntroString(EIntroReportedBy.Civilians);
                string crimeMessage = "CRIM_GANG_RELATED_VIOLENCE";
                if (Common.GetRandomBool(0, 2, 1))
                {
                    crimeMessage = "CRIM_A_DOMESTIC_DISTURBANCE";
                }

                Functions.PlaySoundUsingPosition(audioMessage + crimeMessage + " IN_OR_ON_POSITION", this.spawnPoint.Position);
            }

            return(isReady);
        }