Add a new tab like the Entities, Vehicle and Props tabs

A quick question. I have added a tab on the right side of the spawnmenu(a toolmenu). Now i want to add a tab on the left side like the props and entities tabs. I couldn’t find the functions and/or hooks in the wiki.

What are those functions called and how do i use them?

This thing right here:

Let me find the source for ya real quick.
http://luabin.foszor.com/code/lua/includes/modules/spawnmenu.lua#132

Thanks :slight_smile: What if i wanna remove a tab?

You shouldn’t be removing tabs at all!

Why not? O:

It will make the world implode and make a massive black whole!
Nah, why would you want to remove one? Are you making a gamemode?

Working on a rp-gamemode, so i wanted to remove a few tabs(Weapons, Entities, Vehicles) and add one for the buy menu(and a few others).

Why don’t you just restrict the weapons/vehicles/entities…?

The tabs just seems like a waste of space in the menubar, so i would like to remove them :S

Wait, so you are making an RP gamemode and deriving it from sandbox?

…Do you not know that most RP gamemodes use the spawn menu?

EDIT:

Note: The spawn menu is only in sandbox

Yes, because i still want the spawnmenu. Should i just remake that menu?

You could try…

EDIT:

It actually would be a good learning experience.

Ok… So how do i remove those tabs? Should i just copy the spawnmenu-code and remove the part of the code where these tabs are added, or is there a function?

It may be tedious to make a new menu from scratch, but you will get a lot more flexibility out of it, as you can make it to exactly suit your needs.

Hrmm. Ok. I’ll go ahead and try :slight_smile:

edit:
But espect alot of questions from me then ^^

You will have to do 2 things:

  1. Copy and edit the spawn menu
  2. Restrict the spawning concommand for entities. There is a hook for that somewhere in player.lua for sandbox I think.

If you take a look at the Flood gamemode, Find Me has remade the sandbox menu. Take a look. I’m sure he wouldn’t mind you taking a peep.

A better way would to be copy your sandbox folder and make a RP mod based on that, by adding and removing certain stuff.

What I think about this thread :munch: