Jump to content

The Shroom

  • Content Count

  • Joined

  • Last visited

1 Follower

About The Shroom

  • Rank

Profile Information

  • Country
  • Gender

Recent Profile Visitors

359 profile views
  1. I'm having some issues regarding tasks in my callout. Whenever I set the task to do anything, it is always interrupted when I come to close and the Ped/Suspect starts running away in panic. In this case I'm trying to make the suspect flee the player, and if he gets too close, start shooting at him instead. But, when the player gets close, the ped starts running away. I have set the Suspects "BlockPermanentEvents" to true, but it doesn't fix my issue. My current code looks like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LSPD_First_Response; using LSPD_First_Response.Engine.Scripting.Entities; using LSPD_First_Response.Mod.API; using LSPD_First_Response.Mod.Callouts; using Rage; namespace Shroom.Callouts { [CalloutInfo("Panic Button", CalloutProbability.Always)] public class PanicButton : Callout { private Ped attacker; private Blip attackerBlip; private Vector3 calloutSpawn; private LHandle pursuit; enum AttackerStatus { None, Attacking, Running } private AttackerStatus attackerStatus; public override bool OnBeforeCalloutDisplayed() { calloutSpawn = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(250f)); ShowCalloutAreaBlipBeforeAccepting(calloutSpawn, 30f); AddMinimumDistanceCheck(20f, calloutSpawn); CalloutMessage = "Panic Button"; CalloutPosition = calloutSpawn; Functions.PlayScannerAudioUsingPosition("UNITS_RESPOND_CODE_99_01", CalloutPosition); return base.OnBeforeCalloutDisplayed(); } public override bool OnCalloutAccepted() { attacker = new Ped(calloutSpawn, 0f); attackerBlip = new Blip(attacker); attackerBlip.IsFriendly = false; attacker.IsPersistent = true; attacker.KeepTasks = true; attacker.BlockPermanentEvents = true; attacker.CanAttackFriendlies = true; pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, attacker); Functions.SetPursuitCopsCanJoin(pursuit, true); Functions.SetPursuitIsActiveForPlayer(pursuit, true); attacker.Inventory.GiveNewWeapon(WeaponHash.Pistol, 100, true); return base.OnCalloutAccepted(); } public override void Process() { base.Process(); if (attacker.Exists()) { if (Functions.IsPedArrested(attacker) || Functions.IsPedInPrison(attacker)) { End(); } } if (!Functions.IsPursuitStillRunning(pursuit)) { End(); } if (attackerStatus == AttackerStatus.None) { attackerStatus = AttackerStatus.Running; attacker.Tasks.Flee(Game.LocalPlayer.Character, int.MaxValue, int.MaxValue); } else if(attackerStatus == AttackerStatus.Running && Game.LocalPlayer.Character.Position.DistanceTo(attacker.Position) < 20f) { Vector3 firingPosition = new Vector3(Game.LocalPlayer.Character.Position.X, Game.LocalPlayer.Character.Position.Y - 10f, Game.LocalPlayer.Character.Position.Z); attackerStatus = AttackerStatus.Attacking; attacker.Tasks.FireWeaponAt(firingPosition, int.MaxValue, FiringPattern.SingleShot); } } public override void End() { base.End(); if (attacker.Exists()) { attacker.Dismiss(); if (attackerBlip.Exists()) attackerBlip.Delete(); } } } }
    Amazing mod, perfect for when LSPDFR crashes, a callout doesn't work properly, or some developer forgets to clean up their callout when it has ended.
  2. Yes I did have RageNativeUI installed, so decided to try the 1.6 one instead but it wouldn't allow me to open the zip file, so had to compile the source myself instead. But that didn't work either. Same error and LSPDFR crash as I had before when trying to use ForceDuty or going on duty at PD. :/
  3. I'm not expert, but to me it looks like you need to : 1. Update Albo1125.Commons.dll So, first off you should update your Albo1125.Commons.dll file, here's a download link for that >http://www.lcpdfr.com/files/file/10294-albo1125common/< You just place the DLL file into your root GTA V directory. (Same directory where you found the RagePluginHook.log file) If this solves your problem(s) you can probably skip step 2. 2. Remove AgencyCallouts If however step 1 did not solve your issue you will probably need to remove your AgencyCallouts plugin. As far as I can see it seems to be causing the crash in your case (but like I said, I'm no expert), so try removing that. (It should be located in your "Grand Theft Auto V/Plugins/LSPDFR" folder)
  4. Can you post the content of your RagePluginHook.log file here? (It should be located in the root directory of GTA, aka in the Grand Theft Auto V folder)
  5. Update : So apparently using the "ForceDuty" command actually makes me go on duty (but none of the police-related features actually work), so I tried going off duty by going to a police station which resulted in LSPDFR crashing, and then a infinite black loading screen (Image Example) This time LSPDFR crashed with this in the RPH log : Again some swedish in the exception message, it translates to "object reference not set to an instance of an object". Update 2 : If I launch the game and go to a police station and go on duty that way it will work as long as I don't use the ForceDuty command. However it still leads to the same error as in the original post and none of the police-stuff such as getting calls and stopping vehicles works. (It also displays the same error as original post in RPH log)
  6. I'm having a problem where every time I try to use the console command "ForceDuty", LSPDFR crashes because of an unhandled exception. I've removed several plugins (however I doubt this is why it's crashing since it crashes before it actually loads in any plugins, or at least that's what the RPH logs say), and I've reinstalled both LSPDFR and RPH. This is what the RPH log looks like : The exception message is in Swedish and basically says that "The process cannot open the file D:\Program Files\Rockstar Games\Grand Theft Auto V\plugins\lspdfr\LSPD First Response.dll because the file is being used by another process". Since it told me that i assume I somehow had it open in a program, or maybe that my visual studio was using it because it's in the references list, however that was not the case. I restarted the PC as well, which should close all applications that use the file, however that also didn't work. But the weird thing is that when I manually try to remove the LSPD First Response.dll file it works fine, no warning/error about another process using it.
  • Create New...