Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Khyy's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,320
    Reputation
    107
    Thanks
    1,493

    Kyron's 'Torn ACL' | Guide on how to create your own LUA hook for GTA V!


    My TORN ACL guide. Ballin' on fools hard enough to tear anybodies ACL. You'll have scripts so tight women & men (if you like that, no judging) will line up just for a taste of that code. And you'll share your awesome work because nobody loves a stingy fool.

    |Requirements|
     

    • GTALUA - This will work
    • Notepad ++ or LUA Editor (I prefer Notepad ++)
    • Visual C++ Redistributable Packages for Visual Studio 2013
    • A small understanding of any scripting language.

    |Resources & Tools|

     

    |Getting Started|

     
    Before we can even begin to get started you need to get yourself a basic template in which you can go off. Alternately if you want to go the extra mile you can visit the wiki of GTALUA and try to make your own from scratch. If not, i'll supply a generic template.

     
    Code:
    generic_template = ScriptThread("generic_template") 
    
    function generic_template:Run()
    while self:IsRunning() do
    if IsKeyDown(110) then
    print("My generic template.")
    end
    self:Wait(50)
    end
    end
    
    function generic_template:OnError()
    
    print("Generic template failed.")
    
    self:Reset()
    
    end
    generic_template:Register()


    Now with this template, open up Notepad ++ and paste it within there. Good, you now have a solid template to begin but before we do start lets be sure you have an understanding as to what is going on in this script as it stands. I would break it down for you.. but thankfully in the world of time saving the author of GTALUA has already well documented it. Take a look here.


    |Editing Hash Values|

     
    Now for the fun part. We're going to get you going on how to edit. I have constantly been asked by people how to do the car sales edit.. so I will tell you how here. *NOTE* I have warned over and over about messing with money. If your account becomes total earned glitched.. do not be mad at me. I am simply feeding the demand of people asking me how it's done.

    Now that we have our script running and it's waiting for something to do while being ran through our command key, let's give it something to do. GTALUA download comes with its list of natives or you can use the link I gave you if you want to expand your view on what can be accomplished through natives. Since we're adjusting our car sales we will be using set_int.

    In GTALUA to direct your script to the natives you will need to add a natives. before calling anything! If you don't have this it WILL not work.

    Navigate to:
    Code:
    print("My generic template.")
    Under it lets begin to add in our code, we've found that we need to use the natives to call our stat edit as well as found out we need set_int:
    Code:
    natives.STATS.STAT_SET_INT
    Perfect! We've so far told the script that on our key down it will adjust the natives stats. But there is a major problem... the script doesn't know where to actually adjust these at. We need to point it there. In our natives you will see a GET_HASH_KEY under GAMEPLAY which can as it says get the hash key for any of the multiplayer stats and etc. Again we need to use natives to access it, so our script should now look like this:
    Code:
     natives.STATS.STAT_SET_INT(natives.GAMEPLAY.GET_HASH_KEY
    We've now successfully told the script we need to change the integer of a stat located in a hash that we're going to find... but we still haven't told it what stat and to which of our characters to apply it too. In our mpstatsettup we need to find our car sales stat with a simple CTRL-F. I keyword searched for EARN MONEY to get to our earned section and found,
    Code:
    <stat Name="MONEY_EARN_SELLING_VEH"  	        Type="int"   SaveCategory="0"   online="true"  profile="true"  ServerAuthoritative="true" FlushPriority="15"  characterStat="true" Owner="coder"  Comment="Money Earn in Selling Vehicles" />
    As you can see the mpstatssetup will give you all information needed to finish the script. It tells you that its a integer type, it's stat name and even a comment on what it does (despite me telling you what it does). Now lets take it and finish our script. We're going to apply this to all characters using the MP command and set it to true (so it's active). Finish your script to look like this,
    Code:
    natives.STATS.STAT_SET_INT(natives.GAMEPLAY.GET_HASH_KEY("MP0_SELLING_VEH"),*INTEGER AMOUNT HERE TO ADJUST CAR VALUE TO*, true)
    You will need to copy that line twice and paste it below the the original. In the two copied replace MP0 with MP1 and MP2 in the other so it applies to all characters. Save your script and try it ingame. You can even add a print under the lines above for a confirmation it worked. Print format - print("infohere")


    In closing bros, the Real MVP was a fun run. But much like a 39 year old Kobe with a torn ACL I think it's best I give the knowledge on how to edit it yourself. I came to this conclusion by the willingness people portrayed in my comments to want to adjust stuff on their own and asking how it was done. Not only that but everything the script did people copied into Alexander Blade's open sourced trainer. Too much spam for ya boy now of the same shit.

  2. The Following 3 Users Say Thank You to Khyy For This Useful Post:

    Corogast (04-29-2015),itzneutron (08-10-2015),Lunatic (05-27-2015)

  3. #2
    Corogast's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    San Antonio, Texas
    Posts
    469
    Reputation
    48
    Thanks
    4,337
    My Mood
    Lurking
    Thanks for this Kyron!
    [MPGH] - [N.E.E.T.]

  4. #3
    caihaibo's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    1
    cooooooooooooooooooooooooool

    - - - Updated - - -

    I just found a lot of the comments in mpstatssetup.xml are not right.

  5. #4
    Corogast's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    San Antonio, Texas
    Posts
    469
    Reputation
    48
    Thanks
    4,337
    My Mood
    Lurking
    Quote Originally Posted by caihaibo View Post
    cooooooooooooooooooooooooool

    - - - Updated - - -

    I just found a lot of the comments in mpstatssetup.xml are not right.
    Oh, how so? :3
    [MPGH] - [N.E.E.T.]

  6. #5
    caihaibo's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Corogast View Post
    Oh, how so? :3
    so I can't be sure what they are working for?

  7. #6
    Corogast's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    San Antonio, Texas
    Posts
    469
    Reputation
    48
    Thanks
    4,337
    My Mood
    Lurking
    Quote Originally Posted by caihaibo View Post
    so I can't be sure what they are working for?
    I am just curious, I want your insight on what things are wrong. I am trying to learn too.
    [MPGH] - [N.E.E.T.]

  8. #7
    Khyy's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,320
    Reputation
    107
    Thanks
    1,493
    You can be sure, they all do work. But some of them require more work. For example anything which has a type of "date" we're still trying to be able to edit. The issue is that both LUA consoles are incorrectly pointing in C++ when building a struct for them. Until that is fixed you can't really edit any date things.

  9. #8
    elysiumpiers's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    570
    Reputation
    95
    Thanks
    410
    My Mood
    Mellow
    When are you releasing the 'Bone Breaker" guide Feat. Kevin Ware?
    Last edited by elysiumpiers; 04-30-2015 at 05:38 AM.

  10. #9
    Khyy's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,320
    Reputation
    107
    Thanks
    1,493
    Quote Originally Posted by elysiumpiers View Post
    When are you releasing the 'Bone Breaker" guide Feat. Kevin Ware?
    LOL. I actually like that, thats the next release name! Shoutout ELYSIUM! EZ E SNIPES

  11. The Following User Says Thank You to Khyy For This Useful Post:

    elysiumpiers (05-03-2015)

  12. #10
    mor0nsoldier's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    14
    Reputation
    10
    Thanks
    0
    Before the update, I had tried making a specific script for my own purpose: Godmode + Inf Ammo + 1HK Bullets.
    Following is a snippet of the code:
    Code:
    PLAYER.SET_PLAYER_INVINCIBLE(playerPed, true)
    PLAYER.SET_PLAYER_WEAPON_DAMAGE_MODIFIER(playerPed, 100)
    WEAPON.SET_PED_INFINITE_AMMO_CLIP(playerPedID, true)
    Here,
    Code:
    playerPedID = PLAYER.PLAYER_PED_ID()
    playerPed = PLAYER.GET_PLAYER_PED(playerPedID)
    Of these 3, only Godmode would work, the rest two won't.
    As per the Natives DB, for WEP_DMG_MOD, the first parameter has to be PlayerPed(or I hope it is) and second parameter is a Float value, I tried passing the PlayerPed itself & even the PlayerPedID and mixed-matched it with a decimal value too(I know LUA treats a number as double precision floating-point by default, but still worth a try!), however it doesn't work no matter what I pass! As far as the INF_AMMO goes, it doesn't work flat out, no matter if I pass a PlayerPedID or the PlayerPed itself!
    Anything I'm missing and/or wrong for these 2 scripts? I'm not that pro at LUA scripting.

    Oh and I tried these scripts in the LUA Hook and the Script Engine both, but same results!
    Thanks in advance, and nice tutorial for those trying to write scripts for themselves!

    Edit: as per NativeDB:
    Code:
    void SET_PED_INFINITE_AMMO_CLIP(Ped PedHandle, BOOL Toggle) // 0x5A5E3B67
    AND
    void SET_PLAYER_WEAPON_DAMAGE_MODIFIER(Player player, float DamageAmount) // 0xB02C2F39
    Last edited by mor0nsoldier; 05-01-2015 at 02:09 PM.

  13. #11
    Meark's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    60
    Reputation
    55
    Thanks
    11
    I appreciate this, can't wait for the scripthook to be fixed. Great release.

  14. #12
    Khyy's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,320
    Reputation
    107
    Thanks
    1,493
    Quote Originally Posted by mor0nsoldier View Post
    Before the update, I had tried making a specific script for my own purpose: Godmode + Inf Ammo + 1HK Bullets.
    Following is a snippet of the code:
    Code:
    PLAYER.SET_PLAYER_INVINCIBLE(playerPed, true)
    PLAYER.SET_PLAYER_WEAPON_DAMAGE_MODIFIER(playerPed, 100)
    WEAPON.SET_PED_INFINITE_AMMO_CLIP(playerPedID, true)
    Here,
    Code:
    playerPedID = PLAYER.PLAYER_PED_ID()
    playerPed = PLAYER.GET_PLAYER_PED(playerPedID)
    Of these 3, only Godmode would work, the rest two won't.
    As per the Natives DB, for WEP_DMG_MOD, the first parameter has to be PlayerPed(or I hope it is) and second parameter is a Float value, I tried passing the PlayerPed itself & even the PlayerPedID and mixed-matched it with a decimal value too(I know LUA treats a number as double precision floating-point by default, but still worth a try!), however it doesn't work no matter what I pass! As far as the INF_AMMO goes, it doesn't work flat out, no matter if I pass a PlayerPedID or the PlayerPed itself!
    Anything I'm missing and/or wrong for these 2 scripts? I'm not that pro at LUA scripting.

    Oh and I tried these scripts in the LUA Hook and the Script Engine both, but same results!
    Thanks in advance, and nice tutorial for those trying to write scripts for themselves!

    Edit: as per NativeDB:
    Code:
    void SET_PED_INFINITE_AMMO_CLIP(Ped PedHandle, BOOL Toggle) // 0x5A5E3B67
    AND
    void SET_PLAYER_WEAPON_DAMAGE_MODIFIER(Player player, float DamageAmount) // 0xB02C2F39
    I would normally help but I am against godmode and other features like 1HK. Maybe Femboy can help with that.

  15. #13
    mor0nsoldier's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    14
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Kyron View Post
    I would normally help but I am against godmode and other features like 1HK. Maybe Femboy can help with that.
    That's alright brother! It'll have to wait till 16th anyways, had a flippin' ban the other day LOL!

  16. #14
    Destroh's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    56
    Reputation
    10
    Thanks
    203
    My Mood
    Mellow
    Thank you! I have been wanting to make my own mods.

  17. #15
    Lunatic's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    𝟙𝟜𝟠𝟠 ꓘΞK
    Posts
    4,772
    Reputation
    1379
    Thanks
    18,376
    My Mood
    Twisted
    Wow, nice tutorial bro. Really not enough hype in these tutorial sections yet. Deserves more likes.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] How To Make Your Own Simple Skin For CS 1.6
    By XownageX in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 21
    Last Post: 07-10-2018, 04:25 PM
  2. How to create your own sound pack for BlackShot.
    By Exile. in forum Blackshot Mods & Modding
    Replies: 9
    Last Post: 06-03-2013, 12:51 AM
  3. [Tutorial] How to Create Your Own Media Server
    By Diminished in forum Playstation Tutorials/Walkthroughs
    Replies: 11
    Last Post: 07-05-2011, 12:16 PM
  4. How to create your own private sever [No Port Foward] [Easy!]
    By FullStatic in forum Minecraft Tutorials
    Replies: 13
    Last Post: 04-28-2011, 01:41 AM
  5. How to create your own scripts?
    By Thunder in forum RuneScape Discussions
    Replies: 5
    Last Post: 09-26-2010, 11:22 AM