Jump to content

LtFlash

Members
  • Posts

    610
  • Joined

  • Last visited

Profile Information

  • Country
    Poland
  • Gender
    Male

Recent Profile Visitors

9,230 profile views

LtFlash's Achievements

  1. You can create a zone, collect coords of vertexes + center (might also be calculated) and get random position within that zone. https://gtagmodding.com/maps/gta5/ https://math.stackexchange.com/questions/190111/how-to-check-if-a-point-is-inside-a-rectangle
  2. @Airb4g It should print "Rush Hour 0.5.0" in the console, also you could be able to call a command "rushhour" via the console, which prints a list of calls. Otherwise it means it is installed improperly or does not work with the last LCPD:FR update in case you got it installed.
  3. Pawel, one of the most troublesome and important aspect of scripting for GTA/LCPD:FR is to create chunks of code that will work in sequence. There were many techniques: switch...case + enum, bool flags, while loops but I managed to create probably the best solution which is to use a list of functions that might be switched on and off. Here are some resources: https://github.com/LtFlash/LtFlash.Common/blob/master/LtFlash.Common/Processes/ProcessHost.cs https://github.com/LtFlash/LtFlash.Common/blob/master/Examples/Processes/ProcessHost.cs In your code it could be used like this: public override void OnCalloutBegin() { proc.ActivateProcess(IsPlayerClose); } public override void Process() { proc.Process() } public void IsPlayerClose() { if(DistanceToPlayer < 200f) { //createblips proc.SwapStages(IsPlayerClose, HasPlayerClearTheArea); proc.ActivateStage(DisplayPlayerTaskOnScreen); } } private void DisplayPlayerTaskOnScreen() { //print msg "Eliminate enemies } private void HasPlayerClearTheArea() { if(AreEnemiesDead()) { //print msg End(); } } private bool AreEnemiesDead() { return (!Enemy1.Valid() || Enemy1.IsDead) && (!Enemy2.Valid() || Enemy2.IsDead); } Here's some information on Action delegate behind that technique: https://www.dotnetperls.com/action Using that, I believe you can solve your problem quickly.
  4. What do you mean by that, Sir?
  5. https://github.com/LtFlash/LtFlash.Common/blob/master/LtFlash.Common/Serialization/Serializer.cs First you would create a class to store data, then you use it to save/load values to/from a file using eg. 'public static void SaveToXML<T>(List<T> list, string filePath)' where T is your class.
  6. I bet the crash is caused by something in your LSPDFRResolveEventHandler method. Put 2 log lines: one above the line where you subscribe that and one after and you'll see what happens.
  7. Try this native: http://www.dev-c.com/nativedb/func/info/53af99baa671ca47
  8. What kind of problem do you have with this code? The style can definitely be better but there's no obvious bug. You could use an array/dictionary to store vectors and LINQ to check the condition so your code would look like this: CalloutLocation = locations.All(l => DistanceToPlayer(l) > distToBackRoad) ? YouToolBackRoad : YouToolLot;
  9. https://gist.github.com/LtFlash/e99e91039ff47f18a9894af733824e58
  10. It is possible and not complicated at all if you familiarize yourself with files hierarchy. Try to analyze StagesData.xml of any case and follow IDs of entites to their config files, eg. SuspectsData.xml, VictimsData.xml, DialogsData.xml and so on. Every piece of information that form a case is located in those files. 20-30 minutes of learning and I'm sure you'll be an expert in creating cases. We are checking the forum regularly so feel free to ask questions. You might also contact us via our Discord server. We'll probably push an update with some cosmetic changes to file formats, so have in mind you'll have to adapt your new case when this happens. Fiskey is working on dedicated tools for creating cases but the release date is unknown due to how busy we are in real life.
  11. The current version has huge unused potential but the coding scene is pretty much dead. I'm still working on The Wasteland and it's refreshed version will be eventually released but that would be it in terms of active development for LCPD:FR. Despite of the available know-how we didn't have back in the days, no one seems to be interested in creating scripting mods nowadays. I just realized IV was released TEN years and nine days ago...
  12. It's sad to see you leaving. Thanks for your great input into the modding scene, Stealth!
  13. That's a huge loss for the community, you were delivering quality content for such a long time it's hard to imagine the FR scene without you. Thanks for your brilliant work, Albo!
  14. You got to use VS 2012, LCPD:FR obfuscation causes all the newer VS editions to crash. I contacted LMS about this long time ago but LCPD:FR is no longer in development and we can't expect any updates that would fix the problem.
  15. You can check here how to create a dialog class to reuse it in different calls: https://github.com/LtFlash/LtFlash.Common/blob/master/LtFlash.Common/EvidenceLibrary/Dialog.cs
×
×
  • Create New...