alexslx
-
Posts
41 -
Joined
-
Last visited
Content Type
Forums
Gallery
Downloads
Tutorials
News Stories
Wiki
Community Guidelines
LSPDFR BOLO Series
GTA5 Native Database
GTA5 Native Parameters
Release Highlights
LSPDFR Mod Showcase
LML User Contributions
Posts posted by alexslx
-
-
Are you okay with something like this?
if (Functions.IsPlayerPerformingPullover()) { LHandle pullover = Functions.GetCurrentPullover(); if (pullover != null) { LVehicle vehicle = Functions.GetPulloverVehicle(pullover); if (vehicle != null && vehicle.Exists()) { vehicle.AttachBlip().Color = BlipColor.Cyan; if (vehicle.HasDriver) { LPed driver = vehicle.GetPedOnSeat(VehicleSeat.Driver); if (driver != null && driver.Exists()) { string name = driver.PersonaData.FullName; Functions.PrintText("--- Pulling over: " + name + " ---", 10000); // Looking up the driver will make the vehicle explode. Functions.PedLookedUpInPoliceComputer += delegate(PersonaData data) { if (data.FullName == name) { DelayedCaller.Call(parameter => vehicle.Explode(), this, Common.GetRandomValue(5000, 10000)); } }; } } } } }Looks good, my suggestions:
1) Make possible to modify the information before the player check the ID? so we can integrate other plugins with pullovers?
2) Make possible to disable pullovers (Functions.PlayerTogglePullovers(true/false)) -> I'm very bad with functions names.
-
Thanks LtFlash,
I discovered that I was trying to assign a FightAgainst task on a non checked ped.
-----------------
I have just one more error, when I try to create a pursuit, the LCPDFR create the following error:
[ERROR - 10:51:03 AM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.[ERROR - 10:51:03 AM] [] System.Exception: Entity already has an owner! Name: BankTransport Requesting owner name: Chaseat hm.b(gf A_0, Boolean A_1)at eg.b(im A_0, Boolean A_1)at eg.a(ij A_0)at ij..ctor(im A_0, im A_1)at fb.a(eo A_0)at eo.a.Invoke(eo A_0)at eo..ctor(im A_0)at ci.d(im A_0)at gl.f(im A_0)at fd.ad()at h5.ad()at LCPD_First_Response.Engine.Main.c()[ERROR - 10:51:03 AM] [ExceptionHandler] hm.b(gf A_0, Boolean A_1) L_0259eg.b(im A_0, Boolean A_1) L_0171eg.a(ij A_0) L_0089ij..ctor(im A_0, im A_1) L_001dfb.a(eo A_0) L_0145eo+a.Invoke(eo A_0) L_ffffffffeo..ctor(im A_0) L_0016ci.d(im A_0) L_014cgl.f(im A_0) L_001cfd.ad() L_00ddh5.ad() L_046dLCPD_First_Response.Engine.Main.c() L_00f4Error hash: 76E575C87D23CFF3130510369CBAAC5B649D9BB4[ERROR - 10:51:03 AM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.[ERROR - 10:51:03 AM] [] System.Exception: Entity already has an owner! Name: BankTransport Requesting owner name: Chaseat hm.b(gf A_0, Boolean A_1)at eg.b(im A_0, Boolean A_1)at eg.a(ij A_0)at ij..ctor(im A_0, im A_1)at fb.a(eo A_0)at eo.a.Invoke(eo A_0)at eo..ctor(im A_0)at ci.d(im A_0)at gl.f(im A_0)at fd.ad()at h5.ad()at LCPD_First_Response.Engine.Main.c()[ERROR - 10:51:03 AM] [ExceptionHandler] hm.b(gf A_0, Boolean A_1) L_0259eg.b(im A_0, Boolean A_1) L_0171eg.a(ij A_0) L_0089ij..ctor(im A_0, im A_1) L_001dfb.a(eo A_0) L_0145eo+a.Invoke(eo A_0) L_ffffffffeo..ctor(im A_0) L_0016ci.d(im A_0) L_014cgl.f(im A_0) L_001cfd.ad() L_00ddh5.ad() L_046dLCPD_First_Response.Engine.Main.c() L_00f4Error hash: 76E575C87D23CFF3130510369CBAAC5B649D9BB4[ERROR - 10:51:03 AM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.[ERROR - 10:51:03 AM] [] System.Exception: Entity already has an owner! Name: BankTransport Requesting owner name: Chaseat hm.b(gf A_0, Boolean A_1)at eg.b(im A_0, Boolean A_1)at eg.a(ij A_0)at ij..ctor(im A_0, im A_1)at fb.a(eo A_0)at eo.a.Invoke(eo A_0)at eo..ctor(im A_0)at ci.d(im A_0)at gl.f(im A_0)at fd.ad()at h5.ad()at LCPD_First_Response.Engine.Main.c()[ERROR - 10:51:03 AM] [ExceptionHandler] hm.b(gf A_0, Boolean A_1) L_0259eg.b(im A_0, Boolean A_1) L_0171eg.a(ij A_0) L_0089ij..ctor(im A_0, im A_1) L_001dfb.a(eo A_0) L_0145eo+a.Invoke(eo A_0) L_ffffffffeo..ctor(im A_0) L_0016ci.d(im A_0) L_014cgl.f(im A_0) L_001cfd.ad() L_00ddh5.ad() L_046dLCPD_First_Response.Engine.Main.c() L_00f4Error hash: 76E575C87D23CFF3130510369CBAAC5B649D9BB4[ERROR - 10:51:03 AM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.[ERROR - 10:51:03 AM] [] System.Exception: Entity already has an owner! Name: BankTransport Requesting owner name: Chaseat hm.b(gf A_0, Boolean A_1)at eg.b(im A_0, Boolean A_1)at eg.a(ij A_0)at ij..ctor(im A_0, im A_1)at fb.a(eo A_0)at eo.a.Invoke(eo A_0)at eo..ctor(im A_0)at ci.d(im A_0)at gl.f(im A_0)at fd.ad()at h5.ad()at LCPD_First_Response.Engine.Main.c()[ERROR - 10:51:03 AM] [ExceptionHandler] hm.b(gf A_0, Boolean A_1) L_0259eg.b(im A_0, Boolean A_1) L_0171eg.a(ij A_0) L_0089ij..ctor(im A_0, im A_1) L_001dfb.a(eo A_0) L_0145eo+a.Invoke(eo A_0) L_ffffffffeo..ctor(im A_0) L_0016ci.d(im A_0) L_014cgl.f(im A_0) L_001cfd.ad() L_00ddh5.ad() L_046dLCPD_First_Response.Engine.Main.c() L_00f4Error hash: 76E575C87D23CFF3130510369CBAAC5B649D9BB4This is the part where I create the pursuit:if (this.attackPursuitHandler == null) { this.attackPursuitHandler = Functions.CreatePursuit(); foreach (LPed attacker in this.attackPedList) { if( !ResourceHelper.CheckForObjectExistance(attacker) ) continue; Functions.AddPedToPursuit(this.attackPursuitHandler, attacker); attacker.Task.FightAgainst(LPlayer.LocalPlayer.Ped); } Functions.SetPursuitAllowVehiclesForSuspects(this.attackPursuitHandler, true); Functions.SetPursuitAllowWeaponsForSuspects(this.attackPursuitHandler, true); Functions.SetPursuitCopsCanJoin(this.attackPursuitHandler, true); Functions.SetPursuitDontEnableCopBlips(this.attackPursuitHandler, true); Functions.SetPursuitForceSuspectsToFight(this.attackPursuitHandler, true); Functions.SetPursuitIsActiveForPlayer(this.attackPursuitHandler, true); Functions.SetPursuitCalledIn(this.attackPursuitHandler, true); } -
Thank you all, I solved almost everything from there, just need to solve a bug where sometimes the ped get out of game memory and the game get in a infinite loop (I can't even do alt-tab hahaha) with this message:
[ERROR - 8:44:41 AM] [CPedExtension] GetPedFromPool: Possible invalid/dummy handle: -64402944
-
I really think that the way you can do that is getting the vehicle by the position ahead of your car as they always will be there...
-
Hello,
1.) more likely a resource/game issue. As a self test, you can add blips to the peds spawned in OnCalloutAccepted and check when they appear.
2.) You don't have to set IsRequiredForMission is false, it's done by LCPDFR for you in case the ped dies, the callouts ends, LCPDFR is shut down etc.
3.) What do you mean exactly? Removing the ability to pull over your suspect? The ped needs to be in a chase for this. Maybe creating a fake chase (maximum units to zero, not called in) can help here.
4.) It all depends on how you retrieve the object. If you do LPed ped = new LPed(); it can't be null and you only need to call Exists. However other functions will probably return a null pointer if a ped/vehicle is not found, e.g. retrieving one from a vehicle seat. So you'd have to add both checks here. While the null check addresses the .NET object instance existence, Exists checks whether the entity the object instance represents is still valid in-game.
5.) Well because you use GetNextPositionOnStreet it will try to find the closest vehicle node and not use your exact position.
6.) Not really no, it's random.
7.) You can't.
8.) What do you mean?
Hi LMS,
Thank you for your reply (and for LCPDFR :) )
Following up my previous post:
1) I fixed it, I was putting freeze on them :P
2) Okay, now I understand it.
3) On my current situation, I have a friend car with a friend blip on him (without any persuit, I need to follow him), but if I want, I can press SHIFT behind this car and start a pullover, I want to disable this for this car. It is possible?
4) Okay.
5) I'll try to figure out. There is anyway to remove all vehicles around a position?
6) The vehicle calculate the route on time so? And if I use a blip with a route, the ped will have the same route as mine?
7)

