Jump to content
LMS

LSPDFR 0.4.2 - New API Functions

Recommended Posts

Now that LSPDFR 0.4.2 has been released, this topic should serve as both, an update on the changes and a discussion about them. If you have any questions or feel like something does not quite do what you would expect it to, please let me know here. A special thanks to @PNWParksFan for his suggestions and testing the API functions. An updated XML is attached to this post.

 

Functions

The following functions have been added to the API:

 

  • AddPedContraband
  • CanPedBePulledOver
  • ClearPedContraband
  • GetCalloutFriendlyName (a callout's friendly name is used for LSPDFR Sync to be displayed instead of the internal callout name)
  • GetPedContraband
  • GetPursuitExclusiveAgencyScriptName
  • IsPedCarryingContraband (this will always return true for any ped before they have been frisked and false after as currently IDs are considered contraband and removed after frisking, this is subject to change)
  • IsPursuitLethalForcePolicySet
  • IsPursuitLethalForceForced
  • IsPursuitTacticsModeEnabled
  • IsPursuitTrackingModeEnabled
  • IsPedShowingBadge
  • IsPedUsingFlashlight
  • IsPedUsingShield
  • IsPedVisualLost (whether visual has been lost in general, see below for comparison)
  • IsPedVisualLostLonger (whether visual has been lost for a moment and the last known position is being searched)
  • RequestBackup (overload for using exact position)
  • SetPedAsArrested (new overload for cuffing, old call is deprecated)
  • SetPursuitLethalForceForced
  • StartTaskParkVehicle

 

We've fixed issues with a few more functions, including ForceEndCurrentPullover, GetCalloutName, SetPersonaForPed and SetPedAsStopped.

 

Events

The following events have been added to the API. Please see the XML documentation for further information.

 

  • BackupUnitCreated
  • PedPresentedId
  • PlayerBadgeShow
  • PulloverTalkingToPedAvailable
  • PursuitSuspectEscaped
  • PursuitPedHasVisualChanged

 

Types

There are two new types available, PedContraband and PedPursuitAttributes. The Callout type has a new attribute FriendlyName which is being used for display purposes for LSPDFR Sync. The default is the internal callout name.

 

Types - PedPursuitAttributes

Please note that the default values are subject to change.

 

Value Type Default Value Description
AverageBurstTireSurrenderTime Integer 30-120

Average time in seconds to surrender when at least one tire is burst.

AverageFightTime  Integer 90

Average time in seconds until a ped will fight cops during a pursuit.

This depends on the pursuit situation, e.g. a suspect far away will not

evaluate this chance.

AverageSurrenderTime  Integer 30

Average time in seconds until a ped will surrender during a pursuit.

This depends on the pursuit situation, e.g. a suspect far away will not

evaluate this chance.

BurstTireMaxDrivingSpeedMult  Float 0.15f

How much the maximum driving speed is affected by a single burst tire.

A value of 0.25f would reduce the driving speed to 0f when all four wheels

on a vehicle are destroyed, whereas a value of 0.5f would have the same

result after just two burst tires.

BurstTireSurrenderMult Float 0.1f

How much the average surrender time of a suspect is affected by a

single burst tire. See BurstTireMaxDrivingSpeedMult for more.

CanUseCars  Boolean True

Whether or not the suspect can use cars.

ExhaustionDuration  Integer 25000-40000

Amount of time before a suspect becomes exhausted.

ExhaustionInterval  Integer 30000-40000

Amount of time a suspect stays exhausted.

HandlingAbility  Float 1.1f

Improvement to suspect's handling for general driving.

HandlingAbilityBurstTireMult  Float 0.2f

How much the suspect's driving ability is affected by a single burst

tire. See BurstTireMaxDrivingSpeedMult for more.

HandlingAbilityTurns  Float 1.3f

Improvement to suspect's handling when turning.

MaxDrivingSpeed  Float 50f

Maximum driving speed.

MaxRunningSpeed  Float 2.6f-2.75f

Maximum running speed.

MaxTurnAggressiveness  Float 1.0f

Maximum modifier for the suspect's aggressiveness to take turns.

MinDrivingSpeed   Float 20.0f

Minimum driving speed.

MinTurnAggressiveness  Float 0.8f

Minimum modifier for the suspect's aggressiveness to take turns.

SurrenderChanceCarBadlyDamaged    Float 50f

Surrender chance after a severe crash that caused the suspect's vehicle

to be damaged.

SurrenderChancePitted    Float 5f

Surrender chance after a PIT.

SurrenderChancePittedAndCrashed    Float 25f

Surrender chance after a PIT that caused the suspect to crash.

SurrenderChancePittedAndSlowedDown   Float 25f

Surrender chance after a PIT that caused the suspect to slow down.

SurrenderChanceTireBurst   Float 25f

Individual surrender chance that is evaluated once per tire burst.

SurrenderChanceTireBurstAndCrashed   Float 25f

Surrender chance after a crash shortly after a tire had burst.

 

 

XML Reference

LSPD First Response.XML

 


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

Share this post


Link to post
Share on other sites

Is SetPedResistanceChance New? What is the default value? Also is it used on frisking only or arrests as well ?

Edited by 420Chuur

Share this post


Link to post
Share on other sites
13 hours ago, 420Chuur said:

Is SetPedResistanceChance New? What is the default value? Also is it used on frisking only or arrests as well ?

It is not new. It ranges from 0-100. There is no specific default value, it is randomly generated based on ped properties ranging from 1 - 14. Upon further looking into it, it is only used to determine whether a vehicle is stolen, its other uses for arrest etc. have been replaced by a new system. I will add a way to influence the new system in the next update.


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

Share this post


Link to post
Share on other sites

could correct this "Forced on" because as the image below indicates, the cops NPC let themselves be touched when we activate "Forced on" instead of making use of their firearm to neutralize the criminal

Capture d’écran (20).png

Share this post


Link to post
Share on other sites
On 6/19/2019 at 4:17 AM, LMS said:

It is not new. It ranges from 0-100. There is no specific default value, it is randomly generated based on ped properties ranging from 1 - 14. Upon further looking into it, it is only used to determine whether a vehicle is stolen, its other uses for arrest etc. have been replaced by a new system. I will add a way to influence the new system in the next update.

Ok cheers! So correct me if i'm wrong, Setting SetPedResistanceChance to 0, would in theory stop my suspects from stealing a vehicle when in a pursuit? Whereas setting it to 100 would guarantee the suspect would steal a vehicle? Maybe could do something along the lines of renaming it to SetPedStealVehicleInPursuitChance & adding a SetPedArrestResistanceChance.
Would love to have my suspects told to surrender, put their hands up as if they're surrendering then take off. Even a SetPedFleeChanceWhileCuffed could be interesting.(Having a ped you've already arrested try to flee while cuffed. Happens all too often IRL.)

