Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

XXgtassholeXX

How to make vehicles in GTA SA stronger?

Recommended Posts

XXgtassholeXX

Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health?

Share this post


Link to post
Share on other sites
Mysterdogg

Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health?

 

Hello, check this link http://projectcerbera.com/gta/sa/tutorials/handling or by simply doing this: decrease the "vehicle damage multiplier flag" value in handling.cfg file.

 

You're not the first or last one asking this.

Edited by Mysterdogg

Share this post


Link to post
Share on other sites
XXgtassholeXX

 

Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health?

 

Hello, check this link http://projectcerbera.com/gta/sa/tutorials/handling or by simply doing this: decrease the "vehicle damage multiplier flag" value in handling.cfg file.

 

You're not the first or last one asking this.

 

Thanks but from what I have seen, it only increases vehicle collision health (i.e. when colliding with surface). when I shoot the vehicle with a shotgun, it still blows up after several shots.

Share this post


Link to post
Share on other sites
Mysterdogg

 

 

Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health?

 

Hello, check this link http://projectcerbera.com/gta/sa/tutorials/handling or by simply doing this: decrease the "vehicle damage multiplier flag" value in handling.cfg file.

 

You're not the first or last one asking this.

 

Thanks but from what I have seen, it only increases vehicle collision health (i.e. when colliding with surface). when I shoot the vehicle with a shotgun, it still blows up after several shots.

 

 

Maybe this could be useful: http://www.mixmods.com.br/2016/02/vehicle-immunities-corrigir-trailers.html

Share this post


Link to post
Share on other sites
Jack

Hardcoded vehicle health could also be altered through this code:

{$CLEO}0000:REPEAT    wait 250UNTIL 0256:   player $PLAYER_CHAR definedCONST    VEHICLE_HEALTH = 1000.0 //  default vehicle valueENDVAR    VEHICLE_HEALTH: floatEND0AC6: [email protected] = label @VehicleHealth offset0085: [email protected] = [email protected]: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8C: write_memory [email protected] size 4 value VEHICLE_HEALTH virtual_protect [email protected] += 40A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8C: write_memory [email protected] size 4 value VEHICLE_HEALTH virtual_protect [email protected] = 0WHILE 2000 >= [email protected]    wait 0    0AC6: [email protected] = label @VehicleHealth offset    0085: [email protected] = [email protected]    [email protected] += 8    0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0    0A8C: write_memory [email protected] size 4 value VEHICLE_HEALTH virtual_protect 0  END0A93: end_custom_thread:VehicleHealthHEX    47 A0 47 00 8A AF 44 00 41 60 6D 00     END
Edited by Jack

Share this post


Link to post
Share on other sites
XXgtassholeXX

Thanks you all. I have made it work!! :lol::lol:

Share this post


Link to post
Share on other sites
Zul5437

How to use that hardcoded?

Share this post


Link to post
Share on other sites
kkjj

Use Mixsets...

And increase the vehicle health.

Share this post


Link to post
Share on other sites
Zul5437

If i install mixset,does it crash my game when i've add new car using limitadjuster?

Share this post


Link to post
Share on other sites
kkjj

No. .

Share this post


Link to post
Share on other sites
psychedelist

Sorry for bumping this, I hope it's ok. I too wish to be able to increase vehicles health, and

 

 

Hardcoded vehicle health could also be altered through this code:

 

this code worked for me, thank you very much. But ideally I wish to be able to differentiate between different vehicles types, so that, for example, bikes and trucks have less and more health than normal cars, respectively. Is there any way to check against the vehicle id in this code?

Edited by psychedelist

Share this post


Link to post
Share on other sites
Jack

Sorry for bumping this, I hope it's ok. I too wish to be able to increase vehicles health, and

 

 

 

this code worked for me, thank you very much. But ideally I wish to be able to differentiate between different vehicles types, so that, for example, bikes and trucks have less and more health than normal cars, respectively. Is there any way to check against the vehicle id in this code?

 

Use the ini file from Junior_Djjr's mod.

Share this post


Link to post
Share on other sites
psychedelist

 

Use the ini file from Junior_Djjr's mod.

 

I had a look at Mix Sets, there seems to be health option for all vehicles (not by types or ids). Did you mean a different mod?

Share this post


Link to post
Share on other sites
Jack

I had a look at Mix Sets, there seems to be health option for all vehicles (not by types or ids). Did you mean a different mod?

 

Using vehicle IDs to set the health:

VehicleImmunities_2.cs:

