07.10.2010, 12:43
What is really the fastest and most efficient?
I'm familiar with using switches when checking IDs, for an example:
But is that faster than just doing
... or is it just shorter?
I'm familiar with using switches when checking IDs, for an example:
pawn Код:
switch(vehicleid)
{
case 0: //blah
case 1..32: //more blah
}
pawn Код:
if(vehicleid == 0)
{ /*blah*/ }
else if(vehicleid > 0 && vehicleid < 33)
{ /*more blah*/ }