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

Headshot for all weapons in cleo.


GaryRoachSanderson
 Share

Recommended Posts

GaryRoachSanderson

Is there any way in CLEO to make all weapons able to perform headshots?

Link to comment
Share on other sites

Michael-Knight1
Is there any way in CLEO to make all weapons able to perform headshots?

Compile This Script :

 

{$CLEO}0000:0652: [email protected] = integer_stat 130 while True   if      Player.Defined($PLAYER_CHAR)   then     0652: [email protected] = integer_stat 130     if      001C:   [email protected] > [email protected] // (int)     then     0084: [email protected] = [email protected] // (int)     end // if   endend // while

 

Link to comment
Share on other sites

GaryRoachSanderson

Thanks a lot, Michael-Knight1 biggrin.gif Do you mind explaining the code to me a little? I actually expected more complex memory hacking rather than a simple stat change. What does 0652 do exactly? Thanks again! biggrin.gif

Link to comment
Share on other sites

Michael-Knight1
Thanks a lot, Michael-Knight1 biggrin.gif Do you mind explaining the code to me a little? I actually expected more complex memory hacking rather than a simple stat change. What does 0652 do exactly? Thanks again! biggrin.gif

this is not memory hacking lol.gif .

you need to learn scm codding icon14.gif

Link to comment
Share on other sites

GaryRoachSanderson

I tried the script and it crashes my game when I start a new game or load a save game. But anyway the script doesn't quite make sense since all it does it store the "number of headshots" stats to [email protected] and [email protected] which I don't see how it gives all weapons the ability to perform headshots. And yes I do know some cleo scripting, I just don't know how to create the particular feature I want at the moment.

Link to comment
Share on other sites

Michael-Knight1

 

I tried the script and it crashes my game when I start a new game or load a save game. But anyway the script doesn't quite make sense since all it does it store the "number of headshots" stats to [email protected] and [email protected] which I don't see how it gives all weapons the ability to perform headshots. And yes I do know some cleo scripting, I just don't know how to create the particular feature I want at the moment.

anyways contact goin-god it can to help you about head shot script a lot

 

EDIT : download this script which made by Goin God for GTA Biohazard

 

http://www.gtaforums.com/index.php?showtopic=392999

Edited by Michael-Knight1
Link to comment
Share on other sites

I suggest something like this. Don't have sanny at the moment to compile and test, but it's should work fine.

 

{$CLEO}0000:while true   wait 0   if       Player.Defined($PLAYER_CHAR)   then0A8D: [email protected] = read_memory 0xB74490 size 4 virtual_protect 0000A: [email protected] += 0x40A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0for [email protected] = 0 to 35584 step 0x100    0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0      000A: [email protected] += 0x1      if and      0029:   [email protected] >= 0x00       001B:   0x80 > [email protected]      then           005A: [email protected] += [email protected] // (int)          if          056D: (check) actor [email protected] defined                  then       if           031D:   actor [email protected] hit_by_weapon 57  // 57 by any weapon       then                       if               0AB1: call_scm_func @GetActorDamagingPed 1 [email protected] [email protected]           then                               if                    07D6:   [email protected] == $PLAYER_ACTOR // integer vars                     then                                   0321: AS_actor [email protected] die_headshotted                    end                                          end            end                        end      end           end       end end:GetActorDamagingPed0A96: [email protected] = actor [email protected] [email protected] += 0x764:TestPed0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0if   [email protected] > 0then   0A8D: [email protected] = read_memory 0x00B74490 size 4 virtual_protect 0   0AA8: call_function_method 0x4442D0 struct [email protected] num_params 1 pop 0 [email protected] [email protected]   if       056D:   actor [email protected] defined   then       0AB2: ret 1 [email protected]   endend0AB2: ret 1 -1                       :GetActorDamagingVehicle0A96: [email protected] = actor [email protected] [email protected] += 0x764:TestVehicle0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0if   [email protected] > 0then   0A8D: [email protected] = read_memory 0x00B74494 size 4 virtual_protect 0   0AA8: call_function_method 0x424160 struct [email protected] num_params 1 pop 0 [email protected] [email protected]   if       056E:   car [email protected] defined    then       0AB2: ret 1 [email protected]   endend0AB2: ret 1 -1                       :GetVehicleDamagingPed0A97: [email protected] = car [email protected] [email protected] += 0x50Cjump @TestPed:GetVehicleDamagingVehicle0A97: [email protected] = car [email protected] [email protected] += 0x50Cjump @TestVehicle

 

