Including Spawnmenu when derived from base?

I’m making a gamemode with a friend and we’ve had to derive it from base for several reasons, but we need the sandbox spawnmenu. Is there an easy way to include it without sending every single file for the spawnmenu to the client? We’ve tried the following to no avail;
[lua]include( ‘cl_spawnmenu.lua’ ) – in cl_init.lua with
include( ‘spawnmenu/spawnmenu.lua’ ) – in cl_spawnmenu.lua[/lua]

Err, why did you have to derive from base if you need sandbox functionality?

Because we only need the spawnmenu and some of the sandbox functions were clashing with what we were making.

Such as? Why don’t you jsut override the functionality you want.

Anyway, if the prop spawn menu is all you need, it’s no big deal creating your own. Just read the tables in from the files in the spawnmenu folder. :slight_smile:


Today is TYPO DAY!

Thats not helping him. If thats what he wants, then he can do that.

I’m very sorry, but my shift buttons suddenly stopped working. I can even post a piece of code if I can get thrm fixed


Why did I even post that

ARGH, question mark needs shift to type…


Yay, I found the problem!

I’m glad you fixed your keyboard, but that doesn’t help. We didn’t want to derive from sandbox, there was too much to overwrite and it’s easier to derive from base and include one function than derive from sandbox and overwrite many.

If you are deriving from base then you cannot simply put includes for the sandbox gamemode.

You would have to copy the spawnmenu.lua file into your custom gamemode for the include to work.

Also, you would need to add AddCSLuaFile(“spawnmenu.lua”) to the init.lua file because it is a file in your custom gamemode now so they would have to dl it.

-snip that was stupid-

Why not make your own?

Then you can just put it all in one file to send to the client

unless you’re confidence with vgui is as same as a floppy dick

We don’t want to make our own if there’s already one that suits our needs perfectly.

Adding spawnmenu.lua and cl_spawnmenu.lua didn’t work, we’d already tried that.

The code inside cl_spawnmenu.lua is so dependent on the sandbox gamemode code that it would take more time to edit the sandbox spawnmenu than to make your own.

Trust me, I’ve tried :ninja:

^ Agreed.

All you really need is a
and maybe some 's
and a couple 's . Then you can throw in some 's. Make your . And add garlic on top

DFrame -> DPanelList -> SpawnIcon

you make it alot more complicated that it needs to be

lol @ ticker rating spamming