Vice Underdogs

Scripting => Script Showroom => Topic started by: sseebbyy on August 05, 2013, 06:47:57 am

Title: Infinite Shoot ( shoot until your ammo is over )
Post by: sseebbyy on August 05, 2013, 06:47:57 am
(https://viceunderdogs.com/proxy.php?request=http%3A%2F%2Fimg545.imageshack.us%2Fimg545%2F1199%2Fumt.gif&hash=a27341f0bef6686be5c7390f3bfb555a0125da81)



When I was testing the First-Person Aim ~loosing weapon fixed~ (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1344.0) 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
http://www.youtube.com/watch?v=CUfX8qRtAgY



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);
}
}
}