The best way to add to sandbox?

I’m trying to make a gamemode but the spawn menu isn’t there. I’ve copied the settings from the sandbox.txt to my gamemode.txt but I am not sure what .lua files to copy over. I want to understand the process not just copy an entire folder over, although I suspect that would get me further along. Thanks for taking time for your day to read this.

note - i’ve done the tutorials and watched several youtubes but I can’t recall someone mentioning this. If I missed a spot, please let me know.

You don’t have to copy stuff over. Just put this in your shared.lua:


GM.Name = ""
GM.Author = ""
GM.Email = ""
GM.Website = "" --fill these 4 in with whatever you like

DeriveGamemode( "sandbox" )

function GM:Initialize()
	self.BaseClass.Initialize( self )
end

Thank you so much. I didn’t see these in any tutorials but those were dated from 2013…

EDIT: After further review, it’s not working. I’ve checked all my lua files and they say derivegame and have that function. … the spawn menu is there but nothing will spawn. Also the tabbed menus are messed up…other than the template for a new gamemode the only thing I believe I have done differently was to copy the ‘settings’ from the sandbox.txt.

I have AddCSLuaFile for both shared.lua/cl_init and I included all my lua files … where should I look further to understand what I have done incorrectly?

[editline]19th July 2015[/editline]

see above post please

[editline]19th July 2015[/editline]

I am getting the error Unknown command: gm_spawn

Someone it’s not being recognized as sandbox… does derive gamemode matter where it is in the lua files ?