March 28, 2024, 08:26:32 pm

Author Topic: Infinite Shoot ( shoot until your ammo is over )  (Read 1214 times)

0 Members and 1 Guest are viewing this topic.

sseebbyy

  • Newbie
  • *
  • Posts: 14
  • Country: ro
    • View Profile
Infinite Shoot ( shoot until your ammo is over )
« on: August 05, 2013, 06:47:57 am »



When I was testing the First-Person Aim ~loosing weapon fixed~ I found a way to reload a weapon without wasting time with the animation.



I think its not that useful, but its an interesting thing that I want to share with you. :P
I will not develop this snippet, do it by yourself. (commands, variables, etc)


Here is a video



Credits
Seby (me)



and here is the code:
(we will use a timer for this script)
Code: [Select]
function onServerStart()
{
        NewTimer( "InfiniteShoot", 2000, 0);
}

Code: [Select]
unction InfiniteShoot( )
{
local plr,wep;
for( local i = 0; i < GetMaxPlayers(); i++) {
        plr = FindPlayer(i);
        if(!plr) continue;
else {
wep = plr.Weapon;
if(wep > 11) plr.SetWeapon(wep,0);
}
}
}
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor