alexslx
Members-
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
Everything posted by alexslx
-
LCPD Device Developer API Preview LCPD Device is a very customizable device interface for scripting inside of the GTA IV game. Instead of remembering a large number of hotkeys, you can use it as a graphical interface to interact with your scripts on GTAIV. Better yet, LCPD Device has been build in order to allow 3rd party developers to create new applications for it and extends its functionalities. Features Allow installation of custom device skins. Allow installation of custom applications. Toggle key configurable by its ini file. Notification system allow apps to show you information when the device is hidden. Requirements The latest version of GTA IV or EFLC. GTAIV - 1.0.7.0. EFLC - 1.1.2.0. ScriptHookDotNetDownload Page .NET Framework 4.5Download Page InstallationIn order to start using the LCPD Device, you just need to follow the simple steps below: Download the "LCPD Device X.X.X.X" from Downloads Section (Link below). Copy all contents from the package to the folder "scripts" inside of your main GTAIV or EFLC folder (eg. D:GamesGrand Theft Auto IVGTAIVscripts). Look over our Wiki Pages for more information. Installing 3rd party componentsInstalling third party components is a very easy task, you need go to the "LCPDDevice" folder inside of your "scripts" folder (eg. D:GamesGrand Theft Auto IVGTAIVscriptsLCPDDevice). Therefore, you will see the following structure: apps: Here you can install, enable or disable third party applications. In order to install new apps, just copy the app folder to this folder. data: Here you can find all default collections for GTA infos such as cars, weapons and places. logs: Here you can find all logs created by installed applications. skin: Here you can find all installed skins. In order to install a new skin, just copy the skin folder to this folder and change the selected skin parameter on the main "config.ini" found on the "LCPDDevice" directory. lang: Here you can find all language strings displayed in game by the main application. Installed applications can use these strings or read their version of strings. Screenshots Developers API The main idea behind the LCPD Device has to create a easier way to display a graphical user interface for GTAIV scripts. Therefore, LCPD Device has extended some default functionalities from the ScriptHookDotNet and warped them in a easier way to use. For example, LCPD Device allows to your application load the screen layout from a XML file, allowing a quick edit for your needs. Therefore, to build an application to be used within LCPD Device, there is a documentation file and an example project (view links below). In addition, there will be new API available in the next versions to come, based on both user and developer feedbacks. PLEASE: I really would like to receive some feedback from other developers in order to create a good API (within the GTA limitations, of course) that allow you create new apps for it. Wiki Pages API Documentation Samples repository Copyright Notice Do not copy this script over any modding web site. If you want this mod to be displayed on your website, contact me for uploading so I can track and always keep them updated. Breaking this rule, will imply on a DCMA Takedown request to the website host company, and they always follow it. THE PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
Version 0.0.2.0 BETA
1,172 downloads
LCPD Device Developer API Preview LCPD Device is a very customizable device interface for scripting inside of the GTA IV game. Instead of remembering a large number of hotkeys, you can use it as a graphical interface to interact with your scripts on GTAIV. Better yet, LCPD Device has been build in order to allow 3rd party developers to create new applications for it and extends its functionalities. Features Allow installation of custom device skins. Allow installation of custom applications. Toggle key configurable by its ini file. Notification system allow apps to show you information when the device is hidden. Requirements The latest version of GTA IV or EFLC. GTAIV - 1.0.7.0. EFLC - 1.1.2.0. [*]ScriptHookDotNet Download Page [*].NET Framework 4.5 Download Page Installation In order to start using the LCPD Device, you just need to follow the simple steps below: Download the "LCPD Device Release X.X.X.X". Copy all contents from the package to the folder "scripts" inside of your main GTAIV or EFLC folder (eg. D:GamesGrand Theft Auto IVGTAIVscripts). Look over our Wiki Pages for more information. Installing 3rd party components Installing third party components is a very easy task, you need go to the "LCPDDevice" folder inside of your "scripts" folder (eg. D:GamesGrand Theft Auto IVGTAIVscriptsLCPDDevice). Therefore, you will see the following structure: apps: Here you can install, enable or disable third party applications. In order to install new apps, just copy the app folder to this folder. data: Here you can find all default collections for GTA infos such as cars, weapons and places. logs: Here you can find all logs created by installed applications. skin: Here you can find all installed skins. In order to install a new skin, just copy the skin folder to this folder and change the selected skin parameter on the main "config.ini" found on the "LCPDDevice" directory. lang: Here you can find all language strings displayed in game by the main application. Installed applications can use these strings or read their version of strings. Developers API The main idea behind the LCPD Device has to create a easier way to display a graphical user interface for GTAIV scripts. Therefore, LCPD Device has extended some default functionalities from the ScriptHookDotNet and warped them in a easier way to use. For example, LCPD Device allows to your application load the screen layout from a XML file, allowing a quick edit for your needs. Therefore, to build an application to be used within LCPD Device, there is a documentation file and an example project (view links below). In addition, there will be new API available in the next versions to come, based on both user and developer feedbacks. PLEASE: I really would like to receive some feedback from other developers in order to create a good API (within the GTA limitations, of course) that allow you create new apps for it. Wiki Pages API Documentation Samples repository Copyright Notice Do not copy this script over any modding web site. If you want this mod to be displayed on your website, contact me for uploading so I can track and always keep them updated. Breaking this rule, will imply on a DCMA Takedown request to the website host company, and they always follow it. THE PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -
Okay, I got it. Instead of using the cop relationship for my peds, I changed to Special group and configured the relationship betweens criminals and cops, no more instant crash.
-
You mean the models or the group? The criminals are created using this line: LPed attacker = new LPed(World.GetNextPositionOnStreet(this.attackVehicle.Position), Common.GetRandomCollectionValue<string>(AIHelper.criminalModels), LPed.EPedGroup.Criminal); and these models: "M_Y_THIEF", "M_Y_THIEF", "M_Y_GRUS_LO_01", "M_Y_GRU2_LO_01", "M_Y_GMAF_LO_01", "M_Y_GMAF_HI_01", "M_Y_GTRI_LO_01", "M_Y_GTRI_LO_02", "M_Y_GALB_LO_01", "M_Y_GALB_LO_02" while the security guards are created using this line: this.targetPedList = new LPed(World.GetNextPositionOnStreet(this.targetVehicle.Position), Common.GetRandomCollectionValue<string>(this.securityModels), LPed.EPedGroup.Cop); using these models: "M_M_ARMOURED", "M_M_SECURITYMAN" However, I don't add the security guards to the chase (I think they will react by themselves as they are set to be cops and the criminals will attack them).
-
My scenario is: 1) I spawn the peds on a method and make them wait for the player or my other controlled vehicle get closer... 2) When them get closer, I make them start the attack. I tried to modify the scripts according with you LMS and LtFlash said, but I still getting the same error. This is where I create the peds: this.attackPedList = new List<LPed>(); int count = Common.GetRandomValue(3,6); for (int i = 0; i < count; i++ ) { LPed attacker = new LPed(World.GetNextPositionOnStreet(this.attackVehicle.Position), Common.GetRandomCollectionValue<string>(AIHelper.criminalModels), LPed.EPedGroup.Criminal); attacker.DisablePursuitAI = true; this.SetBasicAttacker(attacker); this.attackPedList.Add(attacker); } This is the method I use to set some ped attributes: private void SetBasicAttacker(LPed ped) { if( !ResourceHelper.CheckForObjectExistance(ped) ) return; DebugHelper.Instance.Log(DebugHelper.ELogType.LOG_DEBUG, "Setting basic attacker ped..."); Functions.SetPedIsOwnedByScript(ped, this, true); Functions.AddToScriptDeletionList(ped, this); //ped.BecomeMissionCharacter(); ped.Accuracy = Common.GetRandomValue(45, 80); ped.IsRequiredForMission = true; ped.BlockPermanentEvents = true; ped.Task.AlwaysKeepTask = true; ped.Health = 200; ped.Armor = 200; ped.WillDoDrivebys = true; ped.RandomizeOutfit(); ped.DefaultWeapon = Common.GetRandomCollectionValue<Weapon>(AIHelper.commonWeapons); } and finally, here is where I'm starting the pursuit: if (this.attackPursuitHandler == null) { this.attackPursuitHandler = Functions.CreatePursuit(); this.StartPursuit(this.attackPursuitHandler); foreach (LPed attacker in this.attackPedList) { if( !ResourceHelper.CheckForObjectExistance(attacker) ) continue; attacker.DisablePursuitAI = false; Functions.SetPedIsOwnedByScript(attacker, this, false); Functions.AddPedToPursuit(this.attackPursuitHandler, attacker); //attacker.Task.FightAgainst(LPlayer.LocalPlayer.Ped); } } I appreciate your help, thank you (both you LMS and LtFlash). @LMS Maybe you can include a check on next version about that? I do not think the LCPDFR should crash when that happen... maybe just ignore? Just a suggestion. Regards,
-
Method to get suspect LVehicle reference during traffic stop?
alexslx replied to Sixforty's topic in API Development
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. -
Method to get suspect LVehicle reference during traffic stop?
alexslx replied to Sixforty's topic in API Development
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: This 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
-
Method to get suspect LVehicle reference during traffic stop?
alexslx replied to Sixforty's topic in API Development
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... -
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,
-
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,
-
[WIP] [beta] WoutersCallouts - More callouts for LCPDFR
alexslx replied to TheWouter's topic in Script Modifications Showroom
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: AdvancedHook.log LCPDFR.log ScriptHook.log ScriptHookDotNet.log asilog.txt 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)