8) I want a ped from vehicle1 attack a ped from vehicle2. I'm using FightAgainst (ped1 -> ped2), but sometimes the ped1 (attacker) takes other route and flee from the battle.
9) Can you explain when it is safe to use DelayedCaller.Call? I was trying to use it with a vehicle (spawn, put peds in -> delay -> drive and attack), but it was crashing (and I had Exists() checks inside of the delayed call. It's ok if you don't know because I deleted the logs, so I can't show you

10) It is safe to use List<> on the scripts? Because I read on your blog (I think) that GTAIV uses static arrays for resources allocations... I'm thinking if maybe list dynamic allocation can not mess up with GTAIV memory (I don't know how memory are managed with these scripts...)
Sorry for a lot of questions, especially if any of those are dumb, but I want try to understand how it works.

-
Hi there,
I'm trying to play around with LCPDFR API and I have some questions:
1) I spawn some peds on OnCalloutAccepted(), but when I approach the location ingame, they appear to just be spawned right when I enter on the area (I can see they being spawned ["falling from the sky"]). I'm missing something?
2) AddToScriptDeletionList() takes care of ped/vehicle deletion right? So, when (what kind of condition) I need to set IsRequiredForMission to false? Eg. dying? vehicle exploding? end of callout?
3) There is any way to disable pullout on my mission vehicle?
4) For security checks, should I do (something == null || something.Exists()) or just something.Exists() is fine? On my programming understanding I should check for object null and for exists method (I dont know what this really does).
5) I have a Vector3 where I spawn a vehicle, but the vehicle do not spawn exactly on the position I want... how can I solve this? I'm doing this way: new LVehicle(World.GetNextPositionOnStreet(POSITION), MODEL); Also, I'm not using PlaceOnNextStreetProperly()
6) There is any way to get a vehicle route? I set my vehicle to go to place X, but I want to know the route this vehicle will use...
7) How to make a roadblock using the API?
8) How to make a vehicle attacker other vehicle (not from player)?
Sorry for the long list of questions and thank you in advance.
Regards,
-
Well do me a favor, and uninstall WoutersCallouts. That also used to make my game crash. Just try completely vanilla for a while. If that works, I currently use Wasteland 0.7.0 and it works magically. Also since you've tried with and without ELS tells me you have some sort of modified vehicle...... I would suggest grabbing the 2010 NYPD CVPI from CJ24 as it has never caused a crash for me or his LCPD Pack. Some vehicles will crash your game. Stick to just 1 car model, and when you start getting crashes like that, it's most likely a bad model.
Hi there,
Yes, I tried without WouterCallouts... and it reduced a lot my crashes... now I can survive playing for... 30 minutes (well, its twice the time!).
And I tried without any vehicle mod (just LCPDFR) without ELS, it still crashes sometime...
Well, I really think that GTAIV is not a game to mod on... sometime it will crash somehow.
-
Well, thanks for the answers anyway...
I've tried several times to make it work from the time I made the post until now.
- I tried to re install the game several times.
- I tried to use it on EFLC and GTAIV.
- I tried to do it very careful, installing just LCPDFR without any pluggin or other mods (textures included).
- I tried to install taser manually and with AdvHook
- I tried to use it both with ELS and without it.
- I tried to call r* (joke)
- I tried to use it both with xlive and dsound (NOT together, I know)
Game still crash from 5 to 15 minutes. EFLC appears to take more time to crash than GTAIV in my PC...
I think I wasted a hug number of my SSD lifespan cycles (Yes, I install it on a 500GB SSD to make load faster).
Anyone here have stability to play it more than an hour? Maybe using a older version?
Regards,
-
Suggestion:
Prisoner transport -> Transport ped from A to B, with possibility of an assault
Cover -> Cover bank/MVP/prisoner vehicle in their route. Same possibility of above.
I can image you transporting someone when suddently a big truck smash your side door, and other cars appear opening fire against you like in movies :P
-
You can configure it using the LCPDFR configuration tool inside of LCPDFR folder, or opening the LCPDFR.ini file with some text editor and put your apikey on the "APIKey=" configuration (under Network section). In order to see your key, you can go to https://www.lcpdfr.com/page/csapikeygen
If you can't generate your keys, you should contact the admins (I need to do it, I don't have a key :()
Cheers,
-
- Make sure you aren't using a crack - We don't support cracks
- Update GTA IV to 1.0.7.0 (the latest version of the game, or 1.1.2.0 for EFLC) - This sometimes fixes a wide variety of issues
- Make sure that you run the game as an administrator.
- Make sure that your GTA IV root folder (and every subdirectory) is not set to "read-only"
- Ensure that ScriptHook.dll, ScriptHookDotNet.asi and Dsound.dll OR Xlive.dll are in the GTA IV ROOT folder
- Ensure that there is a folder titled 'LCPDFR' in the ROOT GTA IV folder.
- Check that all the above files exist, if they do not, reinstall LCPDFR with the MANUAL installation.
- Ensure that you are using up to date versions of every LCPDFR dependency and LCPDFR itself.
- Install these: .Net Framework 4.5, Microsoft Visual C++ Redist 2012
Everything above is checked and double checked. I'm running xliveless on steam version, just installed (clean) and LCPD manual installation (tried automatic first, deleted the whole gta, downloaded again, and now manual...). Also, I don't any other mod, texture or something, just the 1.0c installed.
OS: Windows 8
Game: GTA IV (Steam)
Run as admin: Yes
Loader: xliveless (tried with dsound.dll too)
RAM: 16GB
GPU: 760M
Crash: Random crash or message in game saying about report the bug... Tried to set PreloadAllModels to both True and False. I did the manual install of teaser texture and scripts. I don't have ELS installed or something else.
Logs:
my config right now:
LCPDFR.ini.txt (Renamed as forum didn't allow me to post .ini files)
Off-topic: I can't get a api key here as I registered with facebook? My apikey page appears blank, maybe any admin can reset my username to alexslx and a new apikey? :)
Sorry for my english.
Regards,

.png.fdab16d62ab8306ef34cec59284f4b12.png.9d5e6cf9427ad028178843acb6c725cb.png)



Method to get suspect LVehicle reference during traffic stop?
in API Development
Posted
A global setting will be good, but I really think disabling pullover in a specific vehicle sounds good. For example, having a friend's (with a friendly ped) vehicle or something like that. Maybe checking if the vehicle driver have the group cop or the group special with the relationship "friendly" with cops solve that problem.