SpawnMenu Disabling ?

Hello! Me again, I have figured out how to do it but it seems to not like me…

As well all of these functions are SERVER sided, perfectly server sided in a server init file.
Any ideas why this doesn’t want to let me spawn stuff from tabs other then the props tab and guns tab, because im superadmin?
(My gamemode I built from scratch that is deriving sandbox)

INIT


-- // Sandbox stuff // --
function GM:PlayerSpawnSWEP( ply, class, info )
	if not ClientConfig.SuperUsers[ ply:GetUserGroup() ] or not ClientConfig.MediumUsers[ ply:GetUserGroup() ] then
		return false
	end
end

function GM:PlayerSpawnVehicle( ply, model, name, table )
	if not ClientConfig.SuperUsers[ ply:GetUserGroup() ] then
		return false
	end
end

function GM:PlayerSpawnNPC( ply, npc_type, weapon ) 
	if not ClientConfig.SuperUsers[ ply:GetUserGroup() ] then
		return false
	end
end

function GM:PlayerSpawnEffect( ply, model ) 
	if not ClientConfig.SuperUsers[ ply:GetUserGroup() ] then
		return false
	end
end

function GM:PlayerSpawnSENT( ply, model ) 
	if not ClientConfig.SuperUsers[ ply:GetUserGroup() ] then
		return false
	end
end

CONFIG


-- \\        Configuration        \\

-- Blacklisted characters when using NickNames [[]], "" and '' are all used in lua as strings (this allows us to add those symbols) 
GM.Config.BlacklistedChars = { '"', "'", "[", "]", ";", ":", [[\]], "/", "|", "{", "}", "+", "=", "-", "_", "?", "<", ">", ",", ".", "*", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" } 

GM.Config.MediumUsers = { ["moderator"] = true, ["admin"] = true } -- User groups that can spawn in weapons (this doesn't apply to the roleplay GM.Config.HighRanks)
GM.Config.SuperUsers = { ["superadmin"] = true, ["owner"] = true, ["developer"] = true, ["eventmaster"] = true } -- User groups that can spawn anything in.

-- You can use most default PC fonts including Times New Roman, Ariel, etc.
GM.Config.Fonts = { HUDText = "Impact", HUDTextName = "Impact" }

GM.Config.XPRate = 10 -- How many seconds does it take before the player gains another 100 XP?
GM.Config.MaxXP = 1000 -- How much XP until the player levels up?
GM.Config.MaxLevel = 100 -- What is the max level the player can reach before prestiging?
GM.Config.KillReward = 500 -- How much XP does the player gain for killing a NPC or another player (during an event).
GM.Config.StartingRegiment = 1 -- What regiment id is used when the player joins? 

-- Ranking names in order, the rank that comes first is always used for new players!
GM.Config.Ranks = { "PVT", "PFC", "LCPL","CPL", "SGT", "CSGT", "SGM", "COM" }

-- Same as above, but each high rank can promote other players to a maximum of the rank below them. (Last rank is army leader)
GM.Config.HighRanks = { "LT", "CPT", "MAJ", "COL", "BRG", "MAJ GEN", "GEN" }

-- Default Regiments in order (make sure to have different ids)
GM.Config.Regiments = { 
	{
		name = "Recruit", 
		color = Color( 200, 150, 200 ), 
		weapons = {},
		model = "",
		hp = 100,
		id = 1
	},
	{
		name = "Storm Trooper", 
		color = Color( 100, 10, 200 ), 
		weapons = { "weapon_fists", "weapon_physgun" },
		model = "models/player/odessa.mdl",
		hp = 100,
		id = 2
	}
}

ClientConfig = GM.Config

You’re overriding the sandbox functions, use

hook.Add instead.

Something’s not right if you’re saying you’re superadmin and you can spawn props and guns.

If you look at this:
[lua]
function GM:PlayerSpawnSWEP( ply, class, info )
if not ClientConfig.SuperUsers[ ply:GetUserGroup() ] or not ClientConfig.MediumUsers[ ply:GetUserGroup() ] then
return false
end
end
[/lua]
That would return false even if you are superadmin. Since you’re using or instead of and, if a user isn’t in the SuperUsers table OR the MediumUsers table it would pass the statement. Since superadmin isn’t in the MediumUsers table, they won’t be able to spawn sweps. But you’re saying you’re able to spawn sweps? The information you’ve given us doesn’t add up.

[editline]October 11th 2017[/editline]

He stated he’s making his own gamemode derived from Sandbox. That shouldn’t be the issue.