Results 1 to 6 of 6
  1. #1
    littlegandhi1199's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    27
    Reputation
    9
    Thanks
    19
    My Mood
    Amused

    Help Please Coding Question

    Is there a way to add 1 bullet to a clip in a gun, say the pistol had 2 bullets and 0 stock ammo
    I want to add 1 bullet to the 2 existing bullets here is what i can do

    self setWeaponAmmoClip( "m1911_mp", 1 );

    but this only sets the clip to 1 when i want it to add 1 bullet to clip
    Is there a way to do this?
    Maybe a way to find out the current clip and then add 1 bullet or just something simple like
    self setWeaponAmmoClip( "m1911_mp", +1 );
    but i know that ^ doesn't work

    Help is appreciated
    -Littlegandhi1199
    KISS
    KEEP IT SIMPLE STUPID


  2. #2
    littlegandhi1199's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    27
    Reputation
    9
    Thanks
    19
    My Mood
    Amused
    Impossible or not?
    KISS
    KEEP IT SIMPLE STUPID


  3. #3
    SneakyPete's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    In a New World
    Posts
    531
    Reputation
    22
    Thanks
    25
    My Mood
    Happy
    i was wondering if you could do that on mw2 also but black ops would be nice also

    Waiting between worlds that divide through a choice undefined
    A break in the line where all paths intertwine
    And no roads lead or progress behind
    And all signs read: "Know The Way. Decide"



  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    It's in my TF2 Mod, custom weapon stock and clip and it changes when you reload.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    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]

  5. #5
    littlegandhi1199's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    27
    Reputation
    9
    Thanks
    19
    My Mood
    Amused
    I have tried to use your code but i can't find where you define weapon or ammo or clip for the thread... Can you outline it a little more for me
    KISS
    KEEP IT SIMPLE STUPID


  6. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Usage:
    self thread doCrazyAmmo("ak47_mp", 69, 69);

    Don't recommend trying it on guns that reload every shot (eg, spas).
    Code:
    doCrazyAmmo(weapon, clip, ammo)
    {
    	self thread doCrazyStock(weapon, clip, ammo);
    	
    	self endon("death");
    	self endon("disconnect");
    	self.ammoClip[weapon] = clip;
    	while(1) 
    	{
    		self waittill("weapon_fired");
    		if(self getCurrentWeapon() == weapon) 
    		{
    			self.ammoClip[weapon]--;
    			self setWeaponAmmoClip(weapon, self.ammoClip[weapon]);
    			if(self getWeaponAmmoStock() == 0)
    				self switchToWeapon(weapon);
    		}
    	}
    }
    
    doCrazyStock(weapon, clip, ammo)
    {
    	self endon("death");
    	self endon("disconnect");
    	self.ammoStock[weapon] = ammo;
    	while(1) 
    	{
    		self waittill("reload");
    		if(self getCurrentWeapon() == weapon) 
    		{
    			toRemove = clip - self.ammoClip[weapon];
    			self.ammoStock[weapon] -= toRemove;
    			self.ammoClip[weapon] += toRemove; 
    			if(self.ammoStock[weapon] >= 0) 
    			{
    				self setWeaponAmmoStock(weapon, self.ammoStock[weapon]);
    				self setWeaponAmmoClip(weapon, self.ammoClip[weapon]);
    			}
    		}
    	}
    }
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    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]