-
Posts
51 -
Joined
-
Last visited
-
Days Won
1
Content Type
Forums
Gallery
Downloads
Tutorials
News Stories
Wiki
Community Guidelines
LSPDFR BOLO Series
GTA5 Native Database
GTA5 Native Parameters
Release Highlights
LSPDFR Mod Showcase
LML User Contributions
Posts posted by TAG1534
-
-
Hi there I am wondering how I can set spawn AI's names. As I want it to show the correct name when PED is stoped by STP of other methods as the name I have written into the script. Is there a way to do this. I have seen it before but i'm not sure if its still do-able.
Thanks Eli.
-
Sorry I know it is confusing haha, but yes both are the issue, I had already tried that "Fix" to get the peds to drive away. But if i do it that way. For some reason it won't register that I am close to the vehicle.. I'm sorry if i have confused you. But I do really appreciate your help..
Let me try another way.
After I spawn the "Ped" in and I warp it into the "SusVehicle".. I want them to drive away. You then "Follow" the car to find where they are and upon reaching "15f" Away from the "SusVehicle" i want it to initiate a pursuit. if that is possible.
-
Oh yeah I tried doing that, but it still won't register when I'm close to the vehicle and create a pursuit... I tried using Suspect.Tasks.CruiseWithVehicle(20f, VehicleFlags.Emergency) but the stage 3 ligting didn't affect him and would initiate a pursuit based on the distance I am to thr suspect ... if you understand sorry
-
Hi there, I am trying to make a callout for my Pack, but i can't seem to get the ped to drive away. I have used this line before (e.g Suspect.WarpIntoVehicle(SuspectVehicle, -1) and it makes the ped into the drivers seat, which its doing. But this time its not allowing the AI to drive away from the scene. I want it to drive away so I can make the player "Search" for the vehicle.
All code is written by me, and may not be optimised yet, but im trying top get it to work first. Any help much appreciated
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Rage; using LSPD_First_Response.Mod.API; using LSPD_First_Response.Mod.Callouts; using LSPD_First_Response.Engine.Scripting.Entities; namespace AmazingCallouts.Callouts { [CalloutInfo("[AC] Domestic Violence", CalloutProbability.Medium)] class DomesticViolence : Callout { private Ped Woman; private Ped Man; private Blip MaleBlip; private Blip FemaleBlip; private Vector3 Spawnpoint; private int counter; private LHandle Pursuit; private Vehicle SuspectVhicle; private Vector3 SuspectSpawnPoint; private bool Scene1 = false; private bool Scene2 = false; public override bool OnBeforeCalloutDisplayed() { Spawnpoint = new Vector3(2339.33f, 2640.771f, 46.36499f); ShowCalloutAreaBlipBeforeAccepting(Spawnpoint, 30f); AddMinimumDistanceCheck(30f, Spawnpoint); CalloutMessage = "Domestic Violence"; CalloutPosition = Spawnpoint; Functions.PlayScannerAudioUsingPosition("WE_HAVE CRIME_DISTURBING_THE_PEACE_01 IN_OR_ON_POSITION", Spawnpoint); return base.OnBeforeCalloutDisplayed(); } public override bool OnCalloutAccepted() { Game.LogTrivial("AmazingCallouts Log: Domestic Violence callout accepted."); counter = 0; switch (new Random().Next(1, 3)) { case 1: Scene1 = true; break; case 2: Scene2 = true; break; } if (Scene1 == true && Scene2 == false) { Woman = new Ped("a_f_o_salton_01", Spawnpoint, 0); ///"a_f_o_salton_01" ///Woman Is Innocent Woman.IsPersistent = true; Woman.BlockPermanentEvents = true; FemaleBlip = Woman.AttachBlip(); FemaleBlip.Color = System.Drawing.Color.Yellow; FemaleBlip.IsRouteEnabled = true; } if (Scene2 == true && Scene1 == false) { Man = new Ped("a_m_o_acult_02", Spawnpoint, 0); ///"a_m_o_acult_02" ///Man Is Innocent Man.IsPersistent = true; Man.BlockPermanentEvents = true; MaleBlip = Man.AttachBlip(); MaleBlip.Color = System.Drawing.Color.Yellow; MaleBlip.IsRouteEnabled = true; } return base.OnCalloutAccepted(); } public override void Process() { base.Process(); if (Scene1 == true && Scene2 == false && Game.LocalPlayer.Character.DistanceTo(Spawnpoint) <= 10f) ///Woman Is Innocent { Game.DisplayHelp("Press '" + Settings.Dialog + "' To Talk to the suspect"); if (Game.IsKeyDown(Settings.Dialog)) { counter++; if (counter == 1) { Game.DisplaySubtitle(Settings.PlayerName + ": Hello Ma'am, there has been a report of Domestic Violence. Are you in any trouble?"); } if (counter == 2) { Game.DisplaySubtitle("Lady: Hi there officer, yes that is correct. My Husband hit me and then took off."); } if (counter == 3) { Game.DisplaySubtitle(Settings.PlayerName + ": Ok, Do you know what he was wearing? Which way he went? and what make and color the car is?"); } if (counter == 4) { Game.DisplaySubtitle("Lady: Im sorry, I can't remember what he was wearing. It was all a bit blurry afterwards. But he went 'That way'."); } if (counter == 5) { Game.DisplaySubtitle("Lady: The car is a 'Sadler' if that is any help"); } if (counter == 6) { Game.DisplaySubtitle(Settings.PlayerName + ": Thank you ma'am, that is pleanty of help, Myself and some other officers will be on the lookout him."); } if (counter == 7) { Game.DisplaySubtitle(Settings.PlayerName + ": For the meantime, do you need any Medical Assintance?"); } if (counter == 8) { Game.DisplaySubtitle("Lady: Yes please, that would be much appreciated"); } if (counter == 9) { Game.DisplaySubtitle(Settings.PlayerName + ": No worries, I will call for EMS to come check you out ma'am"); } if (counter == 10) { Game.DisplaySubtitle("NO MORE DIALOUGE. CALL FOR EMS AND PROCED TO LOOK FOR SUSPECT."); SuspectSpawnPoint = new Vector3(2551.485f, 2495.719f, 32.02878f); SuspectVhicle = new Vehicle("SADLER", SuspectSpawnPoint); SuspectVhicle.IsPersistent = true; Man = new Ped("a_m_o_acult_02", SuspectVhicle.GetOffsetPositionFront(5f), 0); Man.IsPersistent = true; Man.BlockPermanentEvents = true; MaleBlip = Man.AttachBlip(); MaleBlip.Color = System.Drawing.Color.Red; MaleBlip.IsRouteEnabled = true; FemaleBlip.Delete(); Woman.Dismiss(); Man.WarpIntoVehicle(SuspectVhicle, -1); if (Game.LocalPlayer.Character.DistanceTo(SuspectVhicle.Position) <= 20f) { Pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(Pursuit, Man); Functions.SetPursuitIsActiveForPlayer(Pursuit, true); } if (Man.IsCuffed || Man.IsDead) End(); } } } if (Scene2 == true && Scene1 == false && Game.LocalPlayer.Character.DistanceTo(Spawnpoint) <= 10f) ///Man Is Innocent { Game.DisplayHelp("Press '" + Settings.Dialog + "' To Talk to the suspect"); if (Game.IsKeyDown(Settings.Dialog)) { counter++; if (counter == 1) { Game.DisplaySubtitle(Settings.PlayerName + ": Hello Sir, there has been a report of Domestic Violence. Are you in any trouble?"); } if (counter == 2) { Game.DisplaySubtitle("Man: Hi there officer, yes that is correct. My Wife hit me and then took off."); } if (counter == 3) { Game.DisplaySubtitle(Settings.PlayerName + ": Ok, Do you know what she was wearing? Which way she went? and what make and color the car is?"); } if (counter == 4) { Game.DisplaySubtitle("Man: Im sorry, I can't remember what she was wearing. It was all a bit blurry afterwards. But she went 'That way'."); } if (counter == 5) { Game.DisplaySubtitle("Man: The car is a 'Sadler' if that is any help"); } if (counter == 6) { Game.DisplaySubtitle(Settings.PlayerName + ": Thank you Sir, that is pleanty of help, Myself and some other officers will be on the lookout her."); } if (counter == 7) { Game.DisplaySubtitle(Settings.PlayerName + ": For the meantime, do you need any Medical Assintance?"); } if (counter == 8) { Game.DisplaySubtitle("Man: Yes please, that would be much appreciated"); } if (counter == 9) { Game.DisplaySubtitle(Settings.PlayerName + ": No worries, I will call for EMS to come check you out Sir"); } if (counter == 10) { Game.DisplaySubtitle("NO MORE DIALOUGE. CALL FOR EMS AND PROCED TO LOOK FOR SUSPECT."); SuspectSpawnPoint = new Vector3(2551.485f, 2495.719f, 32.02878f); SuspectVhicle = new Vehicle("SADLER", SuspectSpawnPoint); SuspectVhicle.IsPersistent = true; Woman = new Ped("a_f_o_salton_01", SuspectVhicle.GetOffsetPositionFront(5f), 0); Woman.IsPersistent = true; Woman.BlockPermanentEvents = true; FemaleBlip = Woman.AttachBlip(); FemaleBlip.Color = System.Drawing.Color.Red; FemaleBlip.IsRouteEnabled = true; MaleBlip.Delete(); Man.Dismiss(); Woman.WarpIntoVehicle(SuspectVhicle, -1); if (Game.LocalPlayer.Character.DistanceTo(SuspectVhicle.Position) <= 20f) { Pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(Pursuit, Woman); Functions.SetPursuitIsActiveForPlayer(Pursuit, true); } if (Woman.IsCuffed || Woman.IsDead) End(); } } } if (Game.LocalPlayer.Character.IsDead) End(); if (Game.IsKeyDown(Settings.EndCall)) End(); } public override void End() { if (Man.Exists()) Man.Dismiss(); if (Woman.Exists()) Woman.Dismiss(); if (FemaleBlip.Exists()) FemaleBlip.Delete(); if (MaleBlip.Exists()) MaleBlip.Delete(); if (SuspectVhicle.Exists()) SuspectVhicle.Dismiss(); Game.LogTrivial("Amazing Callouts - Domestic Violence has been cleaned up"); base.End(); } } }

.png.fdab16d62ab8306ef34cec59284f4b12.png.9d5e6cf9427ad028178843acb6c725cb.png)
Callout will load and only work once
in API Development
Posted
Hey guys. I have made a callout and It will only load and work once. After accepting the callout and playing through it. If you try to play the callout again it will just end callout straight away after accepting? I'm not sure what I have done wrong as I have made many other callouts the same way and neve had the issue. Any help is awesome as I'm really confused and now annoyed lol
NVM I am so sorry I have fixed it... I added a maximum distance check instead of minimum distance check... Waste of yall's time sorry