somedood Posted October 4, 2012 Share Posted October 4, 2012 Hey guys, just wondering if there is any way to change the decal limits ingame (it sucks when youre in a massive firefight with cops and damage decals disappear from my car and the cars around). Googling it gave nothing (I cant be the first one to think of it..) so if anyone knows a way to make decals stay longer (perhaps bodies too?) it would be pretty awesome. Link to comment Share on other sites More sharing options...
Grady Featherstone Posted October 5, 2012 Share Posted October 5, 2012 When you say damage decals, are you talking about, like bullet holes in cars and such? If so, I'm not sure you're going to be able to have much luck in getting that to stay... I may be wrong however, so I'm not saying it's impossible.... To keep dead bodies from despawning should be easy, however. You could try a simple C# script something like this: using System;using GTA;namespace KeepDeadBodiesFromDisappearing{ public class keepDeadBodiesFromDisappearing : Script { Ped[] allPeds; public keepDeadBodiesFromDisappearing() { Interval = 1000; this.Tick += new EventHandler(keepDeadBodiesFromDisappearingTick); } public void keepDeadBodiesFromDisappearingTick(object sender, EventArgs e) { allPeds = World.GetAllPeds(); foreach (Ped deadPed in allPeds) { if (deadPed.isDead) { if (!deadPed.isRequiredForMission) { deadPed.isRequiredForMission = true; } } } } }} What that does is gets all the peds currently in the world, and then checks to see which ones of them are dead... It then sets them as "Mission Peds" which means the game thinks it needs them for a mission and therefore won't delete them.... No guarantee this code will work, as I just quickly wrote it, but I hope it helps you out!!! Just save all that into a blank notepad file and save it as "ihopethatthisscriptworksforyou.cs" (without speech marks ) and place it in your "scripts" folder in your main GTA IV directory!!!! I hope it works for you!!! If not, tell me and I'll see where I went wrong!!! Link to comment Share on other sites More sharing options...
ch3y3zze Posted October 5, 2012 Share Posted October 5, 2012 that will probably mess ur game up because then game wont be able to spawn new peds once it hits the ped limit because ur not deleting dead ones Link to comment Share on other sites More sharing options...
Grady Featherstone Posted October 5, 2012 Share Posted October 5, 2012 True! Yes!!! So somedood, how would you like the peds to disappear? When you get a certain distance away? Or would you like to manually clear them? Something like that maybe? Link to comment Share on other sites More sharing options...
somedood Posted October 6, 2012 Author Share Posted October 6, 2012 Thanks for the help! Wow, I didnt even think manual disappearing is an option, it sounds awesome(going back to previous scenes of massacre with bodies already laying around there). If there is a way to make manual disappearing and having all bodies cleared out in case I die- that would probably be the best. Its a shame there is no way to make damage decals stay on cars, but its no big deal. Link to comment Share on other sites More sharing options...
Grady Featherstone Posted October 6, 2012 Share Posted October 6, 2012 Ok then, well replace everything in the file (original script) with this: using System;using GTA;namespace KeepDeadBodiesFromDisappearing{ public class keepDeadBodiesFromDisappearing : Script { Ped[] allPeds; public keepDeadBodiesFromDisappearing() { Interval = 1000; this.Tick += new EventHandler(keepDeadBodiesFromDisappearingTick); } public void keepDeadBodiesFromDisappearingTick(object sender, EventArgs e) { allPeds = World.GetAllPeds(); foreach (Ped deadPed in allPeds) { if (deadPed.isDead) { if (!deadPed.isRequiredForMission) { deadPed.isRequiredForMission = true; } if (Player.Character.isDead) { deadPed.isRequiredForMission = false; deadPed.Delete(); } } } } }} Alright, now this script will work exactly the same as originally, except now, if you die, all the dead peds will be removed!!!! Try this out and tell us how it goes!!!! Link to comment Share on other sites More sharing options...
somedood Posted October 7, 2012 Author Share Posted October 7, 2012 Hmmm, I dont have a scripts folder in the main game folder, and the closest thing to a .cs type file I had was some .csv files in common/data folder. What did I get wrong? Link to comment Share on other sites More sharing options...
Grady Featherstone Posted October 7, 2012 Share Posted October 7, 2012 Ok, all you have to do is follow a few steps and you're good to go!!! If you don't have a "scripts" folder in your main Grand Theft Auto IV directory, then just create one! Call it "scripts" without the speech marks! Then copy the code just above and paste it into a new notepad file! Then save that file as whateveryouwant.cs It doesn't matter what you call the file, as long as it has a .cs extension! Then make sure you have the Scripthook installed, and I think you will need an ASI loader too!!! Once you have completed all those steps the script should work!!! Here is a link to the Scripthook: http://www.gtaforums.com/index.php?showtopic=392325 And here is an ASI loader: http://www.gtaforums.com/index.php?showtopic=394806 If you still have problems post back and I will see if I missed something!!!!! Link to comment Share on other sites More sharing options...
somedood Posted October 7, 2012 Author Share Posted October 7, 2012 Tried the steps above, with ASI loader game wouldnt start, and after I deleted ASI game crashes as soon as the level is loaded. My bet would be conflict with icenhancer... Link to comment Share on other sites More sharing options...
ch3y3zze Posted October 7, 2012 Share Posted October 7, 2012 no, it's not ice, read my signature LOL if ur using 1.0.4, use scripthook.dll 0.4.0 Link to comment Share on other sites More sharing options...
somedood Posted October 7, 2012 Author Share Posted October 7, 2012 Thanks for the help! Works like a charm, until I die, then game crashes.. Link to comment Share on other sites More sharing options...
ch3y3zze Posted October 7, 2012 Share Posted October 7, 2012 (edited) using System;using GTA;namespace KeepDeadBodiesFromDisappearing{ public class keepDeadBodiesFromDisappearing : Script { Ped[] allPeds; public keepDeadBodiesFromDisappearing() { Interval = 1000; this.Tick += new EventHandler(keepDeadBodiesFromDisappearingTick); } public void keepDeadBodiesFromDisappearingTick(object sender, EventArgs e) { if (Player.Character.isDead) { while (Player.Character.isDead) { Wait(0); } foreach (Ped ped in World.GetAllPeds()) { if (Game.Exists(ped) && ped.isDead) { ped.Delete(); } } } allPeds = World.GetAllPeds(); foreach (Ped deadPed in allPeds) { if (Game.Exists(deadPed) && deadPed.isDead) { if (!deadPed.isRequiredForMission) { deadPed.isRequiredForMission = true; } } } } }} not tested so let us know @Grady Featherstone i thought id move checking the player death out of the loop that sets peds required and just check on the loop then let world load again before deleting the dead peds, in theory should avoid the crash and delete all the saved dead peds Edited October 8, 2012 by ch3y3zze Link to comment Share on other sites More sharing options...
somedood Posted October 8, 2012 Author Share Posted October 8, 2012 Seems to work fine, thanks! Im posting another thread with another cool idea, maybe local script wizards will like it too. Link to comment Share on other sites More sharing options...
ch3y3zze Posted October 8, 2012 Share Posted October 8, 2012 cool glad its workin Link to comment Share on other sites More sharing options...
Grady Featherstone Posted October 8, 2012 Share Posted October 8, 2012 Alright cool!!!! Will check it out! And thanks for the corrections ch3y3zze!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now