Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    NoNameSet reacted to liverlande in Code Snippets (Developer Resource)   
    This thread can be used to post "snippets" - a small amount of code that is either almost or fully independent of the script it's used in. Unless otherwise specified, snippets hold the following terms:
    Credit must be given to the author of the snippet if used in another project
    Posting a snippet gives the above license for use
    Name: RandomCallouts
    Author: LiverLande
    Description: Caches all callouts and adds a function for calling a random callout.
    Requirements: LSPDFR 0.3.1
    Link: https://gist.github.com/RiverGrande/d27b7506d5eb1372e53f1840a8a647c8
    Name: WaitForDismissal
    Author: LiverLande
    Description: Monitors all stopped Peds and waits until they're dismissed.
    Requirements: LSPDFR 0.4.0
    Link: https://gist.github.com/RiverGrande/712b8678baf6b6365ffa8e9c56b63134
    Name: OnScreenKeyboard
    Author: NoNameSet
    Description: Draws a keyboard on the users screen (used in such things as the cheat menu)
    Link: https://gist.github.com/NoNameSet/33dbed309e48428e8b5d498fa15165fa
    Name: SynchronizedScene
    Author: NoNameSet
    Description: Plays synchronized animations (animations that are meant to be used to play together, like the cuffing animation)
    Link: https://gist.Github.com/NoNameSet/048d8d7bac259236c25f6280a9918ce0
    Name: Trains
    Author: NoNameSet
    Description: A class to easily create trains 
    Link: https://gist.github.com/NoNameSet/0a90a9652643c795abe30fb23c187640
    Name: PursuitExtensions
    Author: NoNameSet
    Description: Pursuit extension methods
    Link: https://gist.github.com/NoNameSet/046464b917b3bc8f181fe5c9e6fa1a85
    Post with the following format to have a snippet added to the main post:
    Using GitHub gists is recommended for ease of use and access - discussion regarding snippets is also allowed in this thread. The goal is to produce a valuable resource for developers to share code.
  2. Like
    NoNameSet reacted to Sam in LSPDFR 0.4 API Update   
    You learn something new every day.  I did not expect pulling over a boat to go that smoothly.
    I'm thinking we could allow boats to be blipped again and then simply disable the new logic for boats and just make them stop where they are.
  3. Like
    NoNameSet reacted to PNWParksFan in LSPDFR 0.4 API Update   
    Sure. You pull over a boat for the same reasons you'd pull over a car, just on the water 🙂. Speeding, boating intoxicated, being reckless, smuggling drugs, etc. It's also common to do safety inspections on boats where you stop them, board the boat to make sure they have all the required equipment and permits, then send them on their way. I use API integration with LSPDFR+ to add custom traffic stop questions with boating-specific questions like checking for boating license, fishing license, life jackets, etc. 
    Here's a very short simple video showing some of the very initial testing I did. There's a bit of custom code in use here to facilitate it, but it's using stock LSPDFR 0.3.1 pullovers + LSPDFR+ Traffic Stop menu. 
  4. Like
    NoNameSet got a reaction from PNWParksFan in LSPDFR 0.4 API Update   
    Something I have noticed is that LSPDFR uses Newtonsoft.Json (version and when I try to serialize objects it doesn't seem to work. Changing it to a more up to date version (I use version for RPH Plugins, which works fine) seems to block lspdfr from loading completety. 
  5. Like
    NoNameSet reacted to PNWParksFan in LSPDFR 0.4 API Update   
    Just taking an initial look here, more to come I'm sure. Thanks to the team for all your hard work getting this update out! 
    I'm unable to perform traffic stops on boats, whatsoever. Used to be possible in 0.3.1 without having to do anything special, just boat up behind them and hold Shift.  Unable to put an arrested ped in any car that has "unusual" doors - whether that's no doors, doors on the back like a van, etc.  Ability to disable AI on a specific ped in a pursuit is awesome, thanks for adding that! Looking forward to checking it out.  Maybe I missed it, but I didn't see any way in the API to tell whether an arrested ped is grabbed by the player. This would be helpful, as many mods have their own grab systems, and it would be useful to be able to tell when the ped is already grabbed natively through LSPDFR to avoid conflicts.  The "M" menu has some concept of where hospitals and fire stations are, but I don't see them defined in stations.xml or accessible in the API. If those could be exposed as user-configurable and accessible in the API, I would use them in Better EMS, allowing closer integration with LSPDFR versus redefining everything in my own config files.  Would be nice if RequestBackup let you specify a ScriptName and/or Agency from the backup configs, with perhaps also some functions to read in what all the available agencies and flags are.  Ability to spawn a vehicle + peds yourself, then set it as backup. I.e. it would behave the same as if you had called RequestBackup, but instead you pass in a Vehicle and it becomes a backup unit. Same for Suspect Transport.  Looking forward to future updates!
    EDIT: A few more things I've noticed 
    If you have a waypoint set on the map, Code 3 backup responds there. Which is a useful feature to have, but is also really confusing as it's undocumented. Perhaps the backup menu could have a selector for "respond to self" or "respond to waypoint". You can get a call that's far away (like the built in market robbery call for example), respond at reckless speed to get there, and pass 5 ambient patrolling units on your way that are just driving along without a care in the world. Would be nice if there was some API method to request ambient units to respond to a location, with perhaps an optional parameter for max number of ambient units to respond. That way if you initiated a robbery call for example, you could configure ambient units to join the call, so if you approach an ambient unit on your way they'd also go Code 3 and respond to the same location.  Likewise, I've called for Code 3 backup when an ambient unit was driving right by, and rather than respond they just kept driving, and a new backup unit responded elsewhere. Would be nice if ambient units would respond Code 3 when calling backup if they meet the criteria for the backup requested.  Please add methods to the API for whether Pursuit Cop AI mode - Behavior, Tactics, and Lethal Force settings. 
  6. Like
    NoNameSet reacted to LMS in LSPDFR 0.4 API Update   
    With LSPDFR 0.4 the API received a few minor changes in terms of the Persona class, which might require recompilation on your end. While there are not many new additions to the API just yet, we hope to change that soon with our next minor update. We ask you to bear with us for a little bit longer before we expand our API functionalities.
    As for additions for newly introduced 0.4 features, we ask you to provide some feedback here in the thread on what you would like to see. We have showcased scenarios in one of our announcements and still plan to make the available shortly. In short, a scenario takes over control during a chase or a traffic stop to provide unique behavior. During a scenario, it has full control over all entities. Another useful addition will probably be frisking and the ability to place items on peds, that can then be found, much like we had it in LCPDFR.
    Thanks for your patience and all the work you have done.
  7. Like
    NoNameSet reacted to Sam in LSPDFR 0.4 - Coming February, 2019   
    I don't know about anyone else, but I'm very much looking forward to the 31st of February.
  8. Like
    NoNameSet reacted to Sam in Most problematic issues with LSPDFR 0.3.1 API that ought to be fixed in 0.4   
    Thanks for the suggestions.
    This is a consequence of how our AI works.  If a ped isn't doing what we think they are supposed to be doing, we will try to correct this.  In my opinion, that's perfectly logical.  Our API doesn't support changing the tasks of pursuit suspects, so I don't think anyone should be too surprised that when you forcibly change their tasks without LSPDFR knowing, that we change them back. 
    I don't think we will be able to disable AI on an individual basis.  It's not practical for people to pick and choose like this.  The best we can potentially do is disable all police AI and/or all suspect AI, but even that isn't as simple as you might think and there's quite a few things we'd have to change first.  I think a better approach is the new pursuit scenarios that we are adding in 0.4 which we can look at further when we get into the API stuff following the initial release.
    This isn't an issue anymore in 0.4.
    The doc says: "Sets the ped as arrested internally. Please use with caution as I didn't investigate any possible side effects yet.". 
    It will cause IsPedArrested() to return true and will prevent the ped from being stopped by the player and should prevent them from being pursued by the AI.  I don't think it was ever intended as having anything to do with animations - it's simply a flag and is the same one which we set after a ped has been arrested either by the player or AI. 
    Everything regarding pursuits in 0.4 is entirely different.  Not sure if this will still be relevant or not, and not sure what sort of scenarios it makes sense for.  This is something that would need to wait until the API update.
  9. Like
    NoNameSet reacted to PNWParksFan in Most problematic issues with LSPDFR 0.3.1 API that ought to be fixed in 0.4   
    I'm aware of Sam's post regarding plans for an API update after the main release of 0.4, and look forward to more discussion of that in the near future. In the meantime, with release fast-approaching, there are a handful of major issues that have caused headaches for many developers using the LSPDFR 0.3.1 API which I am really hoping will be fixed in 0.4: 
    During pursuits, Cop and Suspect Ped tasks are reset every 2 seconds. Functions.SetCopAsBusy doesn't consistently prevent this from happening. This makes it nearly impossible to alter how suspects and cops behave in pursuits, e.g. if you want to make a suspect jack a new vehicle (their enter vehicle task will get terminated before they're even in it), or have a cop do something in particular. SetPursuitDisableAI turns off all AI for the entire pursuit, there needs to be a way to disable AI on individual peds (cop or suspect). 
      Whenever LSPDFR is running, regardless of whether a pursuit is active, all law enforcement peds in the game (even add-on peds) can't change their secondary accessory/vest clothing component, because of LSPDFR's holster management. This makes it entirely impossible to give plugin-spawned peds specific vest clothing. 
      SetPedAsArrested doesn't actually seem to do anything, leading to a bunch of mods doing their own "arrested" implementation involving animations and trying to clear tasks, which sometimes conflict. 
      If pursuit suspects get far from the player, the pursuit goes inactive and if they're very far away terminates. This makes sense in default "bunch of cops chasing a car on a road" situation, but doesn't make sense in a lot of other scenarios. Constantly looping SetPursuitIsActiveForPlayer is super glitchy and doesn't really work anyways.   
    Obviously there are many more things devs would like to see in the API once we get a sense for what new features LSPDFR will have to offer, these are just a few of the biggest issues IMO that have really hindered plugin development over the past couple years. 
  10. Like
    NoNameSet reacted to Sam in LSPDFR 0.4 - Coming February, 2019   
    So, it's been a while since we've provided an update on LSPDFR 0.4.  As you might've guessed from the title, though, there's a good reason for this...  It has taken us a lot of work to get to this point, and in the last couple of months alone we've made hundreds and hundreds of changes.  Anyway, here we are - who knows how many months late - but we're here.  No riddles, no treasure hunts, no @MSA (at least I'm pretty sure they're not here), but straight to the point!  We can now confirm that we'll be releasing LSPDFR 0.4 in February, 2019.  
    Anyway... with the scary part out of the way, I wanted to take the opportunity to explain ourselves a little.  No, @LMS wasn't renditioned to an IAA black site, no I didn't fall victim to the Orbital Cannon, and no...  the ghost of @ineseri didn't drive a train into us.  Perfectly plausible scenarios given our silence about 0.4 as of late, but we're actually still alive.  Instead, we've been pretty busy rushing to the finish line as far as 0.4 is concerned, and to complement the big news above, we thought we'd throw in a couple of sweeteners below to show just how much 0.4 is going to change things. 
    We've talked a lot about our Character system in LSPDFR 0.4.  It's one of the biggest changes to the mod, but we also think it represents an entirely new direction in general.  I say this because, not only does it allow us to have a bunch of really cool stuff natively integrated into the mod, like customizing a character, but it also lets us have a bunch of other really cool stuff natively integrated into the mod!  Having your own character dials up the immersion quite substantially, but we wanted to take things to another level.  We thought, for example, wouldn't it be cool if instead of spawning as Franklin in Franklin's house, you could instead, say, I don't know?  Actually spawn as your own character, in their house.  Or maybe, instead of switching to Trevor and your camera panning down to him being pursued by the LSPD, you could switch to one of your other characters, and "Google Earth" down to them being the LSPD. 
    LSPDFR 0.4 introduces a fully functional GTA Online Apartment to single-player, complete with transition sequences, working interactions and more Steve Haines than you can handle.
    It's not just that, though, we really wanted to dial it up.  Having your own character, them having an apartment, switching, customizing, it's all cool, right?  But you might be thinking, what's the point?  These are "multiplayer features".  And sure, LSPDFR is and most likely always will be a single-player mod, but that doesn't mean we can't think outside of the box every once in a while. 
    Recently, @Cyan, in addition to all of her work on the website, has also been developing an all new framework called LSPDFR Sync.  LSPDFR Sync lets you connect up to your LSPDFR.com account in-game, and you can then synchronize your LSPDFR characters with your LSPDFR.com profile.  To top it off, we've brought back statistics too.  Ever wanted to know how many shots your character has fired?  It's as simple as taking a look at your character's profile on the site - which, we should add, you can actually edit.


    LSPDFR Sync provides all-new, seamless connectivity with your LSPDFR.com profile.
    And frankly, it doesn't even end there.  When I said before that we wanted to dial the immersion up to the max, I guess I lied.  What I actually meant to say was that we'd just ripped the dial clean off the controls, strapped it to a rocket, and sent the damn thing up to the moon.  Not only can you now create a character, customize them, share them, spawn as them...  You can actually do things as them too!  Like, actual game things.  Ever wanted to run the triathalon as your LSPDFR Character?  Now you can.  Or, how about practicing with your sidearm down at the range?  Yep, got that too.  Simply want a can of sprunk from a vending machine?  No problem.

    With the introduction of a new innovative system by @LMS, it's now possible to do many of the single-player minigames while playing as your LSPDFR Character.
    Of course, with the Character system, and all of the features that come with it, being such a huge part of LSPDFR 0.4 it'd be easy to forget that this is a police mod.  Indeed, I think we almost did given the grotesquely gargantuan amount of work that has gone into it.  Fear not, though, as we have also been working on some incredible new gameplay features too, including massive improvements to interaction with suspects and people that you arrest.
    LSPDFR 0.4 introduces, in a game-changing way, the ability to take hold of and drag arrested suspects.  Yes, we know that there's some great API mods which have held the fort, and we're grateful for that, but this is something we wanted to get absolutely right, and indeed, we think the result is simply stunning.  The possibilities are pretty far-reaching too and encompass just about everything from shoving suspects up against cruisers, to personally escorting them into their cells.  


    No, these aren't cutscenes.  No, they're not edited screenshots.  With 0.4, this is real.
  11. Like
    NoNameSet reacted to Sam in LSPDFR 0.4 - Information for developers   
    As LSPDFR 0.4 nears completion, we hope this topic will help in providing some clarification for developers who make use of our API about what the changes in 0.4 mean for them and their work.
    Firstly, the significance of the changes to LSPDFR that 0.4 brings can't be overstated.  LSPDFR 0.4 introduces changes to almost every aspect of the mod and will take a little getting used to.  We think that the overall experience is much improved from 0.3, and a lot of the features that we introduced in 0.3, or earlier versions, have been dramatically changed, expanded upon or entirely re-worked.  It's important to keep this in mind as such drastic changes will unavoidably have the potential to cause issues across the board.
    In regards to our current approach, our main priority at this time is to release a public version of LSPDFR 0.4 as soon as is possible.  In short, this means that our focus is and has been very much on the core experience of the mod.  As a result, while we will still ship the first public release of LSPDFR 0.4 with a functioning API, it will not be substantially different from the current LSPDFR 0.3 API.  Additionally, we are committed to ensuring that custom callout plugins remain compatible with LSPDFR 0.4.
    We understand that this approach might cause some initial disappointment, but we think it is the most sustainable way of doing things both in terms of people being able to play 0.4 as soon as possible (which obviously is very important), but also from an API and development perspective.  As said above, a lot has changed in 0.4 and we want developers to have the opportunity to properly familiarise themselves with the new version and get a feel for what sort of content they'd like to create and what sort of things they'd like to change.  
    Just like with previous versions of LSPDFR, we are committed to pushing post-release updates and hotfixes for 0.4, with a view to following up with a minor 0.4.1 version, which will focus primarily on extended API functionality.  During this process, we will work with developers to incorporate their suggestions and requests for the 0.4.1 API, and will also provide development builds of 0.4.1 to developers for testing.
  12. Like
    NoNameSet reacted to Sam in LSPDFR 0.4 - Ambience   
    This is the fifth and final part of our LSPDFR 0.4 Preview Series.  Not caught up yet?  Check out the rest of this series here: https://www.lcpdfr.com/forums/forum/880-news-updates/
    One of the things we like most about developing new versions of LSPDFR is that with each version we have the opportunity not only to work on major new features, but also the smaller details that our mods have come to be known for over the years.  Of course, 0.4 is no different in this regard and a lot has obviously changed since the early days of LSPDFR, offering us with a bunch of new ways to focus our attention to detail.
    More Realism
    Getting straight to the point, a significant change that we're making in 0.4 relates to how the player is perceived within the game's world.  Now, while this obviously isn't a sexy, new, video-worthy showstopper of a feature, it is nonetheless an important development behind-the-scenes - one that we think, despite its subtlety, will have a positive impact on your gameplay.
    In 0.4, you'll notice that while on duty, other characters within the world will treat and react to you differently.  As GTA V was never a game about being a cop, it's easily understandable that when you quite simplistically do become a cop - while keeping the underlying theme of the game - there's going to be things that don't feel quite right.  You might notice, for example, that other characters within the world are overly aggressive towards you, itching for a fight at the slightest confrontation, or sometimes in the absence of any confrontation at all.  Conversely, the opposite is often true where the most banal or routine encounter can send people hurrying away in abject panic.  Both of these reactions are problematic as people generally don't just spontaneously approach a cop and proceed to cuss them out, nor do they begin hysterically fleeing at the sight of a stun gun. 

    Stun gun hysteria and stampedes no longer, LSPDFR 0.4 introduces more 'contemporary' reactions, like everyone summoning their inner videographer.
    These adjustments to the game's core apply in a number of other cases too, of course.  We thought it was pretty unlikely that the typical reaction to a police officer standing in front of someone's car would be for the driver to flip them off, and then - as if that wasn't enough - to then run them over for good measure.  Likewise, it was always pretty ridiculous that you can't enter another police officer's car as a passenger without them freaking out and thinking that you're trying to steal it.  All of these behaviors have been adjusted, and we think that you'll feel far more like an actual cop within the world - rather than just a retired bank robber dressing up with a badge.
    And yes, while there are a number of mods out there that can help to mitigate many of the scenarios I've described above, they don't really offer a comprehensive and consistent solution simply due to technical restraints.  Our changes are at a much lower level and offer us a higher degree of control on a per-character basis.  This is great for flexibility and performance, and we think you'll really notice the difference when out and about on patrols.
    New Interaction Menu
    Sticking with the topic of small detail, increasing the level of interaction in LSPDFR is something that's very important to us - especially with the new focus on character in LSPDFR 0.4.  Indeed, we previously showed off a number of new interaction options that will be available during vehicle pursuits, but we've also taken the time to make big improvements to the more general Interaction Menu, offering you most of the features currently available in GTA Online, but with an LSPDFR twist.  Among the changes to the Interaction Menu are "quality of life" improvements like being able to quickly waypoint the nearest police station, as well as additions like new dialogue, actions and the ability to set your character's mood.
    Similarly, you can now also change the way that your character walks, but it doesn't quite stop there as in keeping with the general idea we outlined above of making the game feel more suited towards being a cop, there's a special "Cop" walk style that not only makes your character walk around like an officer, but also completely replaces their generic "idle" animations - subtle movements that your character makes while stationary - with more appropriate police styled ones.

    The more feature-complete Interaction Menu in LSPDFR 0.4 enhances your control, allowing for greater immersion.
    Additionally, we've carried over this level of detail to the Police Radio options too, replacing the static animation that currently plays in this menu with a number of different options that can be cycled between instead, including a nifty new LAPD style handheld radio (as well as the option to play no animation at all).  Again, this is a small detail, but we hope that the enhanced level of immersion will be welcomed - especially if playing as an FIB Agent and communicating via an earpiece instead of a shoulder mic, for example.

    New technology in LSPDFR 0.4 produces incredibly lifelike scenes - you can freely move while using the police radio without any animation issues like arms being locked in place, etc.
    Finally, still on the topic of detail, we've topped things off by adding a proper police flashlight to LSPDFR 0.4.  Yes, we know that there's a bunch of ways to use a flashlight currently whether it be the vanilla one that looks like it's straight out of a horror movie, or through other mods which suffer from animation problems, but ours is a little different.
    Already alluded to in the first preview we gave of LSPDFR 0.4, our flashlight is properly held above the head and can be used both by the player and other NPC officers.  It doesn't affect player movement, and you can freely walk, run, sprint, etc. while still holding the light.  If enabled, equipping it is a seamless process too - simply select the flashlight from the weapon wheel and LSPDFR will take care of the rest.

    The new flashlight in LSPDFR 0.4 tops off our efforts to bring more immersion and realism to the mod.
    Ambient Crime
    In our previous post detailing some of the technology behind LSPDFR 0.4, we mentioned that we had added Scenarios to 0.4 - scripted events that could take place during pursuits and traffic stops.  Similarly, we also noted that 0.4 introduces a new Crime System, capable of actually recognizing crimes that take place in the game world and providing functionality for the player to get involved by reporting these.   Expanding upon this idea, we wanted to make sure that we fully realised the ambient world that Grand Theft Auto V provides, and to do this we've manipulated a couple of lesser-used features within the original game.
    In the normal game, the player will sometimes be confronted by other characters within the world as a result of the agitation system built into the game which allows NPCs to insult or shove the player, for example.  In LSPDFR 0.4, as a result of some research by @LMS,  we've now been able to implement the same system, but for NPCs instead.  This means that NPCs can become agitated with each other, begin trading insults, get into angry shouting matches, or eventually, physical confrontations.  Plus, as these are actually 'legitimate' game events, other characters nearby will react appropriately, which also ties in really nicely with the Crime System and provides the player with something other to do than respond to dispatches or pull over vehicles - there's now hopefully much more actually happening within the world and consequently, more things for the player to notice while on patrol.

    Manipulating the game's agitation system results in a much richer world - seen here are two NPCs engaging in a spontaneous confrontation.
    Note that screenshots show LSPDFR player and non-player-characters wearing some outfits from EUP - which is entirely optional - special thanks to @Alex_Ashfold for his collaboration with us and for providing a development copy of EUP 8.0.
    Thanks for reading the preview.  We appreciate your patience as we put the finishing touches on LSPDFR 0.4 and hope to have more news soon.
  13. Like
    NoNameSet got a reaction from mmods in Play Anmation   
    Here: https://alexguirre.github.io/animations-list/
  14. Like
    NoNameSet got a reaction from SimuNews in Add prop to hand   
    var pedToAttachTo = new Ped(); var @object = new Object("ng_proc_beerbottle_01a", Vector3.Zero); if (@object) @object.AttachTo(pedToAttachTo, pedToAttachTo.GetBoneIndex(PedBoneId.RightHand), new Vector3(), new Rotator()); //use menyoo to get vector3 and rotator values
  15. Like
    NoNameSet got a reaction from mmods in Open vehicle door   
    here, search for the 'EnterVehicle' task with the parameters you need
  16. Like
    NoNameSet reacted to Cyan in Spawn custom ped model   
    Please ensure that your work is your own work. op_Implicit certainly wouldn't appear in any learning documentation -- I recommend you do as others have mentioned and learn instead of taking other people's work to a decompiler -- especially when a lot of learning material is in the open.
    Note that copied work won't be allowed on LCPDFR.com if you come to publishing your mods.
  17. Like
    NoNameSet got a reaction from Nicooo in Notification images   
    @Budzilla I'll teach you..for this tutorial we will just use a simple texture from the game that you can easily find in openiv.
    1. go to open iv and search for something like 3dtextures (in update/update.rpf/x64/textures/scripts_txds)
    2. you will see alot of files, we will just take the first one "3dtextures.ytd", in that file we have three images ("mpgroundlogo_bikers", "mpgroundlogo_cops", "mpgroundlogo_vagos")
    3. we will use the 2nd one ("mpgroundlogo_cops" (cop badge))
    4. go to visual studio or whatever you use and type Game.DisplayNotification("", "", "", "", "")
    5. we will use the notification that needs five parameters,
    5.1. the first parameter is textureDictionaryName = 3dtextures
    5.2. the second parameter is textureName = mpgroundlogo_cops
    5.3. the last three params title, subtitle, text are self explainable.
    If you want an image of a peds head in the notification(a ped you are using ingame), use this:
    private int handle
    handle = NativeFunction.Natives.RegisterPedheadshot<int>(Ped);
                if (NativeFunction.Natives.IsPedheadshotReady<bool>(handle))
                    string str = NativeFunction.Natives.GetPedheadshotTxdString<string>(handle);
                    Game.DisplayNotification(str, str, "title", "subtitle", "text");
  18. Like
    NoNameSet got a reaction from techgamer15 in Any ideas how to make a CS Gas/Pepper-spray mod   
    I was working on this a few weeks back, only think I was stuck at was finding a good anim and the reaction of the ped.
  19. Like
    NoNameSet got a reaction from techgamer15 in Spawn Locations   
    You can't, either get the vectors or use the safecoord native which will get a nearby pavement.
  20. Like
    NoNameSet got a reaction from Vaskulis in How to make a witness do a "writing on paper" animation   
    Use the scenario natives.
  21. Like
    NoNameSet got a reaction from AlexanderK. in How to make conversation with witness   
    private readonly List<string> dialogWithPed = new List<string>() { "Officer: BLA BLA BLA", "Ped: BLA BLA BLA" }; private int dialogWithPedIndex; if (!Game.IsKeyDown(Keys.Y)) return; if (dialogWithPedIndex < dialogWithPed.Count) { Game.DisplaySubtitle(dialogWithPed[dialogWithPedIndex]); dialogWithPedIndex++; } if (dialogWithPedIndex == dialogWithPed.Count + 1) { // } 2 classes lmao
  22. Like
    NoNameSet got a reaction from AlexanderK. in HOW TO DISPLAY TEXT WHEN NEAR A PED   
    private Ped player => Game.LocalPlayer.Character; private ECalloutState calloutState; private List<string> dialogWithCop = new List<string> { "~b~You~w~: Bla bla bla. (1/3)", "~b~Officer~w~: Bla bla bla. (2/3)", "~b~You~w~: Bla bla bla. (3/3)" }; private int dialogWithCopIndex; private void Main() { switch (calloutState) { case ECalloutState.EnRoute: if (Cop) { if (Cop.IsAlive) { if (player.DistanceTo2D(Cop) <= 15) { Game.DisplayHelp( player.IsInAnyVehicle(false) ? "Leave your vehicle and speak with the ~b~Officer" : "Speak with the ~b~Officer", 5000); Cop.TurnToFaceEntity(player); calloutState = ECalloutState.OnScene; } } } break; case ECalloutState.OnScene: if (Cop) { if (Cop.IsAlive) { if (player.IsOnFoot) { if (player.DistanceTo2D(Cop) <= 2) { Game.DisplayHelp("Press ~b~Y~w~ to speak with the ~b~Officer", 5000); Cop.PlayAmbientSpeech(Utils.Utils.Random.Next(1, 3) == 2 ? "GENERIC_HI" : "GENERIC_HOWS_IT_GOING"); calloutState = ECalloutState.NearCop; } } } } break; case ECalloutState.NearCop: if (Cop) { if (Cop.IsAlive) { if (player.IsOnFoot) { if (player.DistanceTo2D(Cop) <= 2) { if (Game.IsKeyDown(Keys.Y)) { Game.HideHelp(); if (dialogWithCopIndex < dialogWithCop.Count) { Game.DisplaySubtitle(dialogWithCop[dialogWithCopIndex]); dialogWithCopIndex++; } if (dialogWithCopIndex == dialogWithCop.Count) { //continue } } } } } } break; } } private enum ECalloutState { EnRoute, OnScene, NearCop }  
  23. Like
    NoNameSet reacted to BlueLineBacker in LSPDFR 0.4 - The Technology   
    Damn, LSPDFR is 99% finished?, i was not aware we were at 0.9 release teetering on the 1.0 final release this quickly. Oh wait, we're not...-..it's 0.4. We are not even half way through development and how many years has it been?. I would not cross your fingers or go thinking LSPDFR is near completion anytime soon. It will be weeks/months until 0.4 comes out, and it will literally be half a decade before you even see a 1.0 release like we did in LCPDFR a long time ago. Patience and maintaining an attitude that expects less than more is paramount to maintaining sanity while waiting for this mod to develop. If every other day you think the update is coming out...-...it will seem like FOREVER for it to actually come out. A watched pot never boils folks. I would expect 2-3 more rinky dinky video/screenshot updates with information in the coming months before the 0.4 Update itself even comes out.
  24. Like
    NoNameSet got a reaction from GrandTheftPD in LSPDFR 0.4 - The Technology   
    They haven't even released the fourth preview of 0.4, calm down.
  25. Like
    NoNameSet got a reaction from creator2013 in MAKING A SUSPECT HAVE NOTHING WRONG WITH THEM   
    also you might need to set the stolen flag of the vehicle to false:
    vehicle.IsStolen = false;
  • Create New...