Jump to content

jordRiot

Members
  • Posts

    10
  • Joined

  • Last visited

 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

Everything posted by jordRiot

  1. Evening all, Does anyone know the available argument names for the individual callouts available in LCPDFR? As in, when using the Console command "StartCallout [calloutname]". I know "Shooting", "Mugging", "DrugDeal" and "DrunkDriver" but there are more!! Cheers, J
  2. Sharing is caring and all that jazz... so it appears to work perfectly fine using the GTA Native Function rather than the LCPDFR function. Which for those who are interested is: if (GTA.Native.Function.Call<bool>("HAS_CHAR_SPOTTED_CHAR",criminal.GPed.Model.Handle,LPlayer.LocalPlayer.Ped.GPed.pHandle)) instead of the current: if (criminal.HasSpottedPed(LPlayer.LocalPlayer.Ped, false)) To explain the parameters, argument 1 is the HANDLE (int) of the character doing the spotting and argument 2 is the HANDLE (int) of the character to be spotted and it returns true or false. It is however a 360degree detection on it's own!
  3. :( I'll attempt the other potential solutions :) EDIT: Copied the pdb into the plugins folder alongside my dll but it doesn't produce an output ;/
  4. Good Evening one and all, Another one for y'all to ponder... if (this.IsPrankCall) { DelayedCaller.Call( delegate { // Tell control it was a prank Functions.PlaySound("EMERG_PRANK_CALL", true, false); Functions.PrintText(Functions.GetStringFromLanguageFile("CALLOUT_SHOOTOUT_PRANK_END"), 5000); Functions.AddTextToTextwall(Functions.GetStringFromLanguageFile("CALLOUT_SHOOTOUT_PRANK_END_TW"), Functions.GetStringFromLanguageFile("POLICE_SCANNER_CONTROL")); this.End(); }, this, 10000); this.State = EShootoutState.Prank; } else { Log.Info("WAITING FOR SPOT", this); bool playerHasBeenSpotted = false; bool randomFight = Common.GetRandomBool(0, 300, 1); // Check whether player has been spotted foreach (LPed criminal in this.criminals) { Log.Info("LOOP THROUGH CRIMINALSx", this); if (criminal.Exists()) { Log.Info("CRIMINAL EXISTS", this); if (criminal.HasSpottedPed(LPlayer.LocalPlayer.Ped, false)) { Log.Info("POLICE SPOTTED", this); playerHasBeenSpotted = true; break; } } } Log.Info("IF SPOTTED", this); // If player has been spotted if (playerHasBeenSpotted || randomFight) { this.State = EShootoutState.Fighting; this.Engage(); Functions.PrintText(Functions.GetStringFromLanguageFile("CALLOUT_SHOOTOUT_FIGHT_SUSPECTS"), 5000); } } With regards to the above section of code, I've placed a number of Log.Info's to trace the crash, if the call turns out to be a prank, then it works fine and Ends however if not, and it ends up in the latter ELSE statement, the last log I get is "CRIMINAL EXISTS" which would leave me to believe that that the "HasSpottedPed" is causing a crash...any ideas why?! Mainly aimed at LMS tbh, as you're the most likely to understand the function :) Thanks! J
  5. cp702, I think you've hit it on the head. Something like that would be both beneficial to what I was hoping to achieve but also work in the long-run for any other plugins that get developed in the future. LMS if you could try and include this in the next build, I certainly would be grateful and I'm sure others will be too. Cheers Guys.
  6. Bingo... I can obviously detect my own, but ideally wanted to be made aware when a callout was accepted that wasn't created by my plugin. If worst comes to worst, I'll disable the pre-existing callouts in favour of my own :)
  7. Evening! Is there any way you can detect when one of the pre-made callouts are accepted? Cheers, Jordan
  8. Evening, Hopefully a straight forward request! What is the best way to call a function repeatedly using the API? I've tried using threads and tasks (async/await) but they both seem to cause crashes quite quickly. Would one of the LCPDFR ENGINE TIMERS be a better means to poll a function? To provide a bit of context: private bool isLoading = false; async Task<string> asyncFunc() { await Task.Delay(2000); if (!isLoading) { isLoading = true //AWAIT CODE HERE isLoading = false; } Task<string> returnedTaskResult = asyncFunc(); return aString; } public override void Initialize() { // Bind console commands this.RegisterConsoleCommands(); // Listen for on duty event Functions.OnOnDutyStateChanged += this.Functions_OnOnDutyStateChanged; Log.Info("Started", this); Task<string> returnedTaskResult = asyncFunc(); } What I'm using at the moment-ish Cheers, ~Jordan
  9. Try uninstalling all your C++ redistributables and then downloading and installed each of these: Microsoft Visual Studio C++ 2005 Redistributable http://www.microsoft.com/en-gb/download/details.aspx?id=3387 Microsoft Visual Studio C++ 2012 Redistributable (x86) - 11.0.61030 http://www.microsoft.com/en-us/download/details.aspx?id=30679 DirectX 9.0 http://www.microsoft.com/en-gb/download/details.aspx?id=35
  10. SecuRom requires the 2005 redist. To successfully run 1.0 all you need is: Microsoft Visual Studio C++ 2005 Redistributable http://www.microsoft.com/en-gb/download/details.aspx?id=3387 Microsoft Visual Studio C++ 2012 Redistributable (x86) - 11.0.61030 http://www.microsoft.com/en-us/download/details.aspx?id=30679 DirectX 9.0 http://www.microsoft.com/en-gb/download/details.aspx?id=35
×
×
  • Create New...