Space.
-
Posts
231 -
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 Space.
-
-
13 hours ago, LMS said:
That is indeed an issue with the vehicle creation itself then, not the IsValid/Exists check. It should not happen very often (I don't think I've had it once in my five years in V) but it apparently can occur for some people. Best to catch and handle accordingly. Basically the game could not create the vehicle and is telling you that.
I see, very strange. Thanks, truly appreciated.
-
4 hours ago, LukeD said:
To test the theory create a simple bool outside of your loop such as "IsCarSpawned = false", and test the bool before you test the key is pressed. If the bool is false it will go on to test the kyebind.
If the key is down and you spawn the car at the end of the loop set the bool to true, so that the next time you tick round in the loop it will see the bool is true and wont evaluate if the key is pressed.
This did fix the problem and so I was trying to think of some ways that I could delay checking if the key was being pressed again, I came up with the idea to use "GameFiber.Sleep(1000)" at the end of the If statement and it (much to my surprise) worked! And then I restarted my game and it stopped working, and it continues to not work every time I reload the plugin, unless.. while I'm in-game I copy and paste the same .dll into the plugins folder and then load it, it works?
Spoilerpublic static void Main() { GameFiber.StartNew(delegate() { Game.DisplayNotification("Space's Plugin has loaded."); while (true) { GameFiber.Yield(); if (Game.IsKeyDown(Keys.F8)) { Game.DisplayNotification("~b~Spawning ped and vehicle."); if (Game.LocalPlayer.Character.IsInAnyVehicle(true)) Game.LocalPlayer.Character.CurrentVehicle.Delete(); Vehicle car = new Vehicle("FBI2", Game.LocalPlayer.Character.Position, Game.LocalPlayer.Character.Heading); if (car.Exists()) Game.LocalPlayer.Character.WarpIntoVehicle(car, -1); GameFiber.Sleep(1000); } } }); }
-
Thank you both massively for your replies, it will really help me going forward! One thing however,
9 hours ago, LMS said:There is little reason to ever use IsValid as it does not perform a null check. Use Exists which is an extension method and hence can perform a null check. That way you will never get any exceptions you need to handle but instead just get false.
Whether I use Exists or IsValid, I get the same result, an exception if the vehicle doesn't exist. I believe this is so because the exception is coming from the act of creating a new vehicle, as opposed to actually doing stuff with it (this doesn't happen with peds, just vehicles). If I just create a new vehicle and do nothing with it, I'll still get the exception, the try-catch just prevents it from crashing the plugin. Is this normal/expected behaviour?
The exception message is "System.InvalidOperationException: Could not spawn new vehicle." (though it had already spawned the vehicle at this point)
Thanks.
-
2 hours ago, LukeD said:
Hey, thank you! I really appreciate your reply. I managed to replace the second while loop by using an If statement to see if F8 was pressed (not sure if this was the right way to go about it) and I managed to prevent the crashing by using vehicle.IsValid() and using a try-catch to catch the exception.. again, not entirely sure if this was the right way to go about it, but at least it works now so that's an improvement from last time. Do you have any advice on how else I could have done this? I couldn't think of a way to handle the exception from IsValid() other than to use a try-catch, though I feel like this is probably inefficient. (I also understand this is probably extremely painful to look at)
Spoilerpublic static void Main() { GameFiber.StartNew(delegate() { Game.DisplayNotification("Space's Plugin has loaded"); while (true) { GameFiber.Yield(); if (Game.IsKeyDown(Keys.F8)) { Game.DisplayNotification("~b~Spawning ped and vehicle."); try { Vehicle vehicle = new Vehicle("FBI2", Game.LocalPlayer.Character.GetOffsetPositionFront(5f)); if (vehicle.IsValid()) Game.LocalPlayer.Character.WarpIntoVehicle(vehicle, -1); Ped normPed = new Ped(Game.LocalPlayer.Character.GetOffsetPositionFront(5f)); if (normPed.IsValid()) { normPed.Inventory.GiveNewWeapon("weapon_pistol", -1, true); normPed.Tasks.FightAgainst(Game.LocalPlayer.Character); } } catch (Exception e) { Game.LogTrivial(e.ToString()); } } } }); }
-
Sorry if I'm making a really stupid mistake here, I'm new to C# (and coding in general) but whenever I use code that creates a new vehicle, my plugin crashes as soon as it creates that vehicle. Strangely, if I reload the plugin like ~10 times it will stop crashing. Spawning the ped works just fine, it's just the vehicle that's causing the problem. This has been driving me insane for a while and I'm not sure what the issue is.
I'm also not entirely sure what the GameFiber stuff does, is there any documentation that explains this in-depth?
Any help or advice is massively appreciated, the code and RPH log is in the spoiler.
Spoilerpublic static void Main() { GameFiber.StartNew(delegate() { Game.DisplayNotification("Space's Plugin has loaded"); while (true) { while (true) { GameFiber.Yield(); if (Game.IsKeyDown(Keys.F8)) break; } Game.DisplayNotification("~b~Spawning ped and vehicle"); Game.LogTrivial("Spawning ped and vehicle"); Vehicle vehicle = new Vehicle("FBI2", Game.LocalPlayer.Character.Position); Game.LocalPlayer.Character.WarpIntoVehicle(vehicle, -1); Ped normPed = new Ped(Game.LocalPlayer.Character.GetOffsetPositionFront(5f)); } // I'm aware that this is unreachable with the code in its current state GameFiber.Hibernate(); }); }
[3/25/2020 2:46:11 PM.521] Space's Plugin: Spawning ped and vehicle. [3/25/2020 2:46:12 PM.015] Space's Plugin: [3/25/2020 2:46:12 PM.015] Space's Plugin: ============================== [3/25/2020 2:46:12 PM.015] Space's Plugin: UNHANDLED EXCEPTION DURING GAME FIBER TICK [3/25/2020 2:46:12 PM.016] Space's Plugin: ------------------------------ [3/25/2020 2:46:12 PM.016] Space's Plugin: Origin: Game fiber "<UNNAMED THREAD>". [3/25/2020 2:46:12 PM.016] Space's Plugin: ------------------------------ [3/25/2020 2:46:12 PM.016] Space's Plugin: Exception type: System.InvalidOperationException [3/25/2020 2:46:12 PM.016] Space's Plugin: Exception message: Could not spawn new vehicle. [3/25/2020 2:46:12 PM.016] Space's Plugin: ------------------------------ [3/25/2020 2:46:12 PM.016] Space's Plugin: Inner exceptions: [3/25/2020 2:46:12 PM.016] Space's Plugin: ------------------------------ [3/25/2020 2:46:12 PM.016] Space's Plugin: Stack trace: [3/25/2020 2:46:12 PM.016] Space's Plugin: at Rage.Vehicle.HandleVehicleCreation(Model model, Vector3 position, Single heading) [3/25/2020 2:46:12 PM.016] at Rage.Vehicle..ctor(Model model, Vector3 position) [3/25/2020 2:46:12 PM.016] at SpacePlugin.EntryPoint.<>c.<Main>b__0_0() in C:\Users\Space\Desktop\GTA V Stuff\Space's Plugin\SpacePlugin\SpacePlugin.cs:line 33 [3/25/2020 2:46:12 PM.017] at Rage.GameFiber.Main()
-
Before I start I want to say that I'm rather new to editing ped stuff and this is extremely confusing and I'm probably going to explain it badly but I really wanna figure this stuff out so if anyone can help out it would be massively appreciated, and if anything is unclear I can elaborate further.
I use EUP and wish to add a new vest to use in the 'Armor' slot in the EUP menu which is a 'task' component. I have the vest as task_000 (task_000_u.ydd, task_diff_000_a_uni.ytd and task_diff_000_b_uni.ytd). I went into the normal game dlcpacks and found that mpvinewood has many task components, so I went to the EUP dlcpack folder and added a folder named "mp_m_freemode_01_mp_m_vinewood" in eup_componentpeds.rpf. If I place the vest files into this folder they load and work fine as drawable 39 in the 'Armor' slot, however the second texture (task_diff_000_b_uni.ytd) doesn't load.
I went into the normal mpvinewood dlcpack and attempted to edit the the "mp_m_freemode_01_mp_m_vinewood.ymt" file. I used MetaToolkit to convert this into an .xml.
<hash_B29BE228>255 0 1 2 3 255 4 5 6 7 8 9</hash_B29BE228>
As I understand, 255 means the component isn't used but I have come across some conflicting lists as to what these numbers mean. I tried to figure it out myself by going through each <Item> entry under <hash_E2489C4F> and finding whatever one has the same amount of entries as the amount of 'task' files in the dlcpack, which turned out to be the 8th <Item> entry but when I edited the first component entry from:
<Item> <hash_AECFE243 value="5" /> <hash_A7431FBA value="0" /> <hash_4A92222A> <Item> <texId value="0" /> <hash_36896D17 value="255" /> </Item> </hash_4A92222A> <hash_92E68DB3> <hash_A893A361 value="false" /> </hash_92E68DB3> </Item>
To:
<Item> <hash_AECFE243 value="5" /> <hash_A7431FBA value="0" /> <hash_4A92222A> <Item> <texId value="0" /> <hash_36896D17 value="255" /> </Item> <Item> <texId value="0" /> <hash_36896D17 value="255" /> </Item> </hash_4A92222A> <hash_92E68DB3> <hash_A893A361 value="false" /> </hash_92E68DB3> </Item>
The second texture was still not selectable in-game, even though to my understanding this should have added a new texture variant to that component (task_000).
I went into the EUP folder and navigated to "mp_m_freemode_01_mp_m_vinewood" and placed the vest files in there replacing task_000. The vest loaded, but I could not change the texture. I tried putting the vest files into the actual mpvinewood dlcpack folder (first removing it from the EUP one) and again, the vest loaded, but I could not select the second texture.
I understand this is rather long and I may have made it somewhat confusing but I tried to the best of my ability to wrap my head around this. Thank you to anyone that took the time to read this.
-
When trying to edit the content.xml and add an entry you have to provide a "FileType" but there seems to be different ones depending on what the .meta is for. Does anybody have a list or know specifically what FileType something like a "vehicleaihandlinginfo.meta" would use?
Thanks.
-
Hello, whenever I try to apply ped props (ie: hats, glasses, etc) they don't appear on peds, I've tried it through the outfits.xml and agency.xml.
Outfits.xml:
<Variation> <Name>Male Short Sleeve</Name> <ScriptName>male_c</ScriptName> <Gender>male</Gender> <Components> <Component id="1" drawable="121" texture="0" /> <Component id="3" drawable="30" texture="0" /> <Component id="4" drawable="35" texture="0" /> <Component id="5" drawable="52" texture="0" /> <Component id="6" drawable="51" texture="0" /> <Component id="7" drawable="8" texture="0" /> <Component id="8" drawable="56" texture="0" /> <Component id="9" drawable="13" texture="0" /> <Component id="10" drawable="0" texture="0" /> <Component id="11" drawable="190" texture="0" /> </Components> <Props> <Prop id="0" drawable="10" texture="6" /> </Props> </Variation>
Agency.xml:
<Ped prop_head="10" prop_tex_head="6" outfit="lspd.male_c" inventory="patrol">mp_m_freemode_01</Ped>
Not sure what I'm doing wrong, if anything. If someone could help me out I'd really appreciate it, thanks.
-
2 hours ago, FKDZ said:
I requested this too and the devs said it will be in the next patch
That's great news! Thanks for your reply.
-
Hello,
I think it would be nice to have the option to disable the radar 'expanding' when you receive a callout because with people who have things around the radar (PLD, maybe a fuel bar) it sort of just ends up in the middle of the radar which seems rather messy to me, and probably annoys some other people too.
I noticed we have the option to disable the pursuit camera focus so I think this would tie in well with the ability to choose between the new 0.4 features, or the simple 0.3 way.
-
I too would be interested in something like this though I'm not sure how it'd work.
-
2 hours ago, Vaultcop said:
You will need to remove the agency from the other .xml files aswell. For example if you remove the LSSD from your agency.xml file but not your backup.xml file then when you call for backup it will attempt to use LSSD but because the agency has been removed LSPDFR will crash.
Ah, of course! Not sure why I didn't think about that, thanks.
-
Hello,
In my opinion having so many agencies is really messy and confusing, especially when dealing with stuff in the .xml files but when I try to remove an agency from the agency.xml LSPDFR will crash, is there any way around this?
Thanks.
-
8 hours ago, 7K20 said:
I'm having the same issue. Only thing I've found that I have tried yet (currently doing) is going through my installed vehicles and moving those that are high poly, as well as only having the cars I need (main units) installed. Hopefully that works because otherwise I think the only option is a complete reinstall.
I've been looking around and seen that 4k textures on custom vehicles might be contributing to the issue so I went ahead and changed them all to 2048x2048 and it didn't SOLVE the issue but definitely gave me longer in-game before the issues started to arise. I also found that removing (no hate to this guy because his vehicles are awesome) medic4523's Fire & EMS vehicles also helped, which is a terrible shame because I really enjoy them.
-
After about 20 - 35 minutes of playing LSPDFR I get gradual texture loss. It starts off small and then eventually gets to the point where buildings and roads won't load. I've tried reducing graphic settings, removing any 4k liveries, a different gameconfig, and removing plugins and scripts.
My PC is new (got it a few days before christmas) and I'm running a 1080ti and i7 8700k. I also have GTA V on an SSD. Any help in trying to resolve this issue would be extremely appreciated.
-
29 minutes ago, flwpheonix said:
I encountered this today with one of my models...Found the culplrit to be a copy of chassis in the hierarchy.
Not really sure what that means, but this wasn't occuring before the latest GTA update so I believe the model itself is ok.
-
When moving, the lightbar, anything else on the roof and board in the rear window wobble around. I've tried replacing the vehicles.meta with the original and the same with carvariations but that doesn't seem to fix it. Could it be something related to ELS with the new update? This wasn't occuring before the update and the only thing I've changed is the vehicles.meta, ScriptHookV and RPH.
I've attached a video below of what exactly is happening.
-
Resolved the issue, didn't realise I had to setup the setup2.xml and content.xml
-
Hey, so I'm trying to install some of WHISKID's shop mods that replace certain textures and I thought to make life easier I'd just put them into a dlc pack, obviously following their respective paths so with "mods > x64l > levels > gta5 > _cityw > beverly_01 > bh1_14" I would put it into "real_shops > dlc.rpf > x64 > levels > gta5 > _cityw > beverly_01 > bh1_14" (within the dlcpacks area in the mods folder) but it seems that this doesn't override the default textures and I'm not exactly sure why.
I have placed the dlcpack into the dlclist.xml
but it still doesn't seem to work. Maybe there's a really dumb mistake I'm making but I'm really not sure, if anybody can help me out I would very greatly appreciate it, thanks.
-
2 hours ago, 0taku said:
Could be one of two things:
1. It seems that the skin is hard coded into the model, something you can do in zmod. Which means it can't be changed unless your able to edit the model2. The model was made to only use on skin again something that can only be changed if your able to edit the model.
If it's 1 your out of luck and are stuck with the skin it came with. If 2 your stuck with only having one.
That's really unfortunate, it seems the model has quite a few problems since the side windows are also non-existent which is a real shame since it's the only 'cargo' version of the Volkswagen Caddy I can find without emergency lighting.
-
4 minutes ago, trainergames said:
So that car is stuck with only one? and i can't fix it if it is a locked model?
I BELIEVE so but don’t take my word for it, this is just what I gathered from a few minutes of googling.
-
6 minutes ago, trainergames said:
I am having the same problem i would love to know how to fix it.
I believe that when the model is made a certain paint3 thing has to be selected for it to be able to have multiple liveries and that wasn’t done with his model, though that’s what I gathered from the three posts I found that could relate to this issue so don’t take my word for it.
-
Well there's 2 files with the same livery one called "paintjob" and one called "template" though I removed the one called "paintjob" and the livery still shows in-game so I guess it's the one just called "template". Just template, not template_sign_1 or car_sign_1.
-
So I have the vehicle below and the default livery is the Royal Mail one called "template" and "paintjob" and I'm trying to add an alternative livery to the vehicle though I'm not sure how to go about it.
Typically I'd find a car_sign_1 etc and to add another livery I'd just name it car_sign_2 and then add FLAG_HAS_LIVERY in the meta (if necessary) though that doesn't seem to work in this instance.
Vehicle: https://www.gta5-mods.com/paintjobs/royal-mail-vw-caddy Any help would be appreciated, also sorry if this isn't in the right place.


but it still doesn't seem to work. Maybe there's a really dumb mistake I'm making but I'm really not sure, if anybody can help me out I would very greatly appreciate it, thanks.
Ped Scenarios
in API Development
Posted
I'm trying to use Ped Scenarios for a callout but I've come across a few issues.
1) After the scenario has been used once, it won't play if the call is taken again. It only starts working again after I restart the game.
2) I'm unable to get more than one ped to use the same scenario at the same time.
I've looked at the natives surrounding scenarios and found a few that might imply you cannot use the same scenario on more than one ped at the same time. "IS_SCENARIO_OCCUPIED" being one of those. I also found "RESET_SCENARIO_GROUPS_ENABLED" which makes me think I may have to 'reset' the scenario after I'm done using it to be able to re-use it again.
I'm not sure about any of this, I'm just trying to figure out why these issues exist. If anyone can confirm this or give me an idea of how I can troubleshoot this, please do.
Thanks.