Need help with finishing a mod for PD TH

Basically my mod is ready but i need to set a requirement in it - make it work only in single player mode , because it's simply a "cheat"/for fun only . The mod is basically changing brenner stats to make it work like a minigun . Obviously im using dorhud/dahm . So , does anyone know how to set the single player mode requirement ? Thanks in advance
Replies
This code is for PD2 but I think should work for PDTH.
Friends only/Offline/Private:
Global.game_settings.permission == "friends_only" or Global.game_settings.permission == "private" or Global.game_settings.single_player
Add this to some if statement before you run the mod's code.