Jump to content

API request: HasBeenBooked, WasPlayerInvolvedInArrest


jtgibson

Recommended Posts

Property LPed.HasBeenBooked

 

I'd like some sort of hook into whether an LPed has been delivered to a police department (the cutscene is playing to remove them from the vehicle) or has been taken in by another unit for prisoner transport (they are now in the back of the transporter), so that I can hook in with a third-party mod to provide a small financial reward for the arrest (e.g., $50).  Currently, in spite of Niko Bellic's impressive resumé on McReary's desk computer, he is not paid for his services except when he writes bogus traffic tickets, which is pretty much the exact opposite of how payment happens in real life! =)  (Not that police are paid a commission or quota in real life or anything, but at least getting some bonuses for the work you do ties the mod back into the game instead of being merely for fun.  Paying a wage based on time spent on duty is easy, but bonuses are a time-honoured convention of the GTA series.)

 

The only mod that currently exists out there to give payouts just runs in parallel (without the API) and gives a cash reward when you target someone and press the E key, so it's a bit of an unsuitable solution (it can be exploited by targetting anyone and hammering the E key, even when not on duty -- and is also severely incompatible if another mod wants to use the target+E for anything else -- and its solution to the problem is basically "scout's honour", which is a terrible form of game design... unless you're playing Calvinball ;-)).

 

Method LPed.WasPlayerInvolvedInArrest(Ped player)

 

I'd also like a boolean that flags positively only if the player was actually instrumental in the LPed's arrest in some fashion -- this one is a bit harder to define semantically, but most simply, it would require the player to have gotten out of the vehicle at least once during the chase and to have targetted the NPC at least once.  Otherwise, this would mean that the player more or less allowed the NPCs to handle it, contributing only in a de minimus sense at best.

 

To be properly generic and to work for multiplayer it might be necessary to track this data for any arbitrary number of officer peds, which gives potential for non-existing object script errors, so ideally it would be limited to tracking only peds that are found under any connected client's Player class.

 

This one is a huge can of worms, though, so it might be much harder to implement -- it would require, at a minimum, a tick-based script that flags when an LPed has been targetted and when the player has gotten out of his police vehicle, and which sets another flag if both conditionals are true.  Resetting the flag is at least easy, since it can just hook onto the Alt+E 10-8.  Based on difficulty it might better be left for a third-party mod, but I'll put it out there anyway since a good API exposes just about every logical event. =)

Edited by jtgibson
Link to comment
Share on other sites

  • Management Team

Hello,

 

about the first thing. What do you want? A property or a hook? The property will depend on an existing LPed instance so you would have to have access to the ped currently being arrested/taken into custody.

 

As for your method, sorry, but I'm not going that far and integrate it as you said, not worth the effort. But I can give you access to the pool of all (existing) LPeds so you can run that loop in your own script.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

I don't know about the whole wage payment thing for this. I can't see how it would be effective. I mean you would have to write a huge amount into the game to take into account wages in and expenditure for it to make any sense.

If LMS was to implement this property to determine if the ped was booked how would anyone else benefit from it?

 

I mean let's assume a player gets booked, that property is checked. Ok so now you have a statement which says "yes he was booked, proceed down X path in the code" What is the X path? You could reward the player, as you stated with a wage. What else could you do? Increase a fictional points system for the player's skill or rank, would be the same as the wage system pretty much.

I can only see it being useful if you intend to write a new system into the game which will be updated by this.

 

Maybe i'm interpreting it wrong.

 

Also, not directly relevant, hence the spoiler, but you made a large point about this payment scheme, my thoughts are below.

Take the following example.

 

Player arrests 10 peds in one day, receives daily wage and any bonus available, including traffic tickets. Lets say he earned $2000.

GTA IV's money counter would increase by $2000 as expected.

Player then plays through the night as well and into the next day, repeats the exact same and receives a further $2000.

In just under an hour of IRL time the player has earned $4000 in the game, which gets saved.

Great, so now the player has $4000 + whatever he already had from story progression in GTA IV.

 

If he repeats this for a couple of hours each day he will be ludicrously rich for no reason whatsoever. We all know GTA IV has bugger all in the way of shopping, you can buy clothes for Nico and guns. And some food. So unless you plan on going out of LCPDFR and into ordinary gameplay for an hour each day and buying all the clothes and guns each day. You are just going to rack up money and thus might as well use the money cheat.

 

So if you did implement a payment system into the API and consequently LCPDFR, you would also need expenditure for things.

Example: 

Property damage during chases.

Damage to the police car (repair bills etc)

Healthcare (already in gta iv, but I don't remember if you pay for it after a particular point in the game)

Deductions for traffic offenses (running red lights without due cause etc) and for civilian casualties.

 

For me personally, I like the idea of a wage system, but it's either going to be a whole bunch of effort, or nothing at all.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...