{$CLEO}0000://---------------Vehicle Health-----------------------repeat    wait 250until 0256:   player $PLAYER_CHAR defined   while true    wait 0    00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]    if 0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 750.0 find_next 0 pass_wrecked 1    then        repeat              0A97: [email protected] = car [email protected] struct            [email protected] += 0x4ED //  possibly not used data?            0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0              if [email protected] <> 1            then                0A97: [email protected] = car [email protected] struct                [email protected] += 0x4ED //  possibly not used data?                0A8C: write_memory [email protected] size 4 value 1 virtual_protect 0                    0441: [email protected] = car [email protected] model                0ADB: [email protected] = car_model [email protected] name                0AD3: string_format [email protected] format "%s%s" 'MODEL_' [email protected]                0AF0: [email protected] = get_int_from_ini_file "cleo\VehicleImmunities_2.ini" section "VehicleHealth" key [email protected]                if [email protected] <> -0x80000000                then                    0224: set_car [email protected] health_to [email protected]                end              end        until 8AE2:   NOT   [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 750.0 find_next 1 pass_wrecked 1    end  end //  while

VehicleImmunities_2.ini:

 

 

[VehicleHealth]    MODEL_LANDSTK      = 1000    MODEL_BRAVURA      = 1000    MODEL_BUFFALO      = 1000    MODEL_LINERUN      = 1000    MODEL_PEREN          = 1000    MODEL_SENTINL      = 1000    MODEL_DUMPER     = 1000    MODEL_FIRETRK      = 1000    MODEL_TRASHM     = 1000    MODEL_STRETCH      = 1000    MODEL_MANANA      = 1000    MODEL_INFERNU      = 1000    MODEL_VOODOO      = 1000    MODEL_PONY          = 1000    MODEL_MULE          = 1000    MODEL_CHEETAH      = 1000    MODEL_AMBULAN      = 1000    MODEL_LEVIATH      = 1000    MODEL_MOONBM      = 1000    MODEL_ESPERAN      = 1000    MODEL_TAXI          = 1000    MODEL_WASHING      = 1000    MODEL_BOBCAT      = 1000    MODEL_WHOOPEE      = 1000    MODEL_BFINJC     = 1000    MODEL_HUNTER     = 1000    MODEL_PREMIER     = 1000    MODEL_ENFORCR      = 1000    MODEL_SECURI      = 1000    MODEL_BANSHEE      = 1000    MODEL_PREDATR      = 1000    MODEL_BUS          = 1000    MODEL_RHINO      = 1000    MODEL_BARRCKS      = 1000    MODEL_HOTKNIF      = 1000    MODEL_ARTICT1      = 1000    MODEL_PREVION      = 1000    MODEL_COACH      = 1000    MODEL_CABBIE      = 1000    MODEL_STALION      = 1000    MODEL_RUMPO      = 1000    MODEL_RCBANDT      = 1000    MODEL_ROMERO     = 1000    MODEL_PACKER      = 1000    MODEL_MONSTER      = 1000    MODEL_ADMIRAL      = 1000    MODEL_SQUALO      = 1000    MODEL_SEASPAR     = 1000    MODEL_PIZZABO     = 1000    MODEL_TRAM          = 1000    MODEL_ARTICT2      = 1000    MODEL_TURISMO      = 1000    MODEL_SPEEDER      = 1000    MODEL_REEFER      = 1000    MODEL_TROPIC      = 1000    MODEL_FLATBED      = 1000    MODEL_YANKEE      = 1000    MODEL_CADDY      = 1000    MODEL_SOLAIR      = 1000    MODEL_TOPFUN     = 1000    MODEL_SKIMMER     = 1000    MODEL_PCJ600     = 1000    MODEL_FAGGIO     = 1000    MODEL_FREEWAY     = 1000    MODEL_RCBARON      = 1000    MODEL_RCRAIDE      = 1000    MODEL_GLENDAL      = 1000    MODEL_OCEANIC      = 1000    MODEL_SANCHEZ     = 1000    MODEL_SPARROW     = 1000    MODEL_PATRIOT      = 1000    MODEL_QUAD          = 1000    MODEL_COASTG      = 1000    MODEL_DINGHY      = 1000    MODEL_HERMES      = 1000    MODEL_SABRE      = 1000    MODEL_RUSTLER     = 1000    MODEL_ZR350      = 1000    MODEL_WALTON      = 1000    MODEL_REGINA      = 1000    MODEL_COMET      = 1000    MODEL_BMX          = 1000    MODEL_BURRITO      = 1000    MODEL_CAMPER      = 1000    MODEL_MARQUIS      = 1000    MODEL_BAGGAGE      = 1000    MODEL_DOZER      = 1000    MODEL_MAVERIC     = 1000    MODEL_SANMAV     = 1000    MODEL_RANCHER      = 1000    MODEL_FBIRANC      = 1000    MODEL_VIRGO      = 1000    MODEL_GREENWO      = 1000    MODEL_JETMAX      = 1000    MODEL_HOTRING      = 1000    MODEL_SANDKIN      = 1000    MODEL_BLISTAC      = 1000    MODEL_POLMAV     = 1000    MODEL_BOXVILL      = 1000    MODEL_BENSON      = 1000    MODEL_MESAA      = 1000    MODEL_RCGOBLI      = 1000    MODEL_HOTRINA      = 1000    MODEL_HOTRINB      = 1000    MODEL_BLOODRA      = 1000    MODEL_RANCHER      = 1000    MODEL_SUPERGT      = 1000    MODEL_ELEGANT      = 1000    MODEL_JOURNEY      = 1000    MODEL_BIKE          = 1000    MODEL_MTBIKE      = 1000    MODEL_BEAGLE     = 1000    MODEL_CROPDST     = 1000    MODEL_STUNT         = 1000    MODEL_PETROL      = 1000    MODEL_RDTRAIN      = 1000    MODEL_NEBULA      = 1000    MODEL_MAJESTC      = 1000    MODEL_BUCCANE      = 1000    MODEL_SHAMAL     = 1000    MODEL_HYDRA         = 1000    MODEL_FCR900     = 1000    MODEL_NRG500     = 1000    MODEL_HPV1000     = 1000    MODEL_CEMENT     = 1000    MODEL_TOWTRUK      = 1000    MODEL_FORTUNE      = 1000    MODEL_CADRONA      = 1000    MODEL_FBITRUK      = 1000    MODEL_WILLARD      = 1000    MODEL_FORKLFT      = 1000    MODEL_TRACTOR      = 1000    MODEL_COMBINE     = 1000    MODEL_FELTZER      = 1000    MODEL_REMING      = 1000    MODEL_SLAMVAN      = 1000    MODEL_BLADE      = 1000    MODEL_FREIGHT     = 1000    MODEL_STREAK     = 1000    MODEL_VORTEX      = 1000    MODEL_VINCENT      = 1000    MODEL_BULLET      = 1000    MODEL_CLOVER      = 1000    MODEL_SADLER      = 1000    MODEL_FIRELA      = 1000    MODEL_HUSTLER      = 1000    MODEL_INTRUDR      = 1000    MODEL_PRIMO      = 1000    MODEL_CARGOBB      = 1000    MODEL_TAMPA         = 1000    MODEL_SUNRISE      = 1000    MODEL_MERIT      = 1000    MODEL_UTILITY      = 1000    MODEL_NEVADA     = 1000    MODEL_YOSEMIT      = 1000    MODEL_WINDSOR      = 1000    MODEL_MONSTA      = 1000    MODEL_MONSTB      = 1000    MODEL_URANUS      = 1000    MODEL_JESTER      = 1000    MODEL_SULTAN      = 1000    MODEL_STRATUM      = 1000    MODEL_ELEGY      = 1000    MODEL_RAINDNC      = 1000    MODEL_RCTIGER      = 1000    MODEL_FLASH      = 1000    MODEL_TAHOMA      = 1000    MODEL_SAVANNA      = 1000    MODEL_BANDITO     = 1000    MODEL_FRFLAT     = 1000    MODEL_STREAKC     = 1000    MODEL_KART         = 1000    MODEL_MOWER         = 1000    MODEL_DUNE          = 1000    MODEL_SWEEPER     = 1000    MODEL_BROADWY      = 1000    MODEL_TORNADO      = 1000    MODEL_AT400         = 1000    MODEL_DFT30      = 1000    MODEL_HUNTLEY      = 1000    MODEL_STAFFRD      = 1000    MODEL_BF400         = 1000    MODEL_NEWSVAN     = 1000    MODEL_TUG         = 1000    MODEL_PETROTR      = 1000    MODEL_EMPEROR      = 1000    MODEL_WAYFARE     = 1000    MODEL_EUROS      = 1000    MODEL_HOTDOG      = 1000    MODEL_CLUB          = 1000    MODEL_FRBOX         = 1000    MODEL_ARTICT3      = 1000    MODEL_ANDROM     = 1000    MODEL_DODO         = 1000    MODEL_RCCAM      = 1000    MODEL_LAUNCH      = 1000    MODEL_POLICAR     = 1000    MODEL_POLICAR     = 1000    MODEL_POLICAR     = 1000    MODEL_RANGER     = 1000    MODEL_PICADOR      = 1000    MODEL_SWATVAN      = 1000    MODEL_ALPHA      = 1000    MODEL_PHOENIX      = 1000    MODEL_GLENSHI      = 1000    MODEL_SADLSHI      = 1000    MODEL_BAGBOXA      = 1000    MODEL_BAGBOXB      = 1000    MODEL_TUGSTAI      = 1000    MODEL_BOXBURG      = 1000    MODEL_FARMTR1      = 1000         MODEL_UTILTR1      = 1000

 

 

 

Edited by Jack

Share this post


Link to post
Share on other sites
psychedelist

 

Using vehicle IDs to set the health:

VehicleImmunities_2.cs:

 

 

That looks awesome, thank you very much. Unfortunately my game crashes when I start new game. I'm not sure what i could try now. My setup is 1.0 game version, latest cleo version (4.3.16), Silent Patch, modified main.scm (but crash occurs with original one as well), modified .dat files (including handling.dat) and several self-made cleo scripts that don't do anything with cars. Is the script dependent on a specific gta_sa.exe version?

 

Edit: I replaced lines reading the ini file with setting to a constant and it doesn't crash now. There must be something wrong with how i save the ini file.

Edited by psychedelist

Share this post


Link to post
Share on other sites
Jack

Edit: I replaced lines reading the ini file with setting to a constant and it doesn't crash now. There must be something wrong with how i save the ini file.

 

The name of the ini file must be the same as in the code (in this case "VehicleImmunities_2.ini").

Share this post


Link to post
Share on other sites
psychedelist

 

The name of the ini file must be the same as in the code (in this case "VehicleImmunities_2.ini").

 

Thanks, I verified that. I just found out that it's this line that causes the crash for me:

0AD3: string_format [email protected] format "%s%s" 'MODEL_' [email protected]

