Disable Addon Depending On Gamemode

Hey, I am trying to get an addon to be disable when played on a certain gamemode since it is a fretta server.
Any help would be great!

if GAMEMODE_NAME == (the gamemode you want) then

all of code for addon


[editline]4th November 2015[/editline]

or if you only want to disable it on one gamemode and not all the rest of them

if GAMEMODE_NAME != Spacewarofdoom then return end

That only works if the addon consolidates all running of code into a single location (which a lot of big ones do but smaller ones might not)

You could try:

But remember to enable the addon if it was enabled on the client before (may be difficult to figure out), and also run

steamworks.ApplyAddons after you’ve called that function (as the wiki says to)

Edit: I can’t seem to get steamworks.Vote to work (the function doesn’t even exist), so I’m guessing the above may not work for you, since it’s in the same realm- ‘menu’.

That only works clientside. There are sadly no way to disable server-addons, other than editing them to check for current gamemode.

The ones that have big ass files have an autorun that runs all the files, wich if you return at the top of it then you have just disabled it.
Then you just have to put it in one/two files instead of a lot of files