I'm not sure if thats what you are after, but you don't need a script for that, its an OFP feature.
After doubleclicking on the map, you can select the marker type with cursor UP,DOWN.
AFAIK, the placed marker is transmitted in MP to all players in your current chat channel (e.g. in side chat to all players on your side).