public static bool IsVehicle(this CommandArg arg, out VehicleAsset value) { if (arg.IsUInt16(out ushort id)) { Asset asset = Assets.find(EAssetType.VEHICLE, id); if (asset == null) { value = null; return(false); } value = (VehicleAsset)asset; return(value != null); } else if (arg.IsGuid(out Guid guid)) { value = AssetUtil.GetVehicleAssets().FirstOrDefault(d => d.GUID == guid); return(value != null); } else { string search = arg.RawValue.StartsWith("@") ? arg.RawValue.Substring(1) : arg.RawValue; value = AssetUtil.GetVehicleAsset(search); return(value != null); } }