A casual prison guard who impersonated a police officer for a discount on his Big Mac meal and 24 chicken nuggets has had his charges dismissed.

A Big Mac meal and 24 chicken nuggets were ordered.

Lawrence O’Driscoll-Faitaua, 43, pleaded guilty in Waverley Local Court on Tuesday to impersonating a police officer to obtain a $10.53 discount.

The Maroubra man, who worked as a casual prison guard at the Sydney Police Centre in Surry Hills, admitted to showing his ID card reading "NSW Police - External Contractor" to the drive-through staff at Kingsford on January 29.

When questioned by staff, Mr O’Driscoll-Faitaua said it was his "off-duty badge" and he worked at Surry Hills police station.