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. Forum Support

    3. Suggestions

GTA SA Ped Weapons and Behavior


Trimz007
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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
  • Like 2
  • YEE 1
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 years later...
On 7/8/2019 at 1:12 AM, 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

  

 

 

Can you make an android script of it. 

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.