Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Changing the decal limit?


somedood
 Share

Recommended Posts

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

Grady Featherstone

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 tounge.gif) 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!!!

biggrin.gif

Link to comment
Share on other sites

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

Grady Featherstone

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

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

Grady Featherstone

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!!!! biggrin.gif

Link to comment
Share on other sites

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

Grady Featherstone

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!!!!! tounge.gif

Link to comment
Share on other sites

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

 

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 wink.gif

 

@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 by ch3y3zze
Link to comment
Share on other sites

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

Grady Featherstone

Alright cool!!!! Will check it out! And thanks for the corrections ch3y3zze!!!!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.