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. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    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

Trimz007

GTA SA Ped Weapons and Behavior

Recommended Posts

Trimz007

Hello, wondering if there's a way to modify weapons that peds hold, like when you activate "peds have weapons" or riot cheat. Can you replace those weapons? Say like a minigun, chainsaw, or katanna. Or just give peds weapons, i found a modding program that seem broken and didn't do anythng. Also can you make peds aim better? I changed up there skill in the PED.DAT file, and it just doesn't seem aggressive enough.

Share this post


Link to post
Share on other sites
Strs

you mean (modify weapons that peds hold) animation like carl johnson hold it ? or you want to replace desired weapon peds that have gun by any cheats riot or "peds have weapons"  just tell what you want be specific please 

Share this post


Link to post
Share on other sites
Trimz007
1 hour ago, Strs said:

you mean (modify weapons that peds hold) animation like carl johnson hold it ? or you want to replace desired weapon peds that have gun by any cheats riot or "peds have weapons"  just tell what you want be specific please 

  • Ok I'll try to be specific, thank you you for helping. Ok so like replaced desired weapons, like when you activate peds have weapons, and instead of using a shotgun, say it gets replaced by a minigun. Is that possible?
  • And then my other question doesn't need to be fulfilled, but it's a plus. It's can the ped NPC'S aim better from a farther distance.
  • I mainly just want peds to have weapons they can't normally have. Pistol=desert eagle, Bat=Chainsaw, shotgun=spas12, M4=minigun. Like that.

Share this post


Link to post
Share on other sites
Strs

yea it can be done ill do it for you 

Share this post


Link to post
Share on other sites
Trimz007
1 hour ago, Strs said:

yea it can be done ill do it for you 

Oh man I can't thank you enough, THANKS DUDE!

Share this post


Link to post
Share on other sites
Strs
Posted (edited)

Here is the Code

 


