McAuslan, Wee Wullie, Daft Bob, et al, were inspired by GMF's subordinates in his army days just post WW2.
Flashman does make you think, though, but although he meets people from all over the world (most of whom are trying to kill him), there isn't an accent in sight.
It's not just the excellent McAuslan books. I think that GMF was actually born in Carlisle (he certainly went to Carlisle Grammar), although his parents were Scots. If you read "Quartered Safe Out Here" (an autobiographical account of his time with the Border regiment in Burma in 1944, before he became "Dand Nichol" of the McAuslan books), you'll see that he can render North Cumbrian dialect perfectly. In the same book, he also takes off a cockney accent, which looks pretty convincing.
But Ace's point is right. If it's your own accent, or one you know well, you might get away with it. Provided it isn't so broad that no-one else can understand it.
If not, you can either flag up the accent by a dialogue tag as suggested by Pyan, or alternatively give a hint of the accent, but no more. This also assumes intimate knowledge of an accent, but can work. To whit:-
"Do you mind leaving me alone, my friend." (No accent or dialect).
"Git fired oot, marra" (Ethnic Cumbrian)
"Leave us alone, marra" (Literary fudge, but probably OK)
I have to say that it is West Country and Scots that are the two most mauled British accents. Cornwall, Devon, Somerset and Dorset all have different accents, as do Edinburgh, Glasgow, Hawick, Skye and Inverness...
Regards,
Peter