Is there a way to stop guns being destroyed when ammo is 0?
#9

Quote:
Originally Posted by Dokins
Посмотреть сообщение
What I can do is:

If the ammo type runs out in the gun, automatically set it to the standard rounds.
euhm what.?

Anyways i think using OnPlayerWeapon shoot itself you can prevent other players to get hit by returning specific value inside function (like 0 or 1 ,unsure).
e.g:
pawn Код:
OnPlayerWeaponShot(...)
{
       // get ammo and stuff
       if( ammo < 2 )
       {              
               if( hitid == ONE THAT IS TREATED AS PLAYER HIT )
               {
                    //he hitted with his last ammo to a player and make to make it isnt counted as a hit return 0 / 1;
                    return 0;
               }
               //give player one ammo;
       }
}
Though the code itself isnt correct therefore you need to work out with hit so as to make it in good working condition
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)