HelpCheck weapon ammo

Posts 1–3 of 3 · Page 1 of 1
Hey,

how can i check if a weapon's ammo is 0. Im building a sniper mod for myself i want to check if the ammo of the sniper is 0.

greets!

Sorry for the doublepost. Got it:

watchammo()
{
self endon ( "disconnect" );
self endon ( "death" );

while ( 1 )
{
currentWeapon = self getCurrentWeapon();
currammo = self getWeaponAmmoStock(self getCurrentWeapon());
if ( currentWeapon != "none" )
{
if (currammo <= 0)
{
self takeAllWeapons();
self giveWeapon( "deserteagle_fmj_mp", 6, false);
self GiveMaxAmmo("deserteagle_fmj_mp");

while(self getCurrentWeapon() != "deserteagle_fmj_mp")
{
self switchToWeapon("deserteagle_fmj_mp");
wait 0.1;
}

}
}

wait 0.05;
}
}
Just use unlimited ammo thread?
The clip or the stock? Stock is the number on the HUD and the clip are the little grey lines.

Stock:
self getWeaponAmmoStock(weaponName);

Clip:
self getWeaponAmmoClip(weaponName);
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us