It's like if [email protected] value ends up invalid for some reason, at least at start of new game. I'm currently trying to find a way to check if a variable isn't undefined (I'm new to cleo).

Share this post


Link to post
Share on other sites
Jack

The latest cleo version is not 4.3.16. It's 4.3.22:
http://cleo.li/

Edited by Jack

Share this post


Link to post
Share on other sites
psychedelist

The latest cleo version is not 4.3.16. It's 4.3.22:

http://cleo.li/

I'm sorry, i had updated it using sanny builder, it wasn't a good idea to rely on that. Anyway, i keep crashing on the string_format opcode even using the latest cleo version, no idea what could be wrong with it. I removed that line, as well as "model_" prefixes from the ini file, and now the mod works, thank you very much once again, now i should be able to balance things the way i wanted. If one day I'll feel like releasing what i'm doing, will it be fine to do so if I credit you and put a link to this thread?

 

Also install this mod if you don't want vehicle explodes when it flipped: http://gtaforums.com/topic/527345-iiivcsa-flipped-cars-dont-burn/

Thanks, I was aware of that one.

Share this post


Link to post
Share on other sites
Jack

I'm sorry, i had updated it using sanny builder, it wasn't a good idea to rely on that. Anyway, i keep crashing on the string_format opcode even using the latest cleo version, no idea what could be wrong with it. I removed that line, as well as "model_" prefixes from the ini file, and now the mod works, thank you very much once again, now i should be able to balance things the way i wanted.

If you remove "model_" the code won't work (unleass you remove inside the ini as well).

Instead, you shoud configure your Sanny Builder -> Tools -> Options -> Formats -> (Case converting, set to As is). Then compile the code again (run->compile).

 

If one day I'll feel like releasing what i'm doing, will it be fine to do so if I credit you and put a link to this thread?

That's not a very good idea.

Share this post


Link to post
Share on other sites
psychedelist

If you remove "model_" the code won't work (unleass you remove inside the ini as well).

Instead, you shoud configure your Sanny Builder -> Tools -> Options -> Formats -> (Case converting, set to As is). Then compile the code again (run->compile).

 

 

That's not a very good idea.

I did remove the "model_" prefixes in ini, but thanks for the setting tip, i'll try that as well.

 

I assume you mean that if I publish something, it shouldn't include your code at all, rather than including it w/o credit. I understand, but i really hope you'll release this excellent piece of code in some form, then i'd include only the ini file and refer to your mod as a recommended download.

 

Edit: I noticed that the mod works when you load game for first time (or start new game, in my case), but if you start new game from menu after that, it won't work anymore (until quitting the game completely).

 

Edit2: Happens after walking inside and outside of an interior too (no game saving or loading). I also noticed that if you load a game, then the code will continue to work only near the place where you were before loading, it's like player actor position gets stuck there.

Edited by psychedelist

Share this post


Link to post
Share on other sites
psychedelist

Try now (Case converting, set to As is):

VehicleImmunities_2

VehicleImmunities_2.ini

Thanks a lot, I wasn't passing the first check (which is surprising, I have 1.0, but maybe there's more to it) but the read/write_memory value changes made a difference, now it works after game load/save etc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.