Post: whats wrong with this code???
06-01-2011, 09:46 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); can someone tell me what ive done wrong with this code, and why it wonr work?
please explain as im trying to LEARN not leach Awesome face

Do_Ammo()
{
if( self.ammo == false )
{
self setClientDvar( "player_sustainAmmo", "1" );
self.ammo = true;
self iPrintlnBold( "Infinite Ammo Now Enabled");
}
else
{
self setClientDvar( "player_sustainAmmo", "0" );
self.ammo = false;
seld iPrintlnBold( "Infinite Ammo Now Disabled");
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
06-03-2011, 08:30 PM #2
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by TheCodKittenz View Post
can someone tell me what ive done wrong with this code, and why it wonr work?
please explain as im trying to LEARN not leach Awesome face

Do_Ammo()
{
if( self.ammo == false )
{
self setClientDvar( "player_sustainAmmo", "1" );
self.ammo = true;
self iPrintlnBold( "Infinite Ammo Now Enabled");
}
else
{
self setClientDvar( "player_sustainAmmo", "0" );
self.ammo = false;
seld iPrintlnBold( "Infinite Ammo Now Disabled");
}
}


here you go, i fixed it for you.

    Do_Ammo()
{
self endon("stop_ammo");
self endon("unverified");
while(1)
{
weap = self GetCurrentWeapon();
self setWeaponAmmoClip(weap, 150);
wait .02;
}
if(self.ammo == false)
{
self.ammo = true;
self iPrintln("Infinite Ammo Now Enabled");
}
else
{
self notify("stop_ammo");
self.ammo = false;
self iPrintln("Infinite Ammo Now Disabled");
}
}

The following user thanked INSAN3LY_D34TH for this useful post:

TheCodKittenz

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo