ItsMods

Full Version: Make players reload after every shot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.
Players could abort it by switching weapons I guess.
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.
(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
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