Edited by 420Chuur

Share this post


Link to post
Share on other sites

In future builds could you please include the documentation XML somewhere in the manual installer download?


[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!

Share this post


Link to post
Share on other sites

I have a problem because, when I turn on game and on black screen is "Loading Lspdfr" then the message appears 

the "LSPDFR was blocked because it caused the game to freeze" or something like that. Please help me.

RagePluginHook_08072019_140317.log

Edited by Kali11

Share this post


Link to post
Share on other sites

Dear LCPDFR developers and community. I have a problem with lspdfr first response, becouse it crashes everytime whenever I open the game. I really don't know what to do, I spent over 5 hours my time to solve it, but without any success and I'm so sad right now 😞 I have the latest version of the game (patch v1737), RAGE Plugin Hook - Open Alpha - 1.68.1248.15551 (I've alredy tried RAGE Plugin Hook - Open Alpha - 1.68.1248.15551, RAGE Plugin Hook - 1.67.1242.15499, RAGE Plugin Hook - Open Alpha - 0.66.1241.15481, RAGE Plugin Hook - Open Alpha - 0.65.1237.15477), Script Hook V v1.0.1737.0, First Response 0.4.3 (Build 7147) and of course I have legit version of GTA V. My PC specifications: 

Spoiler

Processor Processor type: Intel Core i5 Processor generation: Coffee Lake - 8th generation Processor Model: 8300H (2.3 / 4GHz 4 Core / 8 Fiber) Operating system Operating system / software: Windows 10 Home Display / Graphics Display type: 120 Hz, matt Screen resolution: 1920 x 1080 (Full HD) Screen diagonal ["]: 17.3 Graphics card: NVIDIA GeForce GTX 1050 Graphic memory size [MB]: 2048 Disk drive Optical drive: none Number of hard drives: 2 Hard disk type: HDD, SSD SSD Type: M.2 PCIe / NVMe (Slot) RPM safe records: 5 400 Operation memory Operating memory size [GB]: 8 Memory Type: DDR4 SODIMM (slot) Memory Frequency [MHz]: 2666 Keyboard Numeric keypad: Yes Backlit keyboard: Yes Backlight color: RGB Connection and network Network card type: GLAN, WLAN Wi-Fi by default: a, ac, b, g, n Interface HDMI: Yes mini DisplayPort: Yes USB Type-C: Yes USB 3.0 / 3.1 / 3.2 Gen 1 Type-A: 4 Physical properties and color Black colour Height [mm]: 25 Width [mm] 418 Depth [mm]: 280 Weight [kg]: 2.73 Other parameters Bluetooth: Yes Internal memory [GB]: 1 128

I can play the game, but becouse of lspdfr first response crashes I cannot be a police guy and I cann only play normal story mode (Trainer+Script Hook V is working 100%). I'm new here and I need your help. THANKS A LOT 🙂 

 

PS: I deactivated antivirus and firewall, but nothing changed
 

Share this post


Link to post
Share on other sites

Dear LCPDFR developers and community. I have a problem with lspdfr first response, becouse it crashes everytime whenever I open the game. I really don't know what to do, I spent over 5 hours my time to solve it, but without any success and I'm so sad right now 😞 I have the latest version of the game (patch v1737), RAGE Plugin Hook - Open Alpha - 1.68.1248.15551 (I've alredy tried RAGE Plugin Hook - Open Alpha - 1.68.1248.15551, RAGE Plugin Hook - 1.67.1242.15499, RAGE Plugin Hook - Open Alpha - 0.66.1241.15481, RAGE Plugin Hook - Open Alpha - 0.65.1237.15477), Script Hook V v1.0.1737.0, First Response 0.4.3 (Build 7147) and of course I have legit version of GTA V. My PC specifications: 

Spoiler

Processor Processor type: Intel Core i5 Processor generation: Coffee Lake - 8th generation Processor Model: 8300H (2.3 / 4GHz 4 Core / 8 Fiber) Operating system Operating system / software: Windows 10 Home Display / Graphics Display type: 120 Hz, matt Screen resolution: 1920 x 1080 (Full HD) Screen diagonal ["]: 17.3 Graphics card: NVIDIA GeForce GTX 1050 Graphic memory size [MB]: 2048 Disk drive Optical drive: none Number of hard drives: 2 Hard disk type: HDD, SSD SSD Type: M.2 PCIe / NVMe (Slot) RPM safe records: 5 400 Operation memory Operating memory size [GB]: 8 Memory Type: DDR4 SODIMM (slot) Memory Frequency [MHz]: 2666 Keyboard Numeric keypad: Yes Backlit keyboard: Yes Backlight color: RGB Connection and network Network card type: GLAN, WLAN Wi-Fi by default: a, ac, b, g, n Interface HDMI: Yes mini DisplayPort: Yes USB Type-C: Yes USB 3.0 / 3.1 / 3.2 Gen 1 Type-A: 4 Physical properties and color Black colour Height [mm]: 25 Width [mm] 418 Depth [mm]: 280 Weight [kg]: 2.73 Other parameters Bluetooth: Yes Internal memory [GB]: 1 128

I can play the game, but becouse of lspdfr first response crashes I cannot be a police guy and I cann only play normal story mode (Trainer+Script Hook V is working 100%). I'm new here and I need your help. THANKS A LOT 🙂 

 

PS: I deactivated antivirus and firewall, but nothing changed
 

Share this post


Link to post
Share on other sites
On 27/07/2019 at 19:37, GTAVI said:

Prezados desenvolvedores e comunidade LCPDFR. Eu tenho um problema com a  primeira resposta do lspdfr , porque ela falha sempre que eu abro o jogo. Eu realmente não sei o que fazer, gastei mais de 5 horas o meu tempo para resolvê-lo, mas sem sucesso e estou tão triste agora 😞 eu tenho a última versão do jogo (patch v1737), RAGE Plugin Hook - Open Alpha - 1.68.1248.15551 (Eu já tentei o RAGE Plugin Hook - Open Alpha - 1.68.1248.15551, o RAGE Plugin Hook - 1.67.1242.15499, o RAGE Plugin Hook - Open Alpha - 0.66.1241.15481, o RAGE Plugin Hook - Open Alpha - 0.65 .1237.15477), Script Hook V v1.0.1737.0, Primeira Resposta 0.4.3 (Build 7147) e, claro, eu tenho a versão legítima do GTA V. Minhas especificações de PC: 

  Revelar conteúdos ocultos

Processor Processor type: Intel Core i5 Processor generation: Coffee Lake - 8th generation Processor Model: 8300H (2.3 / 4GHz 4 Core / 8 Fiber) Operating system Operating system / software: Windows 10 Home Display / Graphics Display type: 120 Hz, matt Screen resolution: 1920 x 1080 (Full HD) Screen diagonal ["]: 17.3 Graphics card: NVIDIA GeForce GTX 1050 Graphic memory size [MB]: 2048 Disk drive Optical drive: none Number of hard drives: 2 Hard disk type: HDD, SSD SSD Type: M.2 PCIe / NVMe (Slot) RPM safe records: 5 400 Operation memory Operating memory size [GB]: 8 Memory Type: DDR4 SODIMM (slot) Memory Frequency [MHz]: 2666 Keyboard Numeric keypad: Yes Backlit keyboard: Yes Backlight color: RGB Connection and network Network card type: GLAN, WLAN Wi-Fi by default: a, ac, b, g, n Interface HDMI: Yes mini DisplayPort: Yes USB Type-C: Yes USB 3.0 / 3.1 / 3.2 Gen 1 Type-A: 4 Physical properties and color Black colour Height [mm]: 25 Width [mm] 418 Depth [mm]: 280 Weight [kg]: 2.73 Other parameters Bluetooth: Yes Internal memory [GB]: 1 128

Eu posso jogar o jogo, mas por causa das primeiras falhas de resposta do lspdfr  eu não posso ser um policial  e eu não posso jogar apenas o modo de história normal (Trainer + Script Hook V está funcionando 100%). Eu sou novo aqui e preciso da sua ajuda. MUITO OBRIGADO🙂 

 

PS: Eu desativei antivírus e firewall, mas nada mudou
 

 

Share this post


Link to post
Share on other sites

Guys,
I have a problem with the new version of lspdfr.
when the game start it give me fatal error reason for memory.
Note. 
I'm using the old version of RPH for cracked GTA 1.36 version
anyone know how to fix it and please if you can make a video to  show me how to fix this problem, it will be better for me.
Sorry for bad English. 🙂

Share this post


Link to post
Share on other sites
38 minutes ago, Mohamedhegazy33 said:

Guys,
I have a problem with the new version of lspdfr.
when the game start it give me fatal error reason for memory.
Note. 
I'm using the old version of RPH for cracked GTA 1.36 version
anyone know how to fix it and please if you can make a video to  show me how to fix this problem, it will be better for me.
Sorry for bad English. 🙂

 

sorry.. no support for cracked GTA.

Share this post


Link to post
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...