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

    1. GTANet.com

    1. GTA Online

      1. The Contract
      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

[SA] Tweak weapon damage with SCM


EAZYJ
 Share

Recommended Posts

Posted (edited)

Hello, quick question: I'd like to know if that is possible to change weapon damages without editing the .dat.

 

For instance, I'd like to edit the MP5 damage. How can I do this? My guess is with 0A8C: write_memory but how to know the code to use? 

 

Thanks.

Edited by EAZYJ
Link to comment
Share on other sites

B1ack_Wh1te
CONST
    WORD                    = 2
    WEAPON_MP5              = 29

    CWeaponInfo__damage         = 0x22
    CWeaponInfo__GetWeaponInfo  = 0x743C60
    
    SKILL_POOR  = 0
    SKILL_STD   = 1
    SKILL_PRO   = 2
    SKILL_COP   = 3
    
    NEW_DAMAGE  = 140
END

0AA7: call_function CWeaponInfo__GetWeaponInfo num_params 2 pop 2 params SKILL_POOR WEAPON_MP5 0@
0@ += CWeaponInfo__damage
0A8C: write_memory 0@ size WORD value NEW_DAMAGE virtual_protect TRUE

0AA7: call_function CWeaponInfo__GetWeaponInfo num_params 2 pop 2 params SKILL_STD WEAPON_MP5 0@
0@ += CWeaponInfo__damage
0A8C: write_memory 0@ size WORD value NEW_DAMAGE virtual_protect TRUE

0AA7: call_function CWeaponInfo__GetWeaponInfo num_params 2 pop 2 params SKILL_PRO WEAPON_MP5 0@
0@ += CWeaponInfo__damage
0A8C: write_memory 0@ size WORD value NEW_DAMAGE virtual_protect TRUE
0A93: end_custom_thread


CWeaponInfo struct:

0x00 m_eFireType     DWORD
0x04 targetRange     DWORD
0x08 m_fWeaponRange  DWORD
0x0C dwModelId1      DWORD
0x10 dwModelId2      DWORD
0x14 nSlot           DWORD
0x18 m_nFlags        DWORD
0x1C AssocGroupId    DWORD
0x20 ammoClip        WORD
0x22 damage          WORD
0x24 fireOffset      FLOAT[3]
0x30 skillLevel      DWORD
0x34 reqStatLevelToGetThisWeaponSkilLevel DWORD
0x38 m_fAccuracy     DWORD
0x3C moveSpeed       DWORD
0x40 animLoopStart   DWORD
0x44 animLoopEnd     DWORD
0x48 animLoopFire    DWORD
0x4C animLoop2Start  DWORD
0x50 animLoop2End    DWORD
0x54 animLoop2Fire   DWORD
0x58 breakoutTime    DWORD
0x5C speed           DWORD
0x60 radius          DWORD
0x64 lifespan        DWORD
0x68 spread          DWORD
0x6C AssocGroupId2   WORD
0x6E baseCombo       BYTE
0x6F m_nNumCombos    BYTE

 

Link to comment
Share on other sites

17 hours ago, Strs said:

or 

{$Cleo}
0000:
      [email protected] = 29 //Mp5
      [email protected] += 0x24
      [email protected] *= 0x70 
      [email protected] += 0xC8AAB8 
      [email protected] += 0x22 // (int) 
0A8C: [email protected] size 4 value 100 vp 0 //damage 100
0A93: end_custom_thread

Cheers, even though I wanted for main.scm only

Link to comment
Share on other sites

Kirbar
On 13.05.2022 at 06:50, B1ack_Wh1te said:
CONST
 WORD = 2
 WEAPON_MP5 = 29

    CWeaponInfo__damage         = 0x22
    CWeaponInfo__GetWeaponInfo  = 0x743C60
 
 SKILL_POOR = 0
 SKILL_STD = 1
 SKILL_PRO = 2
 SKILL_COP = 3
 
 NEW_DAMAGE = 140
КОНЕЦ

0AA7: call_function CWeaponInfo__GetWeaponInfo num_params 2 pop 2 params SKILL_POOR WEAPON_MP5 0@
0@ += CWeaponInfo__damage
0A8C: write_memory 0@ size WORD value NEW_DAMAGE virtual_protect TRUE

0AA7: call_function CWeaponInfo__GetWeaponInfo num_params 2 pop 2 params SKILL_STD WEAPON_MP5 0@
0@ += CWeaponInfo__damage
0A8C: write_memory 0@ размер Значение СЛОВА NEW_DAMAGE virtual_protect TRUE

0AA7: call_function CWeaponInfo__GetWeaponInfo num_params 2 pop 2 params SKILL_PRO WEAPON_MP5 0@
0@ += CWeaponInfo__damage
0A8C: write_memory 0@ size WORD value NEW_DAMAGE virtual_protect TRUE
0A93: end_custom_thread


Структура CWeaponInfo:

0x00 m_eFireType DWORD
0x04 TargetRange DWORD
0x08 m_fWeaponRange DWORD
0x0C dwModelId1 DWORD
0x10 dwModelId2 DWORD
0x14 nSlot DWORD
0x18 m_nFlags DWORD
0x1C AssocGroupId DWORD
0x20 ammoClip WORD
0x22 СЛОВО урона
0x24 fireOffset FLOAT[3]
0x30 skillLevel DWORD
0x34 reqStatLevelToGetThisWeaponSkilLevel DWORD
0x38 m_fAccuracy DWORD
0x3C moveSpeed DWORD
0x40 animLoopStart DWORD
0x44 animLoopEnd DWORD
0x48 animLoopFire DWORD
0x4C animLoop2Start DWORD
0x50 animLoop2End DWORD
0x54 animLoop2Fire DWORD
0x58 breakoutTime DWORD
0x5C speed DWORD
0x60 radius DWORD
0x64 продолжительность жизни DWORD
0x68 spread DWORD
0x6C AssocGroupId2 СЛОВО
БАЙТ 0x6E baseCombo
0x6F m_nNumCombos БАЙТ

 

Как успехи бро? Разблокируй меня в ВК

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.