toggleUnlimitedAmmo()
{
self.unlimitedAmmo = booleanOpposite(self.unlimitedAmmo);
self iPrintln(booleanReturnVal(self.unlimitedAmmo, "Balles Infinies [^1OFF^7]", "Balles Infinies [^2ON^7]"));
if(self.unlimitedAmmo)self thread unlimitedAmmo();
else self notify("unlimitedAmmoEnded");
}
unlimitedAmmo()
{
self endon("disconnect");
self endon("unlimitedAmmoEnded");
while(true)
{
currentWeapon = self getcurrentweapon();
if (currentWeapon != "none")
{
self setweaponammoclip(currentWeapon, weaponclipsize(currentWeapon));
self givemaxammo(currentWeapon);
}
currentoffhand = self getcurrentoffhand();
if (currentoffhand != "none")
{
self givemaxammo(currentoffhand);
}
wait 0.1;
}
}