Quote:
Originally Posted by legodude
pawn Код:
new Job=GetPlayerJobID(playerid); if((Job >= 1 && Job <= 4) || (Job >= 8 && Job <= 13) || (Job >= 17 && Job <= 21))
maybe the case is faster. but i don't think so at this one...
someone test please?
|
Even if this was true the speed difference wouldnt affect anything at all, it would be VERY small of a difference. Also im pretty sure the switch is faster, as you have SIX variable accesses in the above code.
btw you know you can do this:
Код:
if((1 <= job <= 4) || (8 <= Job <= 13) || (17 <= Job <= 21))
this is a lot cleaner.