If not holding a melee weapon
#6

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.)

pawn Код:
switch(GetPlayerWeapon(playerid))
{
    case 0..18,36,37,39,40..46: { /* melee */ }
    default: { /* not melee */ }
}
Reply


Messages In This Thread
If not holding a melee weapon - by Sellize - 07.06.2013, 13:12
Re: If not holding a melee weapon - by -CaRRoT - 07.06.2013, 13:17
Re: If not holding a melee weapon - by Sellize - 07.06.2013, 13:18
Re: If not holding a melee weapon - by Tingesport - 07.06.2013, 13:22
Re: If not holding a melee weapon - by Sellize - 07.06.2013, 13:30
Re: If not holding a melee weapon - by Vince - 07.06.2013, 13:42

Forum Jump:


Users browsing this thread: 3 Guest(s)