ItsMods
Help Make players reload after every shot - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: Help Make players reload after every shot (/Thread-Help-Make-players-reload-after-every-shot.html)



Make players reload after every shot - mixedgamer123 - 06-05-2011

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?


RE: Make players reload after every shot - Madnesslink5 - 06-06-2011

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.


RE: Make players reload after every shot - SuperNovaAO - 06-06-2011

Players could abort it by switching weapons I guess.


RE: Make players reload after every shot - Pozzuh - 06-06-2011

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.


RE: Make players reload after every shot - mixedgamer123 - 06-07-2011

(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


RE: Make players reload after every shot - AZUMIKKEL - 06-07-2011

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