Hey all, I managed to pick up a team deathmatch styled skeleton gamemode designed for Garry's Mod 12 from here as I'm making a gamemode for GMod 13 with this skeleton (This skeleton did not give me any lua errors when I tested this gamemode out, despite it being designed for GMod 12)
I'm just wondering how to make it so the game will randomly choose one of the playermodels out of the ones you want in that certain class or team for the rest of the match (like in games like CS:GO where it has different playermodels for the team you play on and it chooses one of them for you rather than choosing the one you prefer). For example, if you have a team or class where you have the selection of the CT playermodels; Seal Team 6 (urban), GSG-9 (riot), SAS (gasmask) and the GIGN (swat) playermodel it will choose one of them for you rather than allowing you what one you want to use. Basically that's what I want to have without the need of making different classes for each playermodel, as I'm a bit stuck on doing this I will need some help figuring out how to get the gamemode to randomly choose one of the playermodels out of all the ones you want on that specific team or class.
Thanks for reading, I hope you can understand what I mean :v:
Make a table of them and use [URL="http://wiki.garrysmod.com/page/table/Random"]table.Random[/URL] to select one.
[QUOTE=code_gs;44094972]Make a table of them and use [URL="http://wiki.garrysmod.com/page/table/Random"]table.Random[/URL] to select one.[/QUOTE]
Cheers man, just a question. Should I put the table in cl_init (Client) or in init? I know what both of the files mean but some people seem to put it in cl_init, but I'm pretty sure it's init. I don't understand where I should put this unless it makes init really messy :/
It would go in any server side file
Sorry, you need to Log In to post a reply to this thread.