07.06.2013, 13:42
A switch statement would work even faster as you only need to call GetPlayerWeapon once. And also much less code.
(Not saying that less code is always better, but in this case it definitely is.)
(Not saying that less code is always better, but in this case it definitely is.)
pawn Код:
switch(GetPlayerWeapon(playerid))
{
case 0..18,36,37,39,40..46: { /* melee */ }
default: { /* not melee */ }
}