This is a very simple command that will put a hat on certain police peds and fireman ped when activated. By default the Highway Cop skin does not come with a hat so I have included the Highway Cop skin from a different release. This is the first script that I have written so if you have any suggestions please leave them in the comments.
Original post for where I got the add on Highway Cop.
Non ES Version
/hat (Toggle hat)
/sg (Toggle Sunglasses)
/mask (Toggle Fireman mask)
/gloves (Toggle gloves for Medic)
/hood (Toggle hood for your car
/vest (Applies a vest to police peds)
10/13/17 Added gloves, hat, and sunglasses for paramedic and an option to open the hood of your car
12/19/2017 Added a /vest command for police per request