{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread 'Change_Weapon' 
00D6: if 
8AAB:   not file_exists "cleo\Change_Weapon.ini" 
004D: jump_if_false @Change_Weapon_274 
0AF1: write_int 31 to_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Weapon_ID" //IF and SET 
0AF1: write_int 200 to_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Ammo" //IF and SET 
0AF1: write_int 38 to_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Weapon_ID" //IF and SET 
0AF1: write_int 500 to_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Ammo" //IF and SET 

 

:Change_Weapon_274
0001: wait 5 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @Change_Weapon_274 
0050: gosub @Change_Weapon_308 
0002: jump @Change_Weapon_274 

 

:Change_Weapon_308
0A8D: [email protected] = read_memory 12010640 size 4 virtual_protect 0 
000A: [email protected] += 4 
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
0006: [email protected] = 0 

 

:Change_Weapon_348
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 
000A: [email protected] += 1 
00D6: if and
0029: [email protected] >= 0 
001B: 128 > [email protected] 
004D: jump_if_false @Change_Weapon_481 
005A: [email protected] += [email protected] // (int) 
00D6: if 
056D:   actor [email protected] defined 
004D: jump_if_false @Change_Weapon_481 
00D6: if 
8118:   not actor [email protected] dead 
004D: jump_if_false @Change_Weapon_481 
0470: [email protected] = actor [email protected] current_weapon 
089F: get_actor [email protected] pedtype_to [email protected] 
00D6: if or
0039: [email protected] == 4 
0039: [email protected] == 5 
004D: jump_if_false @Change_Weapon_481 
0050: gosub @Change_Weapon_508 

:Change_Weapon_481
000A: [email protected] += 256 
0019: [email protected] > 35584 
004D: jump_if_false @Change_Weapon_348 
0051: return 

 

:Change_Weapon_508
00D6: if and
0019: [email protected] > 1 
8019:   not [email protected] > 19 
004D: jump_if_false @Change_Weapon_668 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Weapon_ID" //IF and SET 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Ammo" //IF and SET 
00D6: if 
803C:   not [email protected] == [email protected] // (int) 
004D: jump_if_false @Change_Weapon_668 
0002: jump @Change_Weapon_823 

 

:Change_Weapon_668
00D6: if and
0019: [email protected] > 21 
8019:   not [email protected] > 39 
004D: jump_if_false @Change_Weapon_870 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Weapon_ID" //IF and SET 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Ammo" //IF and SET 
00D6: if 
803C:   not [email protected] == [email protected] // (int) 
004D: jump_if_false @Change_Weapon_870 

 

:Change_Weapon_823
0781: get_weapon_with_ID [email protected] model_to [email protected] 
00D6: if 
07DE:   model [email protected] exists // versionB 
004D: jump_if_false @Change_Weapon_870 
048f: actor [email protected] remove_weapons
0247: load_model [email protected] 
038B: load_requested_models 
01B2: give_actor [email protected] weapon [email protected] ammo [email protected] // Load the weapon model before using this 
0249: release_model [email protected] 

:Change_Weapon_870
0051: return 
 

how you set weapon

 

peds who have melee you can set your desired weapon with ID and set amount of ammo 

peds who have any weapon you can set their weapon with ID  and set amount of ammo 

it just the idea you can add some more option like you can set gang weapon with your choice i am playing online game so i took some time for you 

please test it if you like i'll be happy 
 

NOTE: this script don't give any weapon by it self if only peds have weapon then it will work as you ask it works if you enable cheat for peds "riot" or "peds have weapon"

please do what ever you want to add its yours have fun

  

 

 

Edited by Strs
correction

Share this post


Link to post
Share on other sites
Trimz007
2 hours ago, Strs said:

Here is the Code

 


{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread 'Change_Weapon' 
00D6: if 
8AAB:   not file_exists "cleo\Change_Weapon.ini" 
004D: jump_if_false @Change_Weapon_274 
0AF1: write_int 31 to_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Weapon_ID" //IF and SET 
0AF1: write_int 200 to_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Ammo" //IF and SET 
0AF1: write_int 38 to_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Weapon_ID" //IF and SET 
0AF1: write_int 500 to_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Ammo" //IF and SET 

 

:Change_Weapon_274
0001: wait 5 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @Change_Weapon_274 
0050: gosub @Change_Weapon_308 
0002: jump @Change_Weapon_274 

 

:Change_Weapon_308
0A8D: [email protected] = read_memory 12010640 size 4 virtual_protect 0 
000A: [email protected] += 4 
0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 
0006: [email protected] = 0 

 

:Change_Weapon_348
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 
000A: [email protected] += 1 
00D6: if and
0029: [email protected] >= 0 
001B: 128 > [email protected] 
004D: jump_if_false @Change_Weapon_481 
005A: [email protected] += [email protected] // (int) 
00D6: if 
056D:   actor [email protected] defined 
004D: jump_if_false @Change_Weapon_481 
00D6: if 
8118:   not actor [email protected] dead 
004D: jump_if_false @Change_Weapon_481 
0470: [email protected] = actor [email protected] current_weapon 
089F: get_actor [email protected] pedtype_to [email protected] 
00D6: if or
0039: [email protected] == 4 
0039: [email protected] == 5 
004D: jump_if_false @Change_Weapon_481 
0050: gosub @Change_Weapon_508 

:Change_Weapon_481
000A: [email protected] += 256 
0019: [email protected] > 35584 
004D: jump_if_false @Change_Weapon_348 
0051: return 

 

:Change_Weapon_508
00D6: if and
0019: [email protected] > 1 
8019:   not [email protected] > 19 
004D: jump_if_false @Change_Weapon_668 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Weapon_ID" //IF and SET 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Melee_to_Weapon" key "Ammo" //IF and SET 
00D6: if 
803C:   not [email protected] == [email protected] // (int) 
004D: jump_if_false @Change_Weapon_668 
0002: jump @Change_Weapon_823 

 

:Change_Weapon_668
00D6: if and
0019: [email protected] > 21 
8019:   not [email protected] > 39 
004D: jump_if_false @Change_Weapon_870 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Weapon_ID" //IF and SET 
0AF0: [email protected] = get_int_from_ini_file "cleo\Change_Weapon.ini" section "Weapon_to_Weapon" key "Ammo" //IF and SET 
00D6: if 
803C:   not [email protected] == [email protected] // (int) 
004D: jump_if_false @Change_Weapon_870 

 

:Change_Weapon_823
0781: get_weapon_with_ID [email protected] model_to [email protected] 
00D6: if 
07DE:   model [email protected] exists // versionB 
004D: jump_if_false @Change_Weapon_870 
048f: actor [email protected] remove_weapons
0247: load_model [email protected] 
038B: load_requested_models 
01B2: give_actor [email protected] weapon [email protected] ammo [email protected] // Load the weapon model before using this 
0249: release_model [email protected] 

:Change_Weapon_870
0051: return 
 

how you set weapon

 

peds who have melee you can set your desired weapon with ID and set amount of ammo 

peds who have any weapon you can set their weapon with ID  and set amount of ammo 

it just the idea you can add some more option like you can set gang weapon with your choice i am playing online game so i took some time for you 

please test it if you like i'll be happy 
 

NOTE: this script don't give any weapon by it self if only peds have weapon then it will work as you ask it works if you enable cheat for peds "riot" or "peds have weapon"

please do what ever you want to add its yours have fun

  

 

 

Thank you so much, I appreciate your coding skills and the work you put in, and I will have fun. I've always looked for a mod like this!

Share this post


Link to post
Share on other sites
Trimz007

Yep, it works peds have miniguns, I have some hard difficulty gameplay here. Exactly what I wanted. I'll mess with the weapon ID's later. Thanks.

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.