A few lua questions for a gamemode I am making.

Hello
I am doing a little project with me and my friends but I have a few questions before I start.

I would like to make a screen similar to team fortress’s team select. How blue is next to red team during the selection. Is that hard to make? I would like to have a player model there since the project I am making has unique player models. How would I do that? Just a quick summary and the difficulty level of this if you can’t gimme a quick source code would help too.

Also, For the derma, I use derma designer since its real easier than actually typing the code but how do I trigger when a frame closes after the press of the button on the frame a new one opens up. Also, How can I make a frame pop up if I am holding a key?

And lastly, Where do I put the derma codes. I put that in cl_init.lua right? Can’t I just make my own lua? (Like menu.lua)?

Thanks :slight_smile:

You can make a file called menu.lua just make sure to include it in your cl_init.lua file “include(menu.lua)”.
You can open a new frame by having it call a function that spawns it when the first menu closes.
I believe this is will work for opening a menu when you press a button http://wiki.garrysmod.com/?title=Player.KeyPressed
If the button you want to open it is one of the F1-4 keys you could use showhelp or showhelpspare(or something like that).
Also i would only use derma designer for basic layout since last time i checked it was lacking quite a few derma features. For your model of the team use http://wiki.garrysmod.com/?title=DModelPanel

Thank you!
You really helped me out. :slight_smile: