Reputation Activity
-
CreepPork got a reaction from FPIUGuy in How many police slots are there?Technically, infinite.
You can add as many police vehicles you want via the DLC feature.
By default there is:
Police Police2 Police3 Police4 Sheriff Sheriff2 PoliceB PoliceT Polmav Riot Policeold1 Policeold2 Predator Fbi Fbi2 PRanger -
CreepPork got a reaction from Mangonator in How many police slots are there?Technically, infinite.
You can add as many police vehicles you want via the DLC feature.
By default there is:
Police Police2 Police3 Police4 Sheriff Sheriff2 PoliceB PoliceT Polmav Riot Policeold1 Policeold2 Predator Fbi Fbi2 PRanger -
CreepPork got a reaction from OPayne in How many police slots are there?Technically, infinite.
You can add as many police vehicles you want via the DLC feature.
By default there is:
Police Police2 Police3 Police4 Sheriff Sheriff2 PoliceB PoliceT Polmav Riot Policeold1 Policeold2 Predator Fbi Fbi2 PRanger -
CreepPork got a reaction from Officerjay49 in How many police slots are there?Technically, infinite.
You can add as many police vehicles you want via the DLC feature.
By default there is:
Police Police2 Police3 Police4 Sheriff Sheriff2 PoliceB PoliceT Polmav Riot Policeold1 Policeold2 Predator Fbi Fbi2 PRanger -
CreepPork got a reaction from Leon McMahon in How many police slots are there?Technically, infinite.
You can add as many police vehicles you want via the DLC feature.
By default there is:
Police Police2 Police3 Police4 Sheriff Sheriff2 PoliceB PoliceT Polmav Riot Policeold1 Policeold2 Predator Fbi Fbi2 PRanger -
CreepPork got a reaction from kingsixII in How many police slots are there?Technically, infinite.
You can add as many police vehicles you want via the DLC feature.
By default there is:
Police Police2 Police3 Police4 Sheriff Sheriff2 PoliceB PoliceT Polmav Riot Policeold1 Policeold2 Predator Fbi Fbi2 PRanger -
CreepPork reacted to Cyan in Who is attacking this website and why?It's not as if the guilty party is going to raise their hand.
-
CreepPork reacted to winject in Dropping WeaponsWhy don't you create an object rather than a pickup?
/* Where modelHash is your weapon hash * x,y,z is the ped position * 1st bool is networkHandle * 2nd bool is createHandle * 3rd bool is dynamic */ NativeFunction.Natives.CreateObject(modelHash, x, y, z, true, true, true); or without the natives :
Rage.Object weapon; Vector3 coords = myPed.Position; // spawn position string weaponModel = ""; // replace it with the objectname (not in hash) weapon = new Rage.Object(weaponModel, coords); // as it is an object, it can not be picked up NativeFunction.Natives.PlaceObjectOnGroundProperly(weapon); // just in case
-
-
-
CreepPork reacted to AlconH in Breaking CarsYou could use something like:
SMASH_VEHICLE_WINDOW, SET_VEHICLE_TYRE_BURST or SET_VEHICLE_DOOR_BROKEN (Haven't tried that last one myself)
Best place to find these is here: http://www.dev-c.com/nativedb/
-
CreepPork reacted to Stealth22 in Setting tasks for peds?Check out the animations list in the Rage documentation: http://docs.ragepluginhook.net/html/62951c37-a440-478c-b389-c471230ddfc5.htm
And the PlayAnimation function of TaskInvoker: http://docs.ragepluginhook.net/html/4DB19EAA.htm
And a basic code example...
(This is very rough, you'll want to add error checking and what not. And my project is in VB.NET, I've translated it into C#, so my C# syntax might be rusty)
Ped myPed = new Ped("ModelName", SpawnPoint); if (myPed != null) { if (myPed.Exists) { // Make the ped walk like he is drunk AnimationSet animSet = new AnimationSet("move_m@drunk@verydrunk"); animSet.LoadAndWait(); myPed.MovementAnimationSet = animSet; // Playing an animation // The list of hyperlinks on the Rage Anim list page is a list of Anim Dictionaries // Each one has a set of animation names underneath it // "amb@world_human_bum_standing@drunk@idle_a" is the dictionary name // And "idle_a" is the anim name // I'm not exactly sure how blend speed (not anim speed, but apparently its the speed that the anim blends in) affects anything, but I just set it to 1 // Anim flags tells GTA to loop the anim, or ragdoll the ped when something hits it, etc. // The object browser or Rage docs can tell you all the AnimationFlags myPed.Tasks.PlayAnimation(New AnimationDictionary("amb@world_human_bum_standing@drunk@idle_a"), "idle_a", 1f, AnimationFlags.RagdollOnCollision); } }
-
CreepPork reacted to Albo1125 in Using Albo1125's APIsHey all,
As you may have noticed, my latest plugins come with an 'API Reference- Developers Only' folder. This means you can change the behaviour of my plugins depending on your wishes! For example, you could use Traffic Policer's API to set a vehicle as uninsured, Arrest Manager's API to request a tow truck for a vehicle and the upcoming British Policing Script's API to set vehicle/person flags in the PNC computer. Lots more fun functions are available for you to discover!
A quick guide on how to do this properly and safely can be downloaded here. Enjoy!
Using Albo1125's APIs.pdf
Changelog:
-
Okay, so following onto my previous thread, I, along with the other devs on LSPDFR are going to create a standardised list of colors for use on blips and routes in LSPDFR API development.
Devs, if you have a scenario that isn't covered by the list, please post below and I'll add it in. If you have any suggestions or ideas, please also post.
GPS BLIPS AND RADAR COLOURS
BLIP SIZES
Blips sizing should be as follows:
Vehicles: 1.0 Peds: 0.75 PEDS + VEHICLE BLIPS
ZONES
Primary search areas (prior to accepting a callout) (Drawing.Color.Yellow)
ROUTES
All routes should be Yellow (Drawing.Color.Yellow)
NOTIFICATIONS, HELP PROMPTS AND SUBTITLES
Ensure that all blips are the same colour as they are when highlighted in any on screen text. For example, suspects are red, and should be highlighted in text as red too. Minimal colour should be used within on-screen text. Color should only be used to highlight key information or to highlight the colour of a particular person or object on the map. Examples: Exactly the same should apply to subtitles at the bottom of the screen. Use color to only highlight the key information. As plugins get updated to follow the above, we'll have a much more immersive plugin system that doesn't have strangely mismatched colours.
@fiskey111, @Albo1125, @Straysify, @Stealth22, @alexguirre, @goigle, @Trinyx, @Darkmyre, @TitanSloth, @Patrinus, @w35, @DemNinjas, @LukeD, @Nutt, @Livia, @Luigi4518, @TheUniT, @Athsro
@FinKone, @DCP1293
-
CreepPork got a reaction from alexguirre in Issue with spawning a police car and lightsThank you, that works brilliant!
-
CreepPork reacted to alexguirre in Issue with spawning a police car and lightsUse the propertie IsSirenOn:
vehicle.IsSirenOn = true;
And if you want the siren to be silent too, use IsSirenSilent :
vehicle.IsSirenSilent = true;
-
CreepPork reacted to alexguirre in [REL | WIP] Wilderness CalloutsReleases - Current version v0.5.0
Released Callouts
Possible illegal hunting Rocks blocking the road Aircraft crash Reckless driver Wanted felon in vehicle Suicide attempt Animal attack Missing person Public disturbance Hostage situation Arson Officer needs transport Attacked police station Demonstration
Extra Features
Air ambulance Vet Binoculars Hunting and fishing license check Helicopter camera
Ambient Events
Someone hunting Public intoxication
Future Callouts
This callouts may or may not be in a future release.
Illegal camping Person littering on park property Trespassing Drunk people on park property Possible illegal fishing Wanted felon on foot
Videos
I accept any suggestions, so you can post here any ideas you have
-
CreepPork got a reaction fromDeactivated Memberin Help with creating calloutsThank you very much that works!
-
CreepPork reacted toDeactivated Memberin Help with creating calloutsTowVehicle() works only for tow-trucks. If you want to attach a trailer to a truck, use the Vehicle.Trailer property : http://docs.ragepluginhook.net/html/F1567E4C.htm
phantomTruck.Trailer = tankerTrailer;tankerTrailer being a Vehicle object.
-
CreepPork reacted to Sam in LSPDFR 0.3 - "Busted!"This is the fourth part of our LSPDFR 0.3 preview series. For more information about the background behind 0.3, check out the third installment in this series here: http://www.lcpdfr.com/forums/topic/55644-lspdfr-03-downtown-police-station/
So, from the hundreds of thousands of videos on YouTube, the near half-million million downloads of the mod itself and the the fact we keep on smashing records, like when we had 5,000 of you crazy folk online at once, we've got this really small, tiny suspicion - and I'm just going on a hunch here - but we think you guys quite like to arrest people?
If there's actually some truth to this wild guess, I'm very happy to tell you that we've got quite the new feature set for when dispensing your own brand of justice is necessary. Don't just take my word for it though, this is one of those occasions where a picture tells probably a lot more than a thousand words.
As you can see, we've implemented a beautiful new gameplay mechanic for performing certain tasks which gives you real-time visual feedback in the form of a progress bar. The cool bit is that it looks like exactly like the user interface found in the original game, too.
Now, instead of simply pointing a gun and pressing a key to arrest a suspect, you have to actually keep aim in their general direction while holding down said control. As you do this, the progress bar fills (and it does so really quickly). Now, we know a lot of people wanted to see the ability to arrest suspects on the ground, so the end result of a successful gunpoint takedown is a suspect laying flat on the floor, ready to be cuffed up. Oh yeah, we're just getting started...
As you might be able to work out, the same new gameplay mechanic is then used for giving the gift of metal bracelets to your suspect, where you actually interactively apply the cuffs; progress meter filling in time with the animation. Not only is this system really cool, but it is also truly immersive - you have complete control over the process meaning that a sudden change in heart can be realised by simply releasing the control. This new system is pretty awesome, and we can't wait for everyone to be able to try it for themselves.
Of course, all of this is a little bit mean so far. We've got people getting guns shoved in their faces as they are forced down to the ground and what not; wouldn't it also be nice to be able to serve up some justice with a friendly smile? We think it would be, so you can now arrest people without using any weapons at all through the way in which this new gameplay mechanic is now tied in with the Stop & Identify feature. When stopping pedestrians on the street, everything works as it did before: pressing E will bring up the same menu with the same options. One key difference, though, is that by merely looking at your target, then pressing and holding the same key, you can begin seamlessly cuffing them on the spot. The results can be quite spectacular.
You've probably sussed that we really like this new mechanic by now, and we hope that you like the sound of it as much as we do. To seal the deal though, you can use the same process to release suspects from handcuffs now. It's as simple as walking behind them and pressing and holding the same key used to set them down on the ground.
-
CreepPork reacted to Sam in LSPDFR 0.3 - Downtown Police StationThis is the third part of our LSPDFR 0.3 preview series. For more information about the background behind 0.3, check out the second installment in this series here: http://www.lcpdfr.com/forums/topic/55363-lspdfr-03-backup-customization
Perhaps one of the hottest talking points about LSPDFR, even way before the modification was released, was the question of if and how LSPDFR would make use of the new police station interior in Downtown Los Santos. Indeed, while we attempted to incorporate the interior into the earliest versions of the mod - we were only really scratching the surface as to the potential it holds. Back then, there was also no way of unlocking the expanded version of the interior featuring the locker room, briefing room and downstairs areas, which always acted as a further limit to any plans we had for it.
The exciting news is that with LSPDFR 0.3, the entire interior is unlocked and open for exploration, and this is where the fun really begins. We've made a big effort to make the station come alive, much like we did the lawyers office in LCPDFR, but on a much larger scale. Now, while to go into great detail about all of the new scenes and scenarios in the station would be telling, you can take a look at a couple of the screenshots provided to get a mere taste of the sights and sounds of the Downtown Police Station.
The cool stuff we've put in with the Downtown Police Station doesn't end there, though. To allow for maximum immersion, you can now actually walk into the locker room and directly go on duty from inside, without any loading screens. By simply approaching the lockers and hitting a key, the camera will seamlessly transition to give a view of the player, with the familiar character selection menu appearing shortly after.
Continuing with this theme, LSPDFR 0.3 also introduces a great deal of new functionality for dealing with arrested perps. We'll cover most of this in the next installment of this series, but for now be safe in the knowledge that 0.3 lets you actually walk inside and drop-off your prisoners directly inside the cells. Plus, for those of you looking for the authentic southern Californian law enforcement experience, you can quite literally throw your prisoners down the stairs on the way there!
Of course, on the topic of arresting people, there's so much more that we could show you, but that'd maybe be a little too much awesomeness to take in for one day. Instead, stay tuned for the next part of this update series - you won't want to miss it!
-
CreepPork reacted toDeactivated Memberin LSPDFR 0.3 Announcement + First Preview -
CreepPork reacted to Sam in LSPDFR 0.3 Announcement + First PreviewAfter a short break from the non-stop development of the first couple of versions of LSPDFR, we're really excited to officially announce the next installment in the series - LSPDFR 0.3. As you might have come to expect, LSPDFR 0.3 takes strongly after its predecessors, introducing a big bunch of groundbreaking new features and gameplay.
With actually only a few weeks of development, it is amazing how far this next version of LSPDFR has come, and the extent of fresh, new content and possibilities that it offers.
You asked, we listened. Arresting suspects has been drastically improved, especially with the brand new addition of interactive cuffing - no guns required!
With 0.3, we've taken the time to rebuild some of the core mechanics of the modification, particularly as it comes to arresting suspects. With a brand new interactive system, you can now easily and seamlessly place stopped suspects in handcuffs. The animations for this are incredibly fluid, as is the way in which the process works, with interactivity being a key component. In 0.3, when you arrest someone, there's a very tangible feeling of control - a massive improvement from earlier versions where, due to a reliance on normal playback, it could often feel as though you had been taken out of the game as you waited for an animation to finish.
The Vapid Police Interceptor makes its LSPDFR debut in 0.3. Well, with our entirely new and seriously powerful XML based backup unit customization, so does every other vehicle (and ped) in your game too!
We'll be sharing more about the features and changes in LSPDFR 0.3 over the next week or so, as we take a more in-depth look at what 0.3 brings to the table, including the full Downtown Police Station interior, amazingly improved interaction with suspects, and much more!
-
CreepPork reacted to LMS in Tips for DevelopersThanks for that, I'm sure it will help people.
A few things I'd like to add...
Don't sleep in your main thread!If you do, I will pay you a visit and it won't be nice! No, but seriously, the Process function is called every tick from LSPDFR's CalloutManager and if you decide to sleep there, you will block other callouts from working correctly. If you need to await something, do it in a separate GameFiber (if it requires game logic) or System.Threading.Thread if not. Use logging!Not only as a beginner, you should use logging extensively. You can create overloads of your logging function so that it only happens in debug build (like most LSPDFR logging) or under certain circumstances (such as logging levels), but use it. It will help you to better understand what went wrong on a user's end. Especially since as a beginner you probably have no real experience with debugging or checking crashes via crash offsets. Note that debugging V is unfortunately not really possible right now, as the DRM doesn't really like it. I didn't test on 393 yet, but earlier versions didn't work well. Keep an eye on performanceEvery now and then it might be a good idea to measure the time the main loop (your Process function) takes to run. 1-2 ms? Good! 20ms? Not so good... Don't be afraid to add a lot of general logic, your CPU can handle it. Game calls and poor code (such as unnecessary loops) will most likely be the cause of performance issues. Use commentsI'm not an idiot, I know what I'm doing here. Sure, now you do. But will you remember why you passed that 0x2 value to the native call in 2 weeks? Chances are you will not. And why did you apply the Wait task to the passenger again? Use comments to describe why you are doing such actions. It will help you later on, trust me. -
CreepPork reacted to Stealth22 in Tips for DevelopersSo being that I am a software developer for a living, I thought I would create this thread to share some tips with fellow developers...especially those who are new.
Anyone can contribute to this topic...I myself am a newbie when it comes to RAGE Plugin Hook and LSPDFR. So anything useful that you come across, feel free to post it!
Some of what I have written below may not make sense to a new programmer, so if you have questions, or it seems like I am speaking Martian, feel free to ask questions!!
I'll start off by saying...
ORGANIZE YOUR CODE!! This means folders and namespaces for just about everything. Don't keep all your classes at the root level, and do not, for god's sake, do every part of your code in the Main class. Feel free to ask questions about this if you are confused, but LukeD's example API is a great way to start with namespaces.
Take advantage of inheritance and polymorphism! Use base classes and interfaces for everything! (Callouts, pedestrians, vehicles, etc) For example, I have started on the framework for my callout plugin. I have a CalloutBase class, which inherits the LSPDFR Callout class, and it has all of my method overrides. The overridden methods in CalloutBase perform any actions which are common to all of my callouts. Each callout type will have its own class, which would, you guessed it: inherit the CalloutBase class. My CalloutBase class implements my "ICalloutBase" interface. The interface is for declaring methods or properties that CalloutBase may not be able to do anything with, but if you use the abstract keyword in C# (or MustOverride in VB.NET), then each callout class/type you create would have it's own set of actions for that function. For example, my ICalloutBase interface declares a method called "OnArrivalAtScene()". The CalloutBase class implements this as an abstract method, meaning, any class that inherits CalloutBase (say, ShotsFiredCall, for example) has to have a method called "OnArrivalAtScene", which would be a set of actions for the program to take when the officer arrives on scene OF THE SHOTS FIRED CALL ONLY. The abstract method I just created would be called in the Process() method of the CalloutBase class. Remember, Process() is an LSPDFR method that is called continuously. CalloutBase performs actions which are common to ALL callouts, including calling the OnArrivalAtScene() method. In CalloutBase.Process(), I check to see if the player's location is getting close to my callout location. If so, and if the callout state is still "Unit Responding", then OnArrivalAtScene() is called, and the state is changed to "At Scene". Now, when you create a ShotsFiredCall class, there is no need to call OnArrivalAtScene() from ShotsFiredCall.Process(), because CalloutBase.Process() has already done it for you! The example I stated above requires you to track the state of the callout (i.e. Dispatched, Unit Responding, At Scene, Call Completed, Call Cancelled, etc), but it just gives you an idea on how efficient you can make your code. Its a bit of legwork in the beginning, but it pays off BIG TIME as your plugin grows and matures. Using base classes and interfaces is not only useful for Callout classes. You can use them to track which Peds are suspects, and which are civilians, or what role a certain vehicle plays in your callout. You can add properties to Peds that don't exist in the Rage Plugin, like "MyPlugin.MySuspect.IsBankRobber", for a simple example.
ERROR HANDLING!! Always, always, ALWAYS use proper error handling. One bad block of code can crash a user's entire game. Use Try...Catch blocks, and use the Catch block to log exceptions, so that when a user says "Your plugin is shit!!", then their log file will tell you what is wrong. Always use Ped.Exists or Vehicle.Exists (I think its called Exists for cars) to make sure that GTA V has not disposed of your object. GTA V does not mess around in terms of garbage collection and memory management. Always check if an object is null, and then if it has an Exists property, check that as well.
ANYONE CAN CODE!! VB.NET and C# are both very easy to learn. It does take years to master programming, and a university education in Computer Science or Software Engineering definitely helps. But if you're a newbie, and want to learn, jump in with both feet! Search Google for tutorials, or buy a book at your local book store. I guarantee that you can write a Hello World! program in less than 5 minutes!
VISUAL STUDIO IS FREE!! That's right! Visual Studio Community Edition 2013 is completely free. It doesn't have all the features that the pros use, but who cares? You aren't a software company!
USE A CODE REPO AND SOURCE CONTROL!! When you download Visual Studio Community, you get the option of creating a Visual Studio Online account. DO IT! Visual Studio Online gives you free and unlimited access to code repositories where you can store and back up your code. If any programmers are reading this, they provide both TFS and Git based repos. Source Control allows you to keep track of each change you make to your code. Last update crashed everyone's GTA? No problem, just roll back your changes! Computer hard drive crash? Laptop stolen? No problem! Once you're up and running, install Visual Studio again, connect to your code repo, and all your code is back! For those that use TFS, you can create work items for yourself to track all changes that you need to make to your plugin. Each time you check in code, you can tie a set of changes (called a changeset) to a specific work item.
BRANCH YOUR CODE!! This, at an elementary level, means to maintain two copies of your code. Your main branch (also referred to as your 'master' or 'trunk' branch) contains the most stable version of your code. Your second branch is called your 'dev', or development branch. All of your code changes and testing should be made on the dev branch. When you're ready to release, you merge all of the relevant changes from your dev branch to the trunk. This allows you to make different code changes to your project, all in parallel. This allowed me to recently release a LSPDFR 0.3 compatibility patch for Code 3 Callouts (I made those code changes in my trunk branch), while still working on the next update in my dev branch. See this MSDN link for more details: https://msdn.microsoft.com/en-us/library/ee782536.aspx
CHECK ALL DEPENDENCIES ON STARTUP!! Check file versions on EVERY DLL or assembly referenced by your project. You don't need to check the Microsoft .NET ones, but you should be checking file versions on RagePluginHook.exe, the LSPDFR DLL, and any other DLL (including RageNative UI, a Common DLL you've written yourself, etc) that is used by your project and needs to be installed in the GTA V folder. And NO, do NOT, I repeat, NOT use the Assembly class to load the DLL's into memory. That is just a waste of resources. Use the GetVersionInfo function of the System.Diagnostics.FileVersionInfo class instead.
More to come...