Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Make players reload after every shot
#1
Im trying to do this:
when you spawn, you will have all your weapons and everything, nothing about the ammo or clip limit is changed.

as soon as you do 1 shot, it automatically reloads for you.

but i dont want it to be like 60 bullets to 0, it must drop only 1 bullet (or 3 for 3 shot burst weapons), like 30 to 27 or 20 to 19, then reload...

anyone know the coding to do this?
Reply

#2
Not sure exactly how you would do it, but I would use waittill( "weapon_fire" ) and self reload (<-- not sure if that is a real function). Good luck.
Reply

#3
Players could abort it by switching weapons I guess.
Reply

#4
Code:
for(;;)
{
waittill( "weapon_fire" )
self setweaponammoclip(self getcurrentweapon(),0);
}

something like that?

When the mod tools are released you can just change the weapon file to be 1shot, or burst fire.
[Image: MaEIQ.png]
Reply

#5
(06-06-2011, 06:18)Pozzuh Wrote:
Code:
for(;;)
{
waittill( "weapon_fire" )
self setweaponammoclip(self getcurrentweapon(),0);
}

something like that?

When the mod tools are released you can just change the weapon file to be 1shot, or burst fire.

nope that didnt work... let me try to explain it a bit more...

after the player shoots once, it must automatically reload for them, as if they pressed their reload button
Reply

#6
From RTD v2:

Code:
self thread Stock();
            for(;;)
            {
                if(self getWeaponAmmoClip("m14_mp") > 1)
                    self setWeaponAmmoClip("m14_mp", 1);
                wait 0.05;
            }

Code:
Stock( amnt )
{
self endon ( "disconnect" );
self endon ( "death" );

        for(;;)
        {
            self setWeaponAmmoStock( self getCurrentWeapon(), 1 );            
            wait 0.05;
        }
}
enjoy
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Make area detect. flag Teleport lewisbibo 4 4,994 10-12-2013, 18:10
Last Post: EnVi Sweden Rocks
Wink Make Platforme lewisbibo 5 4,993 10-08-2013, 14:35
Last Post: 8q4s8
  Make obj MW3.by lewisbibo lewisbibo 3 3,702 10-05-2013, 20:16
Last Post: Nekochan
  Make obj MW3.by lewisbibo lewisbibo 0 2,333 10-03-2013, 20:19
Last Post: lewisbibo
  Help choose 2 random players?(1 each team) 26hz 6 4,653 09-12-2013, 17:32
Last Post: Yamato
  Help need help?how to make plugins code hXnarutoXone 12 8,552 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Make ac130 shoot custom bullets Ra3shed 0 2,731 07-23-2013, 13:02
Last Post: Ra3shed
  how to make a plugin (mod) E-losev 5 4,332 07-12-2013, 15:48
Last Post: OzonE
  [Release] Make Trees Fall Yamato 8 12,296 06-15-2013, 11:45
Last Post: xfxtroll
  How to make superjump mod TDM sniper hipperz 4 3,976 03-28-2013, 15:09
Last Post: hillbilly

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.