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