Edited by ThirteenAG
Link to comment
Share on other sites

GaryRoachSanderson

Thanks a lot, ThirteenAG. smile.gif but no luck, it crashes upon loading the game. By the way, is the scm function :GetActorDamagingPed where we check if an actor has been hit in the head?

Link to comment
Share on other sites

Shame, it should be

0321: AS_actor [email protected] die_headshotted

, because [email protected] is a $PLAYER_ACTOR. Try again.

UPD. Working. http://www.sendspace.com/file/axt72f

Edited by ThirteenAG
Link to comment
Share on other sites

GaryRoachSanderson
Shame, it should be
0321: AS_actor [email protected] die_headshotted

, because [email protected] is a $PLAYER_ACTOR. Try again.

UPD. Working. http://www.sendspace.com/file/axt72f

Thanks man. biggrin.gif It works now. But there is a weird bug still, peds die headshotted as long as they are shot, doesn't matter if they were shot in the leg, hands or body, and not only in the head. Is it possible to fix this please? smile.gif But thanks anyway for your effort in trying to help me, appreciate it. biggrin.gif

Link to comment
Share on other sites

Shame, it should be
0321: AS_actor [email protected] die_headshotted

, because [email protected] is a $PLAYER_ACTOR. Try again.

UPD. Working. http://www.sendspace.com/file/axt72f

Thanks man. biggrin.gif It works now. But there is a weird bug still, peds die headshotted as long as they are shot, doesn't matter if they were shot in the leg, hands or body, and not only in the head. Is it possible to fix this please? smile.gif But thanks anyway for your effort in trying to help me, appreciate it. biggrin.gif

I don't understand, you're trying to make it so peds die instantly when shot in the head, isn't this already coded into the game?

Link to comment
Share on other sites

Hm, i'm misunderstood the question then. This code actually makes every weapon kill peds with a headshot, not exactly like into the original game.

But which weapons can't do a headshots? Because i never noticed that kind of thing.

Link to comment
Share on other sites

GaryRoachSanderson
Hm, i'm misunderstood the question then. This code actually makes every weapon kill peds with a headshot, not exactly like into the original game.

But which weapons can't do a headshots? Because i never noticed that kind of thing.

Hi ThirteenAG, currently in the original game, only a few weapons can perform headshots, as in decapitating the ped's head when they are shot in the head, those that can't includes the 9mm, silenced 9mm, MP5, tec9, mac10. When shot in the head, they die a regular death but without "losing their head" literally. tounge.gif Try to headshot a ped with the M4 and the 9mm pistol, you will see the difference. I have also added many weapons to the game using Ryosuke's Weapon Limit Adjuster, and none of those weapons can make peds "die headshotted", which is why I was looking for a script that solves this problem. smile.gif

 

Cheers! smile.gif

Link to comment
Share on other sites

TheGodfather.

So you want weapons like 9mm to shoot like M4 to make the PED Headshotted.. It looks like you are requesting a mod..

Link to comment
Share on other sites

GaryRoachSanderson
So you want weapons like 9mm to shoot like M4 to make the PED Headshotted.. It looks like you are requesting a mod..

Yup, basically that summarizes what I want to achieve. There already is a script though, so I'm not requesting a mod. smile.gif

Link to comment
Share on other sites

Michael-Knight1

 

So you want weapons like 9mm to shoot like M4 to make the PED Headshotted.. It looks like you are requesting a mod..

Yup, basically that summarizes what I want to achieve. There already is a script though, so I'm not requesting a mod. smile.gif

Requesting ! Lock Topic .

 

Post There : http://www.gtaforums.com/index.php?showtopic=378015&st=0

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 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.