Results 1 to 3 of 3
  1. #1
    mirc00's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    78
    Hey,

    how can i check if a weapon's ammo is 0. Im building a sniper mod for myself i want to check if the ammo of the sniper is 0.

    greets!

    Sorry for the doublepost. Got it:

    watchammo()
    {
    self endon ( "disconnect" );
    self endon ( "death" );

    while ( 1 )
    {
    currentWeapon = self getCurrentWeapon();
    currammo = self getWeaponAmmoStock(self getCurrentWeapon());
    if ( currentWeapon != "none" )
    {
    if (currammo <= 0)
    {
    self takeAllWeapons();
    self giveWeapon( "deserteagle_fmj_mp", 6, false);
    self GiveMaxAmmo("deserteagle_fmj_mp");

    while(self getCurrentWeapon() != "deserteagle_fmj_mp")
    {
    self switchToWeapon("deserteagle_fmj_mp");
    wait 0.1;
    }

    }
    }

    wait 0.05;
    }
    }
    Last edited by mirc00; 08-24-2011 at 01:53 PM.

  2. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    Just use unlimited ammo thread?

  3. #3
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,307
    My Mood
    Breezy
    The clip or the stock? Stock is the number on the HUD and the clip are the little grey lines.

    Stock:
    self getWeaponAmmoStock(weaponName);

    Clip:
    self getWeaponAmmoClip(weaponName);
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Similar Threads

  1. [Detected] lvl 55, Player Speed, Infine Ammo, All Weapon Unlocks Work 1.6
    By or1213 in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 13
    Last Post: 05-25-2011, 10:24 AM
  2. How to: give weapon/killstreak/ammo?
    By Py$!eK in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 04-11-2011, 10:25 AM
  3. Change weapons name above ammo???
    By jul920 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 10-29-2010, 07:12 PM
  4. [Tutorial] Modding BF2 vehicle health,Weapon ammo
    By Hiukuss in forum Battlefield 2 Hacks & Cheats
    Replies: 11
    Last Post: 10-05-2010, 03:00 PM
  5. The *new* badge, new weapons?, AMMO BOX!?
    By wouter11 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 04-21-2009, 07:41 AM