Everything posted by Mytical49
-
La dernière version mise à jour de RAGE Plugin Hook
Salut, @james.D, elle n'est pas sortie officiellement mais tu peux la trouver dans le dossier d'installation de LSPDFR
-
Mon jeu est incompatible avec rage
Salut @Noah878475878, elle est pas sorti sur le site de rage mais tu peux la trouver dans le dossier lspdfr pour l'installation, donc installe juste lspdfr et pas rage
-
bug d'affichage
Salut, pour nous aidez je te conseiller de mettre ton RagePluginHook.log situé dans les fichiers du jeu
-
LSPDFR forced termination when loading
I agree with you that probably the custom stations
-
LSPDFR crashed at random times.
Whats mods do you use ?
-
[SOLVED] My callout is never dispatched
I finally solved the problem by looking if my callout was registered in rage (I thought so because it was displayed in Callout Interface), and it turned out that it was not registered, so there was a problem on recording the callout. I was misled because I followed this tutorial by @SneakySteve which shows that you have to use a certain method to register the callout, it doesn't seem to work. So I followed the tutorial of master @Albo1125 and it now works. PS: pay attention to the order of your code for example this will not work because "suspect" has not been created yet, so make sure everything exist and is in order : public override bool OnCalloutAccepted() { Game.DisplayNotification("OnCalloutAccepted"); suspectVehicle = new Vehicle("POLICE2", spawnPoint); suspectVehicle.IsPersistent = true; suspect.WarpIntoVehicle(suspectVehicle, -1); //suspect is not created yet so we can't put him in the vehicule suspect = suspectVehicle.CreateRandomDriver(); //suspect is create here suspect.IsPersistent = true; suspect.BlockPermanentEvents = true; blip = suspect.AttachBlip(); blip.Color = Color.Red; blip.IsRouteEnabled = true; return base.OnCalloutAccepted(); } thanks you for helping me !
-
Make the suspect in the vehicle shoot
What's the difference ?
-
Could not load file or assembly LSPD First Response
I don't know if you did it but look at your dependencies in visual studio you may be missing some but normally you should have had an error in your code before building it
-
[SOLVED] My callout is never dispatched
@LMS I have also just discovered that if I want to force the callout via rage I cannot because it is not there, but in Callout Interface it is well registered. What does it mean ?
-
[SOLVED] My callout is never dispatched
Yes I did, I just created a github repository to facilitate the help, note that when I want to force the callout with callout interface I have an error: [3/29/2022 6:20:10 PM.331] LSPD First Response: CalloutInterface: [DEBUG] user selected callout SimplePursuitMytical from menu [3/29/2022 6:20:10 PM.358] LSPD First Response: CalloutInterface: [INFO] starting callout SimplePursuitMytical [3/29/2022 6:20:10 PM.358] LSPD First Response: CalloutInterface: [DEBUG] waiting for callout delay: 1 s [3/29/2022 6:20:11 PM.382] LSPD First Response: CalloutInterface: [DEBUG] starting callout: SimplePursuitMytical [3/29/2022 6:20:12 PM.405] LSPD First Response: CalloutInterface: [WARNING] attempted to start callout SimplePursuitMytical but nothing happened [3/29/2022 6:20:13 PM.290] LSPD First Response: [TRACE] Preloading POLICE [3/29/2022 6:20:13 PM.290] LSPD First Response: [TRACE] Preloading MP_M_FREEMODE_01 [3/29/2022 6:20:13 PM.339] LSPD First Response: [TRACE] Preloading POLICE [3/29/2022 6:20:13 PM.340] LSPD First Response: [TRACE] Created police at X:197.4658 Y:-1036.796 Z:29.63838 [3/29/2022 6:20:13 PM.368] LSPD First Response: [TRACE] Preloading MP_M_FREEMODE_01 [3/29/2022 6:20:13 PM.375] LSPD First Response: [TRACE] New ped created mp_m_freemode_01 (PedType: 6), Agency: CityPolice () [3/29/2022 6:20:13 PM.382] LSPD First Response: [TRACE] Jon Macerry (MP_M_FREEMODE_01) was set as a cop [3/29/2022 6:20:13 PM.401] LSPD First Response: [TRACE] Preloading MP_M_FREEMODE_01 [3/29/2022 6:20:13 PM.408] LSPD First Response: [TRACE] New ped created mp_m_freemode_01 (PedType: 6), Agency: CityPolice () [3/29/2022 6:20:13 PM.414] LSPD First Response: [TRACE] George Kingsford (MP_M_FREEMODE_01) was set as a cop [3/29/2022 6:20:13 PM.432] LSPD First Response: [TRACE] AmbientSpawn - spawned: police [3/29/2022 6:20:38 PM.370] LSPD First Response: [TRACE] Preloading POLICE2 [3/29/2022 6:20:38 PM.371] LSPD First Response: [TRACE] Preloading MP_F_FREEMODE_01 [3/29/2022 6:20:38 PM.418] LSPD First Response: [TRACE] Preloading POLICE2 [3/29/2022 6:20:38 PM.419] LSPD First Response: [TRACE] Created police2 at X:216.0066 Y:-728.9883 Z:35.05275 [3/29/2022 6:20:38 PM.446] LSPD First Response: [TRACE] Preloading MP_F_FREEMODE_01 [3/29/2022 6:20:38 PM.452] LSPD First Response: [TRACE] New ped created mp_f_freemode_01 (PedType: 6), Agency: CityPolice () [3/29/2022 6:20:38 PM.497] LSPD First Response: [TRACE] Cached 1360 decorators for index 4 [3/29/2022 6:20:38 PM.503] LSPD First Response: [TRACE] Kate Lotter (MP_F_FREEMODE_01) was set as a cop [3/29/2022 6:20:38 PM.635] LSPD First Response: [TRACE] Preloading MP_F_FREEMODE_01 [3/29/2022 6:20:38 PM.642] LSPD First Response: [TRACE] New ped created mp_f_freemode_01 (PedType: 6), Agency: CityPolice () [3/29/2022 6:20:38 PM.648] LSPD First Response: [TRACE] Banko Jerem (MP_F_FREEMODE_01) was set as a cop [3/29/2022 6:20:38 PM.669] LSPD First Response: [TRACE] AmbientSpawn - spawned: police2 [3/29/2022 6:20:42 PM.513] LSPD First Response: [TRACE] It has been 33 seconds since the last callout [3/29/2022 6:20:42 PM.513] LSPD First Response: Creating IBuauNedmbmVEYLDmNmoYfNfCcVYA from IBuauNedmbmVEYLDmNmoYfNfCcVYA, LSPD First Response, Version=0.4.8037.37597, Culture=neutral, PublicKeyToken=null [3/29/2022 6:20:42 PM.514] LSPD First Response: GetAudioFileForAction: No file found for: STREET_DEL_PERRO_FREEWAY [3/29/2022 6:20:42 PM.515] LSPD First Response: [TRACE] Preloading BISON [3/29/2022 6:20:42 PM.515] LSPD First Response: [TRACE] Callout created: Pursuit #4 [3/29/2022 6:20:42 PM.516] LSPD First Response: CalloutInterface: [ERROR] There is something wrong with your RAGE World Datetime [3/29/2022 6:20:42 PM.517] LSPD First Response: CalloutInterface: [ERROR] Year, Month, and Day parameters describe an un-representable DateTime. [3/29/2022 6:20:42 PM.519] LSPD First Response: CalloutInterface: [DEBUG] at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) [3/29/2022 6:20:42 PM.519] at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second) [3/29/2022 6:20:42 PM.519] at Rage.World.get_DateTime() [3/29/2022 6:20:42 PM.519] at CalloutInterface.API.Functions.GetDateTime() [3/29/2022 6:20:42 PM.519] LSPD First Response: CalloutInterface: [ERROR] There is something wrong with your RAGE World Datetime [3/29/2022 6:20:42 PM.519] LSPD First Response: CalloutInterface: [ERROR] Year, Month, and Day parameters describe an un-representable DateTime. [3/29/2022 6:20:42 PM.519] LSPD First Response: CalloutInterface: [DEBUG] at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) [3/29/2022 6:20:42 PM.519] at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second) [3/29/2022 6:20:42 PM.519] at Rage.World.get_DateTime() [3/29/2022 6:20:42 PM.519] at CalloutInterface.API.Functions.GetDateTime() [3/29/2022 6:20:42 PM.520] LSPD First Response: CalloutInterface: [ERROR] There is something wrong with your RAGE World Datetime [3/29/2022 6:20:42 PM.520] LSPD First Response: CalloutInterface: [ERROR] Year, Month, and Day parameters describe an un-representable DateTime. [3/29/2022 6:20:42 PM.520] LSPD First Response: CalloutInterface: [DEBUG] at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) [3/29/2022 6:20:42 PM.520] at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second) [3/29/2022 6:20:42 PM.520] at Rage.World.get_DateTime() [3/29/2022 6:20:42 PM.520] at CalloutInterface.API.Functions.GetDateTime() [3/29/2022 6:20:42 PM.520] LSPD First Response: CalloutInterface: [ERROR] There is something wrong with your RAGE World Datetime [3/29/2022 6:20:42 PM.520] LSPD First Response: CalloutInterface: [ERROR] Year, Month, and Day parameters describe an un-representable DateTime. [3/29/2022 6:20:42 PM.520] LSPD First Response: CalloutInterface: [DEBUG] at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) [3/29/2022 6:20:42 PM.520] at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second) [3/29/2022 6:20:42 PM.520] at Rage.World.get_DateTime() [3/29/2022 6:20:42 PM.520] at CalloutInterface.API.Functions.GetDateTime()
-
[SOLVED] My callout is never dispatched
Hi, does anyone know why this basic chase code doesn't work, it never spawns naturally with dispatch and when I want to spawn it with Callout Interface it doesn't work either. The Callout : (ignore the comment) using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using LSPD_First_Response.Mod.Callouts; using LSPD_First_Response.Mod.API; using Rage; using System.Drawing; using Rage.Native; namespace Mytical_Callout.Callouts { [CalloutInfo("SimplePursuit", CalloutProbability.High)] class SimplePursuit : Callout { private Blip blip; private Vector3 spawnPoint; private Ped suspect; //private Ped suspect2; private Vehicle suspectVehicle; private LHandle pursuit; private bool pursuitCreated; public override bool OnBeforeCalloutDisplayed() { Game.DisplayNotification("OnBeforeCalloutDisplayed"); spawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(300f)); ShowCalloutAreaBlipBeforeAccepting(spawnPoint, 30f); AddMinimumDistanceCheck(30f, spawnPoint); CalloutMessage = "THIIIIIIIIIIIISSSSSSSSSSOOOOOOONNNNNNNNNEEEEEEEEEEPoursuit!"; CalloutPosition = spawnPoint; CalloutAdvisory = "THHHHHHHHHIIIIIIIIIISSSSSSSSSSSOOOOOOOOONBNNNNNNNNNNNNEEEEEEEEEa pursuit is in progress!"; Functions.PlayScannerAudioUsingPosition("WE_HAVE CRIME_RESIST_ARREST_04 IN_OR_ON_POSITION", spawnPoint); return base.OnBeforeCalloutDisplayed(); } public override bool OnCalloutAccepted() { Game.DisplayNotification("OnCalloutAccepted"); suspectVehicle = new Vehicle("KURUMA", spawnPoint); suspectVehicle.IsPersistent = true; suspect = new Ped(spawnPoint); suspect.IsPersistent = true; suspect.BlockPermanentEvents = true; //suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", -1, true); suspect.WarpIntoVehicle(suspectVehicle, -1); /* suspect2 = new Ped(suspectVehicle.GetOffsetPositionFront(5f)); suspect2.IsPersistent = true; suspect2.BlockPermanentEvents = true; suspect2.Inventory.GiveNewWeapon("WEAPON_ASSAULTRIFLE", -1, true); suspect2.WarpIntoVehicle(suspectVehicle, 2); */ blip = suspect.AttachBlip(); blip.Color = Color.Red; blip.IsRouteEnabled = true; pursuitCreated = false; return base.OnCalloutAccepted(); } public override void Process() { Game.DisplayNotification("Process"); if (!pursuitCreated && Game.LocalPlayer.Character.DistanceTo(suspectVehicle) <= 100f) { blip.Delete(); pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, suspect); Functions.SetPursuitIsActiveForPlayer(pursuit, true); pursuitCreated = true; } /* if (Game.LocalPlayer.Character.DistanceTo(suspectVehicle) <= 5f) { NativeFunction.Natives.TASK_OPEN_VEHICLE_DOOR(suspect2, suspectVehicle, 18000, 2, 1.47f); Game.DisplayNotification("SHOT FIRED !"); NativeFunction.Natives.SetPedCombatAttributes(suspect, 1, true); suspect.Tasks.FightAgainst(Game.LocalPlayer.Character); Functions.PlayScannerAudio("WE_HAVE CRIME_SHOTS_FIRED_01"); } if (Game.LocalPlayer.GetFreeAimingTarget() || Game.LocalPlayer.Character.IsDoingDriveby == suspect || suspectVehicle) { NativeFunction.Natives.TASK_OPEN_VEHICLE_DOOR(suspect2, suspectVehicle, 18000, 2, 1.47f); suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", -1, true); Game.DisplayNotification("SHOT FIRED !"); NativeFunction.Natives.SetPedCombatAttributes(suspect, 1, true); suspect.Tasks.FightAgainst(Game.LocalPlayer.Character); Functions.PlayScannerAudio("WE_HAVE CRIME_SHOTS_FIRED_01"); } if (!suspect.IsOnFoot) { Game.DisplayNotification("IS ON FOOT !"); suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", -1, true); suspect.Tasks.FightAgainst(Game.LocalPlayer.Character); suspect.Tasks.FireWeaponAt(Game.LocalPlayer.Character, 20000, FiringPattern.BurstFirePistol); } if (suspect.IsOnFoot) { Game.DisplayNotification("IS ON FOOT"); suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", -1, true); suspect.Tasks.FightAgainst(Game.LocalPlayer.Character); suspect.Tasks.FireWeaponAt(Game.LocalPlayer.Character, 20000,FiringPattern.BurstFirePistol); } if (Game.LocalPlayer.Character.IsShooting) { Game.DisplayNotification("IS SHOOTING"); suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", -1, true); NativeFunction.Natives.TASK_OPEN_VEHICLE_DOOR(suspect2,suspectVehicle, 18000, 2, 1.47f); suspect.Tasks.FightAgainst(Game.LocalPlayer.Character); suspect.Tasks.FireWeaponAt(Game.LocalPlayer.Character, 20000, FiringPattern.BurstFirePistol); }*/ if (pursuitCreated && !Functions.IsPursuitStillRunning(pursuit)) { End(); } base.Process(); } public override void End() { Game.DisplayNotification("End"); base.End(); if (suspect.Exists()) { suspect.Dismiss(); } if (blip.Exists()) { blip.Delete(); } if (suspectVehicle.Exists()) { suspectVehicle.Delete(); } Game.LogTrivial("Mytical Callout cleaned up."); } } } RagePluginHook.log
-
Make the suspect in the vehicle shoot
Hi, I'm new to c# and script programming, in this basic chase script I would like to add that when we shoot the car or the suspect during the chase he pulls out a gun and shoots us.I must have made mistakes please be indulgent. if (Game.LocalPlayer.GetFreeAimingTarget() || Game.LocalPlayer.Character.IsDoingDriveby == suspect || suspectVehicle) { suspect.Inventory.GiveNewWeapon("WEAPON_PISTOL", -1, true);// give the suspect a weapon Game.DisplayNotification("SHOT FIRED !"); // that just for know if the "if" work well (but it never worked NativeFunction.Natives.SetPedCombatAttributes(suspect, 1, true); //I saw in a topic that it was to keep the suspect in the vehicle suspect.Tasks.FightAgainst(Game.LocalPlayer.Character);//make the suspect fight against me Functions.PlayScannerAudio("WE_HAVE CRIME_SHOTS_FIRED_01"); } Do i need to use the method so that the suspect smash the window ?