Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO1 Modding Releases & Resources
  3. BO3's System for Max Ammo for BO1

BO3's System for Max Ammo for BO1

Scheduled Pinned Locked Moved BO1 Modding Releases & Resources
3 Posts 2 Posters 374 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Coronavirus-19undefined Offline
    Coronavirus-19undefined Offline
    Coronavirus-19
    wrote on last edited by Coronavirus-19
    #1

    This script overrides the max ammo to function like BO3's Max Ammo!

    Installation

    Plutonium/storage/t5/scripts/sp

    Max Ammo GSC

    Raw Code

    #include maps\_utility;
    
    init()
    {
        level thread on_player_connect();
    }
    
    on_player_connect()
    {
        for (;;)
        {
            level waittill("connected", player);
            player thread max_ammo_clip_fix();
        }
    }
    
    max_ammo_clip_fix()
    {
        self endon("disconnect");
    
        lastAmmoCheck = [];
    
        for (;;)
        {
            wait 0.1;
    
            weapons = self getweaponslist();
    
            i = 0;
            while (i < weapons.size)
            {
                weapon = weapons[i];
    
                if (!self hasweapon(weapon))
                {
                    i++;
                    continue;
                }
    
                ammo = self getweaponammostock(weapon);
                maxAmmo = weaponmaxammo(weapon);
    
                // Init tracking
                if (!isDefined(lastAmmoCheck[weapon]))
                    lastAmmoCheck[weapon] = ammo;
    
                // Detect Max Ammo refill
                if (ammo == maxAmmo && lastAmmoCheck[weapon] < maxAmmo)
                {
                    self setweaponammoclip(weapon, weaponclipsize(weapon));
                }
    
                lastAmmoCheck[weapon] = ammo;
                i++;
            }
        }
    }
    
    
    1 Reply Last reply
    2
    • StarGoldundefined Offline
      StarGoldundefined Offline
      StarGold
      wrote last edited by
      #2

      hello, i like your script very much and works pretty well, but i have a very small issue, if you buy ammo from the wall, it doesn't fill to the max it acts as if i reloaded the weapon after i buy the ammo, reducing the reserve ammo instead of the entire ammo

      Coronavirus-19undefined 1 Reply Last reply
      0
      • StarGoldundefined StarGold

        hello, i like your script very much and works pretty well, but i have a very small issue, if you buy ammo from the wall, it doesn't fill to the max it acts as if i reloaded the weapon after i buy the ammo, reducing the reserve ammo instead of the entire ammo

        Coronavirus-19undefined Offline
        Coronavirus-19undefined Offline
        Coronavirus-19
        wrote last edited by
        #3

        StarGold Thank you for notifying me, I'll work on this!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Donate