08.08.2013, 20:43
What would you prefer?
pawn Код:
if( vehicleid == 0 || vehicleid == 2 || vehicleid == 4 || vehicleid == 6 || vehicleid == 8 || vehicleid == 10 || vehicleid == 12 || vehicleid == 14 || vehicleid == 16 || vehicleid == 18 || vehicleid == 20 )
{
// Do something
}
// OR
switch( vehicleid )
{
case 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20:
{
// Do something
}
}