Jump to content

[Request] API Functions


Recommended Posts

 

For a better integration of LSPDFR existing Features i'm recommending following API features:

 

void setPedAsIdentified()

There exists a "get". A "set" would be great.

-> no arguments because it would be nonsense to set these functions to false

 

void sendIdCheckAnswer()

simply triggering the requesting id check answer from Dispatch as Notification.

 

bool IsPusuitCalledIn()

Does Dispatch know of the current pursuit?

 

void setPusuitAsCalledIn()

for example when calling in the pursuit over Grammar Police instead of holding B.

-> no arguments because it would be nonsense to set these functions to false

 

void SetPedAsArrested(Ped, cuff)

i was unable to grab, put, or release the Ped. When i arrest them normally without code i am able to do so.  -> should be possible.

 

void StartPulloverOnVehicleInPark(Vehicle)

The actual idea was from @Abraxas. Its about stopping a vehicle that is already in park and has not to move any further for the Traffic Stop. For example: stopping a vehicle at a Parking Spot.

Edited by ziipzaaapM16A4
Gramma

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • 3 weeks later...
  • Management Team
On 6/29/2020 at 2:03 AM, ziipzaaapM16A4 said:

 


void sendIdCheckAnswer()

simply triggering the requesting id check answer from Dispatch as Notification.

 

Q: I am not exactly sure what you mean, whose ID should be sent? If you have a screenshot, even better.

 

I have started working on your requests, can you please answer my question above.

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

@LMS all it does is this:

image.png.871af4e05511485c7d26bff03f875df2.png

 

would be cool if you do the same thing with 

void sendPlateCheckAnswer()

 

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • Management Team

Right, so you would actually have an argument (i.e.) the ped? So the full signature would be:

 

void sendIdCheckAnswer(Ped ped)

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

5 minutes ago, LMS said:

Right, so you would actually have an argument (i.e.) the ped? So the full signature would be:

 


void sendIdCheckAnswer(Ped ped)

 

Right. didn't think about that.

so 

void sendPlateCheckAnswer(Vehicle vehicle)

 

but it would still trigger the insurance and registration notification that's always comming along with this message, right? i cant remember from wich plugin this was.

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • Management Team

I have implemented all requests, if you are interested in testing them please send me a PM. Thanks.

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

Thank you very much. I appreciate your work.

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

Further requests 

 

int getVehicleLiveryOfPosition(Vehicle vehicle, Vector3 position)

beieng able to get the right livery for a location is probably one of the most important api functions when using vehicle mods.

void RespondToLocation(Vehicle vehicle, Code code2, Vector3 position)

a driving task from responding units over lspdfr. getting something that is better than GTA V AI.

bool isCopAsBusy(Ped officer)

are there any tasks like responding code2, responding code 3, prisoner transport,

 

 

there was another feature request but i forgot it.

i will add it later.

 

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

On 7/28/2020 at 8:52 AM, ziipzaaapM16A4 said:

int getVehicleLiveryOfPosition(Vehicle vehicle, Vector3 position)

beieng able to get the right livery for a location is probably one of the most important api functions when using vehicle mods.


void RespondToLocation(Vehicle vehicle, Code code2, Vector3 position)

a driving task from responding units over lspdfr. getting something that is better than GTA V AI.

 

A vehicle may not exist in any definition for a particular position. Instead of these two, you can use the existing RequestBackup API functions which already account for the user's preferences for what vehicles and liveries spawn where. 

 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

@PNWParksFan

Quote
Quote


void RespondToLocation(Vehicle vehicle, Code code2, Vector3 position)

a driving task from responding units over lspdfr. getting something that is better than GTA V AI.

 

 

A vehicle may not exist in any definition for a particular position. Instead of these two, you can use the existing RequestBackup API functions which already account for the user's preferences for what vehicles and liveries spawn where. 

 

here im actually just addressing your own request : "Cough cough time for an lspdfr api function RespondToLocation(Vehicle, ResponseType, Vector3)

https://discordapp.com/channels/191266053861539840/191692646241140736/735994769334993016

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Quote
Quote


int getVehicleLiveryOfPosition(Vehicle vehicle, Vector3 position)

beieng able to get the right livery for a location is probably one of the most important api functions when using vehicle mods

 

 

A vehicle may not exist in any definition for a particular position.....

 

It's not about that specific vehicle. It's about the model that is used for this vehicle. The feature should give you an integer that can be used for SET_VEHICLE_LIVERY.

