Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      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

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

How do I restore all my current weapon after I die then respawn


skatefilter5
 Share

Recommended Posts

skatefilter5

As I die from gang wars and I re-spawn by destroying the old player then creating a new player but mainly I lose all my weapons completely, I just manually add the weapons but current weapons within current ammo.

 

 

I tried this code

04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 2 weapon $14 ammo $15 model $16
After I die, I re-spawn
01B2: give_actor $PLAYER_ACTOR weapon $14 ammo $15 // Load the weapon model before using this
It didn't work, to keep current weapons and holding current weapon I'm using to keep firing. In fact with won't bypass [email protected] because it will give me a message: Local variable 34 is out of range. In threads max variable is [email protected] How did anyone bypass [email protected]? I can't use .cm.
04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 4 weapon [email protected] ammo [email protected] model [email protected]
04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 5 weapon [email protected] ammo [email protected] model [email protected]
04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 6 weapon [email protected] ammo [email protected] model [email protected]
01B2: give_actor $PLAYER_ACTOR weapon [email protected] ammo [email protected]// Load the weapon model before using this
01B2: give_actor $PLAYER_ACTOR weapon [email protected] ammo [email protected]// Load the weapon model before using this
It works for current weapon anyway but I don't know why the $ won't work because this $ is unlimited.
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP Model.Load(#CELLPHONE)Model.Load(#MAVERICK)Model.Load(#SILENCED)Model.Load(#DESERT_EAGLE)Model.Load(#CHROMEGUN)Model.Load(#SAWNOFF)Model.Load(#SHOTGSPA)Model.Load(#MICRO_UZI)Model.Load(#MP5LNG)Model.Load(#TEC9)Model.Load(#AK47)Model.Load(#M4)Model.Load(#c*ntGUN)Model.Load(#SNIPER)Model.Load(#AK47)Model.Load(#ROCKETLA)Model.Load(#HEATSEEK)Model.Load(#FLAME)Model.Load(#MINIGUN)Model.Load(#SPRAYCAN)Model.Load(#FIRE_EX)Model.Load(#SATCHEL)Model.Load(#GRENADE)Model.Load(#TEARGAS)Model.Load(#MOLOTOV)Model.Load(#MINIGUN)Model.Load(#BAT)Model.Load(#FAM1)Model.Load(#GUN_CANE)Model.Load(#NVGOGGLES)Model.Load(#GUN_PARA)Model.Load(#CAMERA):NONAME_161wait 0 if 0ADC:   test_cheat "DIED1" jf @NONAME_161 0ACD: show_text_highpriority "NEVER DIE ~R~ON~W~." time 3000 jump @NONAME_218 :NONAME_218wait 0 if or   Actor.Dead($PLAYER_ACTOR)0ADC:   test_cheat "RESET" jf @NONAME_499 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 09E8: [email protected] = actor $PLAYER_ACTOR active_interior jf @NONAME_218 06DF: destroy_player $PLAYER_CHAR $PLAYER_CHAR = Player.Create(0, [email protected], [email protected], [email protected])$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Minigun, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, MicroUzi, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Shotgun, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Grenades, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, AK47, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, DesertEagle, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Rifle, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, BaseballBat, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Camera, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Parachute, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, NightvisionGoggles, 9999)Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Cane, 9999)01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0 04E4: refresh_game_renderer_at [email protected] [email protected] 0860: link_actor $PLAYER_ACTOR to_interior [email protected] jump @NONAME_218 :NONAME_499wait 0 if 0ADC:   test_cheat "DIED1" jf @NONAME_218 0ACD: show_text_highpriority "NEVER DIE ~B~OFF~W~." time 3000 jump @NONAME_161 
Edited by skatefilter5
Link to comment
Share on other sites

spaceeinstein

 

ThirteenAG created a similar mod that does this.

Link to comment
Share on other sites

skatefilter5

ThirteenAG created a similar mod that does this.

I try ThirteenAG mod, when I die, this mod didn't give me back my weapons -- his mod didn't work.

0000: NOPModel.Load(#CELLPHONE)Model.Load(#GUN_DILDO1)Model.Load(#GUN_DILDO2)Model.Load(#GUN_VIBE1)Model.Load(#GUN_VIBE2)Model.Load(#FLOWERA)Model.Load(#GUN_CANE)Model.Load(#BRASSKNUCKLE)Model.Load(#GOLFCLUB)Model.Load(#NITESTICK)Model.Load(#KNIFECUR)Model.Load(#BAT)Model.Load(#SHOVEL)Model.Load(#POOLCUE)Model.Load(#KATANA)Model.Load(#CHNSAW)Model.Load(#GRENADE)Model.Load(#TEARGAS)Model.Load(#MOLOTOV)Model.Load(#COLT45)Model.Load(#SILENCED)Model.Load(#DESERT_EAGLE)Model.Load(#CHROMEGUN)Model.Load(#SAWNOFF)Model.Load(#SHOTGSPA)Model.Load(#MICRO_UZI)Model.Load(#MP5LNG)Model.Load(#TEC9)Model.Load(#AK47)Model.Load(#M4)Model.Load(#c*ntGUN)Model.Load(#SNIPER)Model.Load(#ROCKETLA)Model.Load(#HEATSEEK)Model.Load(#FLAME)Model.Load(#MINIGUN)Model.Load(#SATCHEL)Model.Load(#BOMB)Model.Load(#SPRAYCAN)Model.Load(#FIRE_EX)Model.Load(#CAMERA)Model.Load(#NVGOGGLES)Model.Load(#IRGOGGLES)Model.Load(#GUN_PARA)Model.Load(#JETPACK)[email protected]: [email protected]: [email protected]: [email protected]: [email protected]: [email protected]: intend:NONAME_161wait 0if0ADC:   test_cheat "died1"jf @NONAME_1610ACD: show_text_highpriority "NEVER DIE ~R~ON~W~." time 3000jump @NONAME_218:NONAME_218wait 0if or   Actor.Dead($PLAYER_ACTOR)0ADC:   test_cheat "RESET"jf @NONAME_7230A8D: [email protected] = read_memory 0xB79034 size 4 virtual_protect 1  // dwTimesBusted0A8D: [email protected] = read_memory 0xB7903C size 4 virtual_protect 1  // dwTimesWastedwhile truewait 0  0A8D: [email protected] = read_memory 0xB79034 size 4 virtual_protect 1  // dwTimesBusted0A8D: [email protected] = read_memory 0xB7903C size 4 virtual_protect 1  // dwTimesWasted04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.004C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.009E8: [email protected] = actor $PLAYER_ACTOR active_interiorjf @NONAME_218{04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 1 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 2 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 3 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 4 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 5 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 6 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 7 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 8 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 9 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 10 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 11 weapon [email protected] ammo [email protected] model [email protected]: get_weapon_data_from_actor $PLAYER_ACTOR slot 12 weapon [email protected] ammo [email protected] model [email protected]   }    if or     [email protected] > [email protected]        [email protected] > [email protected]        Actor.Dead($PLAYER_ACTOR)    then       [email protected] = false       0AC8: [email protected] = allocate_memory_size 260       0A8E: [email protected] = [email protected] + 0 // int       0A96: [email protected] = actor $PLAYER_ACTOR struct       [email protected] += 0x5A0        for [email protected] = 1 to 13          0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1 //weapon id          [email protected] += 0xC                                         0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 1 //ammo for that weapon          [email protected] += 0x10                          if               [email protected] > 0              then                0AA7: call_function 0x454AC0 num_params 1 pop 1 [email protected] [email protected]    //weapon id to model id                0247: request_model [email protected]                038B: load_requested_models                          04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot [email protected] weapon [email protected] ammo [email protected] model [email protected]: destroy_player $PLAYER_CHAR$PLAYER_CHAR = Player.Create(0, [email protected], [email protected], [email protected])$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)[email protected] = Actor.Angle($PLAYER_ACTOR)Actor.Angle($PLAYER_ACTOR) = [email protected]: refresh_game_renderer_at [email protected] [email protected]: link_actor $PLAYER_ACTOR to_interior [email protected]                   01B2: give_actor $PLAYER_ACTOR weapon [email protected] ammo [email protected] // Load the weapon model before using this                0249: release_model [email protected]              end           end          //03E6: remove_text_box            //break          //end                    {if           00E1:   player 0 pressed_button 15          then           03E6: remove_text_box           break          end     }    0AC9: free_allocated_memory [email protected]         end{017B: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]: set_actor $PLAYER_ACTOR weapon [email protected] ammo_to [email protected]   }jump @NONAME_218:NONAME_723wait 0if0ADC:   test_cheat "died1"jf @NONAME_2180ACD: show_text_highpriority "NEVER DIE ~B~OFF~W~." time 3000jump @NONAME_161

Well, I take some of his code into mines and put it where player is killed, to restore all my weapons when I die then I destroy the player and create a new player but still doesn't work.

 

I have the one that give manually give me weapons not the current weapon I have just set it on the fist when he dies.

 

 

 

 

Well only 1 to get weapon data from player works when I die, but this one is made yesterday as a test. If I put more than 1 getting weapon data for all slots, it will not work.

 

04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 4 weapon [email protected] ammo [email protected] model [email protected]

 

 

01B2: give_actor $PLAYER_ACTOR weapon [email protected] ammo [email protected] // Load the weapon model before using this

 

 

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.