Jump to content

LtFlash

Members
  • Posts

    610
  • 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 LtFlash

  1. I really like you crafted an algorithm and managed to solve this by yourself, great job!
  2. try..catch? Not string.Split(...)? https://msdn.microsoft.com/pl-pl/library/tabh47cf(v=vs.110).aspx
  3. LtFlash

    Parking

    I can't imagine playing GTA w/o your vehicles. Enjoying them _much_, even though it's been so long with this game! Thanks!
  4. I 'd apply some cosmetics but generally, it's ok. Blip[] myBlips = Blip.GetAllBlipsOfType(BlipType.Ped); foreach (Blip myBlip in myBlips) { if(myBlip == null || !myBlip.Exists()) continue; //always check this first if (myBlip.GetAttachedItem() == myped) //in case it does not return true when it should, use GetHashCode() for both and compare { myBlip.Delete(); } }
  5. Actually there's a much much cleaner and simpler method than RegisterCallback, switch(state)..case, ifs etc. It's called Action delegate, that's a variable which stores a pointer to a function. Here's a short example: Action stage; public void OnCalloutAccepted() { stage = IsPlayerClose; } public void Process() { if(stage != null) stage(); //it calls a function pointed by stage whenever Process() is called, you can also: stage.Invoke() } private void IsPlayerClose() { if(Distance(Player, point) < 50f) stage = IsPlayerVeryClose; } private void IsPlayerVeryClose() { //code } Voila, it's clean, simple and effective.
  6. 1) To be able to use (potentially) infinite loops w/o freezing you have to yield after each pass, you can use Wait(0): while (true) { //your code Game.WaitInCurrentScript(0); } 2) RegisterStateCallback: you might be interested in my and LMS' previous post about this mechanism: it works completely fine when used properly. 3) You can get ped's blip this way: //LCPD:FR LPed: LPed p; Blip pedBlip = p.Blip; //SHDN Ped: Blip[] blips = Blip.GetAllBlipsOfType(BlipType.Ped); Blip b = blips.Find(b => b.GetAttachedItem() == yourSuspect); 4) You should open SDHN and LCPD:FR in VS Object Browser and familiarize yourself with members of classes that form those libraries. It'll make developing easier as you'll know what you can do.
  7. If you want to check if a pursuit was terminated because of the suspect has escaped a better way is to check Functions.IsPursuitStillRunning(pursuitHandle); I don't know any method of checking if NPC has "visual" on the suspect, maybe except of checking the blip of the suspect but that might be faulty. Another thing I'd change is to place an existence check as the 1st expression of the loop, like that: foreach (LPed myped in missionPeds) { if(myped == null || !myped.Exists()) { missionPeds.Remove(myped); continue; } //your code w/o Exists() checks } I'd do so because IV removes peds often and performing anything on a non-existent ped will cause an exception.
  8. I feel like 2 factors are important here: 1) SoundPlayer/Audio used in NooseMod, 2) .NET version target set in properties of your project. Try to temporarily comment out audio class and check if it works. https://stackoverflow.com/questions/4018924/mixed-mode-assembly-is-built-against-version-v1-1-4322 https://stackoverflow.com/questions/3179028/mixed-mode-assembly-in-net-4 https://stackoverflow.com/questions/6425707/mixed-mode-assembly-is-built-against-version-v2-0-50727-of-the-runtime
  9. https://github.com/alexguirre/RAGENativeUI/issues/23#issuecomment-307125967
  10. Check this out: https://github.com/LtFlash/LtFlash.Common/blob/master/LtFlash.Common/EvidenceLibrary/Dialog.cs using DisplaySubtitle() + Wait() isn't the most efficient idea.
  11. - NYPD Blue - mostly the first two seasons, - Homicide: Life on the Street - for everyone who'd like to have some realistic experience of the world of detectives, it's even more interesting after reading Simon's book, - Law & Order - the first 2 or 3 seasons of the very first show aired in 90's, - The First 48 Hours - documentary, homicide cases from around the States, - Southland, - The Wire, - Third Watch, - Miami Vice - it shows the tactics behind undercover operation, except of that it's a beautiful show, - Kojak, - old 'analog' Cops.
  12. LtFlash

    The Wasteland

    Wow, fantastic! I'm glad that someone still remembers about the mod. I can reveal that The Wasteland will be updated with more features and completely rewritten the old stuff!
  13. Minute ago I pushed a new version containing changes we've been working on for a couple of months. I mentioned it in my previous post. You can follow the progress on our site and discord. The plugin is available for testers in our beta programme.
  14. I'm actively writing code for now over 3 years. Making the story short: I started because I was interested in the history of NYC high-crime areas (policing), especially SoBx + I wanted to remind myself a little bit of programming. Writing callouts seemed to be a perfect opportunity to combine both interests. It works well - I still open VS2012 to improve my 1st plugin even though it wasn't updated for ages. When I learned GTA enough to be able to write working code from the 1st try, it became a good hobby to relax after hours. I found some areas in programming I like to master and till I see some space to improve I'm working on it. It turned out the code is my favorite type of art and everybody likes to be creative.
  15. 1. Check the folder Grand Theft Auto V\lspdfr\Police Scanner\ for filenames you can use. 2. Use that with Functions.PlayScannerAudio(string) but remember to separate filenames with spaces, eg. Functions.PlayScannerAudio("REPORT_RESPONSE_COPY_04" + " " + "OUTRO_02");
  16. var yourString = "COPY_THAT" + Settings.Division + Settings.Unit + Settings.Beat; if(yourString == "COPY_THAT13XRAY13") { throw new Exception("You need to put spaces between the names of audio clips to play"); } Also, make sure the files you want to play are located in proper \Audio\ folder.
  17. It's because you forgot to add 'f' after the X coordinate.
  18. You have to create a new instance of a struct Vector3: SpawnPoint1 = World.GetNextPositionOnStreet(new Vector3(-2051.99463f, 3237.05835f, 1456.97021f));
  19. Sehnor, please use English language because me no hablo espanol. Thank you!
  20. As Parks mentioned - we are working on a detective mod which allows you to do much more than patrolling and arresting suspects. Here's the link to our topic where you can learn more about it: I have to say that while ideas don't harm anyone, the execution is the hardest part and the reason why more complex plugins don't come. We are _very_ actively working on LS Noir for over a year and we hardly achieved what we initially planned in terms of the internal mechanics. Creating a case is even more complex than coding.
  21. We had a little bit of a break because of exams and holiday but like yesterday we manage to set off again. The most recent task was to convert the whole mod to a platform for serializable case data and that delayed the public release significantly. Right now we are working on completing 1 or 2 cases which use a new platform, then it'll be pushed to beta testers. You can check https://www.fiskey111mods.com/ for more info on becoming a tester.
×
×
  • Create New...