Weapon states
#9

no ammo (knife): always calls no ammo
single shot (shotgun, grenade): always calls last bullet (unless out of ammo), and calls reloading after a shot.
multi-shot (deagle, MP5): calls more bullets if you have > 1 in the current clip last bullet if == 1 in clip and reloading if == 0 in clip && >= 1 in ammo. calls No bullets if you just shot the last one.

pawn Код:
stock WeaponTypeHasAmmo(weaponid)
{
    switch(weaponid)
    {
        case 0 .. 15, 40, 44 .. 46: return 0; // no ammo
        case 22 .. 24, 26 .. 32, 37 .. 39, 41 .. 43: return 1; // multi shot, reload.
        case 16 .. 18, 25, 33 .. 36:return 2; // single shot, reload.
    }
    return 0;
}
I love thinking out loud.
Reply


Messages In This Thread
Weapon states - by Packadore - 02.06.2010, 05:41
Re: Weapon states - by RichyB - 02.06.2010, 05:50
Re: Weapon states - by Packadore - 02.06.2010, 06:50
Re: Weapon states - by WackoX - 02.06.2010, 06:55
Re: Weapon states - by WackoX - 02.06.2010, 07:01
Re: Weapon states - by Packadore - 02.06.2010, 08:31
Re: Weapon states - by WackoX - 03.06.2010, 12:54
Re: Weapon states - by IcyBlight - 03.06.2010, 13:32
Re: Weapon states - by Daren_Jacobson - 30.07.2010, 19:31

Forum Jump:


Users browsing this thread: 1 Guest(s)