How do i make this?

i am trying to make a gui on sandbox that when it is opened you choose from 2 teams and when u choose 1 team u can then choose for 6 loadouts. how would i do that?

Well you’re gonna need to know some knowledge into lua, then you’re gonna want to read into derma and GUI, which would all be found on

You would do it using Lua.

i think we all know that

[editline]27th August 2014[/editline]

for the loadouts can someone please give me a code for loadout 1 i can go from there. i want it to be a button that when you click on it it slays you and then gives you weapons when u spawn.

basically just asking for all of it

If you don’t know even a little bit of lua, don’t come to us.
Try reading about what you want to make and make something, even if it’s the dumbest most useless and piece of shit code ever (I’ve done this before), it’s still better than nothing.

This should cover the basics. [sp]I know old wiki, but most of it works anyways, stop whining[/sp]

I preffer old wiki for examples, the new one examples are really bad (But as i don’t make edits or support the new wiki, i can’t whine)

How are they “bad”?

I think they are bad because they do not show many examples that can actually be used and implemented into the game. And that is important to developing Lua coders.

Some of the examples are flat out broken, while some don’t have examples at all, while some have impractical implementation. I’d contribute to the wiki if I knew how.

Really, the old wiki is superior in my opinion for a few reasons:

  1. The search function actually works as it should
  2. It’s easier to find things if you’re newer to Lua (If you’re starting out Lua, you’re not going to know the difference between Library and Hooks [this wouldn’t be a problem if search wasn’t so silly]).
    In addition, what I like about the old wiki is how it has “See Also”, which links related functions. Very helpful.
  3. This[/t]
Is much easier to read than

Granted the new wiki has a lot of nice style and stuff, and it’s still fairly new, but it definitely needs some work.


It’s too unfair to compare, for languaje reference, i use the new wiki, for examples and implementation i use mauristv…But it’s okay, mauristv was built trhought all these years

the current wiki is a pile of shit imo, the only reason i dont like it is because it looks like a cheesy webpage from 2001

maurits wiki is short, sweet, and to the point, and its easy to pinpoint what you want

Ok, I do agree that the search sucks dick. ( You can use CTRL+F with the new fancy sidebar )
I do agree that there are some undocumented functions still ( Still, much more documented on the new one then there was on the old one, or on the community one ).
I do agree some examples suck or missing.
I do agree that “See also” section in missing and is useful. ( Sidebar partially, if not fully, replaces that section )
I do agree Panel documentation is pretty much non existent.

I don’t agree that this:[/t]

Is better looking that this:

All I see on the first picture is clutter, bunch of information on once place, some of it - completely useless.
What I see on the second picture is all information is properly divided into categories - you are looking for arguments - here they are, description - here it is.

mauristv wasn’t build all these years, it’s just a copy of old wiki ( 2 years old now ), it is not being updated afaik.

You can even style the new one if you don’t like it’s looks, via extensions or whatever.

Now, if you people would AT LEAST point out the pages with shit examples, or those that totally need an example, I could fix it, if all you are going to say is “I don’t like, it’s shit, I don’t like the looks” then nothing is going to change.

You don’t say…

The new wiki have lot of wasted space, the maur…Old wiki just had a square that perfectly fits on the screen and gives you what do you really need without even scrolling

And i’m not who says “Everything it’s shit”, if i don’t contribuite, i don’t have nothing to bitch about

i would very much appreciate it if instead of arguing someone could just make the first loadout for me and i could go from there

Nobody will code something to you for free…Nobody

The hook you should use to make the menu pop up when the player first spawns
Hook you should use to give the player their weapons on respawn
How to use hook.Add

Some functions you’re going to want to use:
ENT:SetNWString() [to set the “team” because i can’t think of a better way]

You should use the following to create the menu:
vgui.Create() (use a little bit of this too)

I doubt anyone here will write an entire vgui + team system for you (even me), but you can feel free to add me on Steam and I’ll answer as many questions as I can.