Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ToastinYou

Members
  • Joined

  • Last visited

Everything posted by ToastinYou

  1. Wow I never knew you could do that. That would've made life so much easier for a few other things. Thank you lol I always tried to add references like using ToastyCallouts.Main.cs but it only allows folders so I was confused so had to work around it lol Thanks Albo, you're awesome :)
    Should have rated this a long time ago, great plugin! You always put out the best Albo and are extremely helpful and smart :)
  2. Sorry for the late reply, been working on other things. This did work, but I'm still getting the same error for IsLSPDFRPluginRunning (doesn't exist in current context). Shouldn't it be using the method created in Main.cs or do I have to create one in the callout.cs itself? Because the one from Main.cs doesn't seem to be connecting. Thank you by the way. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Rage; using Rage.Native; using LSPD_First_Response.Mod.API; using LSPD_First_Response.Mod.Callouts; using LSPD_First_Response.Engine.Scripting.Entities; using Traffic_Policer; using Traffic_Policer.Impairment_Tests; using ToastyCallouts; namespace ToastyCallouts.Callouts { [CalloutInfo("PublicIntoxication", CalloutProbability.Medium)] public class PublicIntoxication : Callout { public EVehicleBlockingTrafficState state; public Vector3 SpawnPoint; public Blip myBlip; public Ped mySuspect; public override bool OnBeforeCalloutDisplayed() { SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(1000f)); Game.LogTrivial("Create SpawnPoint."); mySuspect = new Ped(SpawnPoint); mySuspect.IsPersistent = true; mySuspect.BlockPermanentEvents = true; mySuspect.Armor = 69; if (IsLSPDFRPluginRunning("Traffic Policer", new Version("6.8.0.0"))) { TrafficPolicerFunctions.SetPedDrugsLevels(mySuspect, true, true); }
  3. EBackup.ResponseType.Code3.Police or something for backup. @Stealth22 can tell you if he isn't busy. Also, I believe if you spawn the new ped officer and then in rage look for something like Officer.IsDead = true;
  4. The answers are in there :) Go to line 131 of Functions.cs and find the issue. [09.06.2016 17:16:19.817] LSPD First Response: ? LSPD_First_Response.Mod.API.Functions.GetActivePursuit() ? E:\GTA V\LSPD First Response\LSPD First Response\Mod\API\Functions.cs:?????? 131 Go to line 359 of MainClass.cs to find the issue. [09.06.2016 17:16:19.819] ? MenuExample.EntryPoint.Process(Object sender, GraphicsEventArgs e) ? C:\Users\Yaroslav\documents\visual studio 2015\Projects\Megaphone\Megaphone\MainClass.cs:?????? 359 Go to line 579 in CalloutManager.cs and find the issue. [09.06.2016 17:16:21.035] ? ?????????????????????????????????????????.?????????????????????????????????????????() ? E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:?????? 579 If you still can't figure it out copy and paste those lines in the post. And I can help you.
  5. Log? @Fenix2525WOT Put CalloutPlugin.PDB in and recreate the crash if you haven't already, then send me the log.
  6. Documents > VS 2015 > Projects > Project Name > Project Name > Bin > Debug > use the .dll and use the .pdb for debugging.
  7. Read this (Sections 1-17 at least) http://rbwhitaker.wikidot.com/c-sharp-tutorials Watch this series (1-5 episodes) https://www.youtube.com/watch?v=M8eFhD-_UP0 Use GitHub for Examples (.INI too) https://github.com/LMSDev/LSPDFR-API 3) Use RPH console to ReloadAllPlugins after replacing the .dll of your plugin. 4) Game.DisplayNotification("Callout Ended.");
  8. It's something like Dispatch.RequestBackup.Fire I can let you know when I get home, don't have my computer handy. Maybe @Stealth22 knows what I'm talking about and has the code handy. Also, couldnt you use if (!PursuitIsRunning) { } ??
  9. To get player ped? What do you mean? Game.LocalPlayer ?
  10. Damn... I want that.
  11. You need to put the .PDB in the same folder that your .DLL is. If you don't it won't work. Also, if you have done that, look in RagePluginHookLog.txt in the root of GTA V and find the error. Note: I don't know if this is accurate as I have never used .PDB, as I test my callouts pretty much after I make one change that I am curious/malicious about.
  12. https://github.com/LMSDev/LSPDFR-API/tree/master/Utilities/IniFileDemo
  13. The only way to know is by trying it out :) worst it could do is crash your game.
  14. If you were to replace "ALL" the vehicles then you will notice extreme performance decrease and in some cases, common cases, your game will crash after adding so many extra mb/gb of cars.
  15. You cannot physically replace ALL of the vehicles.. Your game will crash, because modded vehicles are larger sizes than the originals, so GTA V will get overwhelmed and notice something is up. I replaced about 4 cars with realistic ones, they were huge files, had to remove them as I noticed a huge performance drop. Dropped about 10-15 fps. I recommend keeping default cars, and just replace Ambulance/FireTruck/Police cars and a couple cars, at most.
  16. Click HERE for the answer! :)
  17. Still doesn't work :/ Now SetPedAlcoholLevel says it doesn't exist in current context.. public static void SetPedAsDrunk(Ped ped) { SetPedAsDrunk(ped); SetPedAlcoholLevel(ped, Functions.GetRandomOverTheLimitAlcoholLevel()); }
  18. Because you have to create it yourself with the code you have used you put e.g. [Keybindings] TalkKey=T Put that in CalloutsC.ini
  19. What am I doing wrong here? I'm trying to make it so if someone breathalyze's a suspect in this callout with TrafficPolicer then it reads off they're drunk. In the following code from PublicIntoxication.cs it says "IsLSPDFRPluginRunning" and the error in VS says that the name does not exist in its current context. How can I fix this? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Rage; using Rage.Native; using LSPD_First_Response.Mod.API; using LSPD_First_Response.Mod.Callouts; using LSPD_First_Response.Engine.Scripting.Entities; using Traffic_Policer; using Traffic_Policer.Impairment_Tests; namespace ToastyCallouts.Callouts { [CalloutInfo("PublicIntoxication", CalloutProbability.Medium)] public class PublicIntoxication : Callout { public EVehicleBlockingTrafficState state; public Vector3 SpawnPoint; public Blip myBlip; public Ped mySuspect; public override bool OnBeforeCalloutDisplayed() { SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(1000f)); Game.LogTrivial("Create SpawnPoint."); mySuspect = new Ped(SpawnPoint); mySuspect.IsPersistent = true; mySuspect.BlockPermanentEvents = true; mySuspect.Armor = 69; if (IsLSPDFRPluginRunning("Traffic Policer", new Version("6.8.0.0"))) { TrafficPolicerFunctions.SetPedDrugsLevels(mySuspect, true, true); //Wrapper Method } Main.cs: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Rage; using Rage.Native; using LSPD_First_Response.Mod.API; using LSPD_First_Response.Mod.Callouts; using LSPD_First_Response.Engine.Scripting.Entities; using ToastyCallouts.Callouts; using ToastyCallouts; using Traffic_Policer; using System.Reflection; using System.Drawing; public class Main : Plugin { public override void Initialize() { Functions.OnOnDutyStateChanged += OnOnDutyStateChangedHandler; Game.LogTrivial("Plugin Unlimited Callouts " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + " has been initialised."); Game.LogTrivial("Go on duty to fully load Unlimited Callouts."); AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(LSPDFRResolveEventHandler); Settings.LoadSettings(); } public static Assembly LSPDFRResolveEventHandler(object sender, ResolveEventArgs args) { foreach (Assembly assembly in Functions.GetAllUserPlugins()) { if (args.Name.ToLower().Contains(assembly.GetName().Name.ToLower())) { return assembly; } } return null; } public static bool IsLSPDFRPluginRunning(string Plugin, Version minversion = null) { foreach (Assembly assembly in Functions.GetAllUserPlugins()) { AssemblyName an = assembly.GetName(); if (an.Name.ToLower() == Plugin.ToLower()) { if (minversion == null || an.Version.CompareTo(minversion) >= 0) { return true; } } } TrafficPolicerAPIFunctions.cs: using Traffic_Policer; using Traffic_Policer.API; using Rage; using System; using Traffic_Policer.Impairment_Tests; static class TrafficPolicerFunctions { public static bool IsVehicleInsured(Vehicle veh) { return Traffic_Policer.API.Functions.IsVehicleInsured(veh); } public static void DisplayInsuranceStatusForVehicle(Vehicle veh) { bool insurancestatus = IsVehicleInsured(veh); switch (insurancestatus) { case true: Game.DisplayNotification("~b~Mors Mutual Insurance Status: ~g~INSURED"); break; case false: Game.DisplayNotification("~b~Mors Mutual Insurance Status: ~r~UNINSURED"); break; } } public static void SetPedDrugsLevels(Ped ped, bool Cannabis, bool Cocaine) { Traffic_Policer.API.Functions.SetPedDrugsLevels(ped, Cannabis, Cocaine); } public static void SetPedAsDrunk(Ped ped) { SetPedAsDrunk(ped); SetPedAlcoholLevel(ped, Functions.GetRandomOverTheLimitAlcoholLevel()); } private static void SetPedAlcoholLevel(Ped ped, AlcoholLevels alcoholLevels) { Functions.GetRandomOverTheLimitAlcoholLevel(); } } Thank you for any and all help! <3
  20. When you cant like anymore posts because you hit limit of 30 >:( Thank you guys for all your help, much appreciated!
  21. Sounds easy enough, thanks! :) Thanks :)
  22. When the new version of RPH comes out how do you update your callout plugin to work with it? Is it as simple as switching out the references or do you have to change things in your code? I just want to be prepared so when it does come out I can know and hop right on it.
  23. To change the Color you do need another reference, "using System.Drawing;". To get this reference, click Project, Add Reference, click Assemblies then Framework, and look for System.Drawing or in the search box type System.Drawing and add the reference, then do using System.Drawing; and then you can do: //Create a blip which attaches itself to myShooter. myBlip = new Blip(myShooter); //Color the blip in Red. myBlip.Color = System.Drawing.Color.Red; //Create a GPS route to myShooter in yellow. myBlip.EnableRoute(System.Drawing.Color.Yellow); If you mean to have random turnouts, it's quite complicated for beginners, it took me a while to understand it at least. So, what I did was create different instances; such as OnScene, EnRoute, etc. This code would go right under your public Vehicle public Ped etc. //Create an enum to assign CalloutStates as None, EnRoute, OnScene, and DecisionMade (which is when myShooter chooses an ending randomly, we will get to that //in a little bit. enum CalloutStates { None = 0, EnRoute, OnScene, DecisionMade }; //And currently, our CalloutState is set to None, as LocalPlayer has not accepted the callout or even seen the callout displayed yet. CalloutStates CalloutState = CalloutStates.None; When the callout is accepted by LocalPlayer, we can set their status as EnRoute. CalloutState = CalloutStates.EnRoute; Now, we can set the LocalPlayer as OnScene if they are within a certain distance of the Vector3's x,y,z I have set (or you could do SpawnPoint). This means when the player gets less than or equal to 23 meters of the coords (or SpawnPoint if you change it from coords to SpawnPoint) then it'll tell the code he's on scene, then doing StartShootingScenario(); which is at the bottom of my code as a public Void so it isn't sitting in Process() being all annoying and cluttered up, so this makes it neat and tidy and organised. if (CalloutState == CalloutStates.EnRoute && Game.LocalPlayer.Character.Position.DistanceTo(new Vector3(-1758.445f, 125.273f, 64.774f)) <= 23f) { CalloutState = CalloutStates.OnScene; StartShootingScenario(); } So, after the "end" of End() we can create our new Public Void StartShootingScenario(); More information in the code after "//" //Put this after the end of End() which starts our StartShootingScenario. public void StartShootingScenario() { //ALWAYS START A NEW GAME FIBER IF YOU'RE GOING TO USE GameFiber.Sleep, DON'T SLEEP THE MAIN FIBER. GameFiber.StartNew(delegate { //Create the Pursuit this.Pursuit = Functions.CreatePursuit(); //Pick a random number, to choose a random outcome int r = new Random().Next(1, 4); //Set the state to decision made, since the outcome is chosen. CalloutState = CalloutStates.DecisionMade; Game.HideHelp(); //Execute one of the random outcomes if (r == 1) { //myVictim's 1 through 6 flee the scene. NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim1, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim2, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim3, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim4, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim5, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim6, myShooter); //We sleep the fiber for 3 seconds. GameFiber.Sleep(3000); //myShooter surrenders, putting his hands up for -1 (until prompted to do something else) and then facing Game.LocalPlayer.Character. myShooter.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); //Then myShooter drops his current weapon. NativeFunction.CallByName<uint>("SET_PED_DROPS_WEAPON", myShooter); //This is for realism, it displays a subtitle stating Officer (NAME IN INI FILE) suspect is surrendering, for 5 seconds. Game.DisplaySubtitle("~b~Officer " + Settings.OfficerName + "~w~: Dispatch, suspect is surrendering.", 5000); //Now for another random outcome if (new Random().Next(1, 3) == 2) { //The aggressor attacks the Victim. myShooter.Tasks.FireWeaponAt(myVictim1, 30000, FiringPattern.FullAutomatic); //The cops attack the shooter. myCopPed1.Tasks.FireWeaponAt(myShooter, 30000, FiringPattern.SingleShot); myCopPed2.Tasks.FireWeaponAt(myShooter, 30000, FiringPattern.SingleShot); Game.DisplaySubtitle("~b~Officer " + Settings.OfficerName + "~w~: SHOTS FIRED! GET SOME BACKUP HERE NOW!", 5000); GameFiber.Sleep(3000); Functions.PlayScannerAudio("NEED_BACKUP DISPATCH_SHOTS_FIRED REQUESTING_BACKUP"); //Vitims flee in panic. NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim1, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim2, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim3, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim4, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim5, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim6, myShooter); GameFiber.Sleep(5000); //This initialises our pursuit, you could do "if myShooter.IsAlive { Functions.AddPed blah blah } to make sure the game doesn't crash because the shooter is dead and so it can't create a pursuit. Functions.AddPedToPursuit(this.Pursuit, myShooter); } } else { //The aggressor doesn't attack the victim, instead, both peds flee. We don't need to tell the aggressor to flee, as LSPDFR's Pursuit system does that for us. NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim1, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim2, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim3, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim4, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim5, myShooter); NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", myVictim6, myShooter); GameFiber.Sleep(5000); Functions.AddPedToPursuit(this.Pursuit, myShooter); } //Dismiss the aggressor from our plugin myShooter.Dismiss(); //Dispatch a backup unit if myShooter is alive. if (myShooter.IsAlive) { Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.AirUnit); Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit); Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit); } }); } If you have any questions don't be afraid to ask! My code is still a work in progress so use Game.LogTrivial("Created Ped"); and stuff like that to debug any crashes or errors this code may contain as it isn't completely done or completely tested. Good luck!
  24. Well, I was noticing that my Firemen and Paramedics were disappearing after I looked at the suspect, as they were behind me. Hopefully it's fixed now that I have used IsPersistent on them. I'll let you know. I'll definitely change from Natives for that to Inv. Thank you!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.