30.07.2010, 19:31
(
Последний раз редактировалось Daren_Jacobson; 30.07.2010 в 20:06.
)
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.
I love thinking out loud.
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;
}