IsVehicletype(vehicleid,type1,type2=0,type3=0) { new vtype = VehicleInfo[vehicleid][type], result; if (type2 && !type3) result = (vtype & type1) && (vtype & type2); if (type2 && type3) result = (vtype == type1|type2|type3); else result = (vtype return result ? true : false; }