An example for the use of that function would be:

NativeFunction.Natives.SET_VEHICLE_LIVERY( unit, getVehicleLiveryOfPosition(unit, position));

 

I mean I'm aware of the RequestBackup function. But the ped has a task to drive. 

I still could RequestBackup, take the vehicle and delete the Peds to use the vehicle for my own purpose. But I'm still getting a random vehicle from the police vehicle list in the XML.

It takes Resources from the game and would, in case I want a specific vehicle, still not deliver the vehicle I need. And I'm not requesting backup until I get my vehicle. 

 

This function makes it much easier to handle the liverys. But maybe you accept this:

int getVehicleLiveryOfPosition(Model vehicleModel, Vector3 position)

 

 

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

6 hours ago, ziipzaaapM16A4 said:

here im actually just addressing your own request

 

Haha, I forgot I had requested that. Fair enough. 

 

6 hours ago, ziipzaaapM16A4 said:

It's not about that specific vehicle. It's about the model that is used for this vehicle. The feature should give you an integer that can be used for SET_VEHICLE_LIVERY.

 

If you are in downtown los santos and request the livery for "sheriff2", what do you expect to be returned, given that sheriff2 is not configured to respond in that area? What if they removed sheriff2 from all of their backup configs altogether? The requested API method simply doesn't make sense because any given vehicle model is not guaranteed to be in the configuration for any given area. What if there are two different variations defined? 

 

You can call RequestBackup with the "give tasks" argument set to false and with the occupants argument set to just 1 (or possibly even 0, I'll have to test this). This gives you a vehicle and ped(s) spawned from the backup configuration for the particular region but without any tasks applied, so you can then use the vehicle to do whatever you want with it. The occupants argument is in the new version which is currently being developed, which it sounds like LMS has sent you a copy of. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

On 7/30/2020 at 5:32 PM, PNWParksFan said:

If you are in downtown los santos and request the livery for "sheriff2", what do you expect to be returned, given that sheriff2 is not configured to respond in that area? What if they removed sheriff2 from all of their backup configs altogether? The requested API method simply doesn't make sense because any given vehicle model is not guaranteed to be in the configuration for any given area. What if there are two different variations defined? 

 

You can call RequestBackup with the "give tasks" argument set to false and with the occupants argument set to just 1 (or possibly even 0, I'll have to test this). This gives you a vehicle and ped(s) spawned from the backup configuration for the particular region but without any tasks applied, so you can then use the vehicle to do whatever you want with it. The occupants argument is in the new version which is currently being developed, which it sounds like LMS has sent you a copy of. 

I see what you mean.

I just checked the API XML. You're right. This function makes my request obsolet.

Well then I stick to the other 2 requests:

void setCopAsBusy(bool yes)

and

void respondToLocation(...)

 

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • 2 weeks later...

In Addition to what we've already requested:

Events like OnCalloutNotAccepted(LHandle lhandle) or OnCalloutAccepted(LHandle lhandle)

should be overloaded like this:

OnCalloutNotAccepted(Callout callout)

because reflection can break after an update.

 

Reference to the discussion: https://discordapp.com/channels/191266053861539840/191692646241140736/741445779817889894

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • Management Team
On 8/8/2020 at 12:48 PM, ziipzaaapM16A4 said:

In Addition to what we've already requested:

Events like OnCalloutNotAccepted(LHandle lhandle) or OnCalloutAccepted(LHandle lhandle)

should be overloaded like this:

OnCalloutNotAccepted(Callout callout)

because reflection can break after an update.

 

Reference to the discussion: https://discordapp.com/channels/191266053861539840/191692646241140736/741445779817889894

 

The whole idea of the handle is so that things internally can change - if you need specific information exposed via a handle, please let me know.

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

  • 1 month later...

got a new request @LMS:

CopPerformArrest(Ped Cop, Ped Suspect, bool ArrestOnGround)

if false officer would arrest just like holding E in front of an Ped (detaining).

if true officer would arrest like AI already does for example in pursuits.

 

void PlayPedRadioAction()

for having an Ai to play this Animation.

 

void PlayOfficerScannerAudio(string audiostring)

PlayScannerAudio() always uses the DISPATCH_INTRO files. But sometimes a Unit does the radio traffic. 

would be nice if there came a function which would switch to OFFICER_INTRO files

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

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...