• How Do I Detect the Gamemode Name in a Ternary Function?
    2 replies, posted
I want to do something like: [code] if GAMEMODE == "terrortown" then ... lines of code here else return end [/code] It's for a HUD that has elements specific to the gamemode which causes errors nil values and null entities otherwise. I want it to only execute when a specified gamemode is active. I know it should be easy and I saw it done before long ago, but I can't for the life of me remember the command(s) for it.
[url=http://wiki.garrysmod.com/page/engine/ActiveGamemode]engine.ActiveGamemode()[/url] Returns a string of the current gamemode name.
[QUOTE=Phoenixf129;46669626][url=http://wiki.garrysmod.com/page/engine/ActiveGamemode]engine.ActiveGamemode()[/url] Returns a string of the current gamemode name.[/QUOTE] Sweet. Thanks, I love quick and simple fixes like this :D
Sorry, you need to Log In to post a reply to this thread.