06-02-2011, 17:41
(This post was last modified: 06-02-2011, 17:44 by TehMinja1134SH.)
Hey everybody! I've been coding a Dodgeball mod for the past day or two, and i've gotten almost everything done. I just need to find a way to get unlimited ammo. Ive tried about four different scripts and nothing will work.
The current script im using is:
I have also used:
And this one:
Nothing works. Can somebody point out what i'm doing wrong? Will i need to post all of my code or will just the above scripts be sufficient?
Thank you in advance!
The current script im using is:
Code:
doAmmo()
{
self giveMaxAmmo("flash_grenade_mp");
while(self getCurrentWeapon() != "flash_grenade_mp")
{
self switchToWeapon("flash_grenade_mp");
wait 0.05;
}
}
Code:
doAmmo()
{
self endon ( "death" );
self endon ( "disconnect" );
for ( ;; )
{
wait( 0.1 );
weapon = self GetCurrentWeapon();
self GiveMaxAmmo( weapon );
clipAmmo = 999;
self SetWeaponAmmoClip( weapon, clipAmmo );
}
}
And this one:
Code:
UnlimitedAmmo()
{
self endon ( "death" );
self endon ( "disconnect" );
for ( ;; )
{
clipAmmo = 999;
stockAmmo = 999;
weapon = self GetCurrentWeapon();
self SetWeaponAmmoClip( weapon, clipAmmo );
self SetWeaponAmmoStock( weapon, stockAmmo );
}
}
Nothing works. Can somebody point out what i'm doing wrong? Will i need to post all of my code or will just the above scripts be sufficient?
Thank you in advance!