Bullet Count
#6

Quote:
Originally Posted by No Fear
Посмотреть сообщение
Your idea don't work. But i made
pawn Код:
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
    if(GetPlayerWeapon( playerid ) == 38 )
    {
        print("Key");
    }
return true;
}
But it's counting only one time when i hold. I need to make it work, that it would count every bullet.
Use onplayerupdate
pawn Код:
new PlayerAmmo[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
 new ammo = GetPlayerAmmo(playerid);
 if(ammo < PlayerAmmo[playerid])
 {
    new BulletsShot = (PlayerAmmo[playerid]-ammo);
 }
 PlayerAmmo[playerid]=ammo;
 return 1;
}
This is just the idea, you might wanna check for the weapon etc.
Reply


Messages In This Thread
Bullet Count - by No Fear - 01.02.2012, 09:48
Re: Bullet Count - by MP2 - 01.02.2012, 09:49
Re: Bullet Count - by 2KY - 01.02.2012, 13:14
Re: Bullet Count - by No Fear - 03.02.2012, 08:43
Re: Bullet Count - by T0pAz - 03.02.2012, 08:47
Re: Bullet Count - by wups - 03.02.2012, 08:48
Re: Bullet Count - by No Fear - 03.02.2012, 08:49
Re: Bullet Count - by No Fear - 03.02.2012, 08:57
Re: Bullet Count - by wups - 03.02.2012, 09:07
Re: Bullet Count - by No Fear - 03.02.2012, 09:13

Forum Jump:


Users browsing this thread: 1 Guest(s)