Sandbox Teams

Hello everyone
After running a Gmod sandbox server for a while (**HUGE **thank you to darksoul69 for providing free servers, he is amazing) I realized how big of a problem can RDM be. I’ve seen people just join the game and kill everyone on the server until they left. I didn’t want to enable godmode so people can still build weapon contraptions and have fights (as long as both players are fighting voluntarily) so I made this little script

**What does it do?
This script allows a player to switch between two teams (builder and fighter) at any time.

-Use tools
-Use Noclip
-Have godmode enabled
-Can’t use weapons
*-Can only use weapons
-Cant use noclip
-Can’t use godmode

Console Commands:
**go_builder (or !go_builder in chat) - Switch your team to “builder”
go_fighter (or !go_fighter in chat) - Switch your team to “fighter”
sandboxteams_builderdamage (1 or 0, serverside only) - Lets builders damage fighters (For example by using weapon entities). Useful if you want to have a “war” kind of server with people using weapon contraptions
sandboxteams_npcdamage (1 or 0, serverside only) - Lets npcs damage fighters[/t]

Non-Workshop Download

I am not that great at lua (yet) so please report any bugs or errors and feel free to make suggestions.

Interesting, although I hardly ever join servers, this seems useful…
Maybe in the future, you could create an admin control system based off this… for instance, <Playername> go_builder/fighter… Good work!

After seeing people trying to type the command in chat I added the ability to switch teams by typing !go_builder and !go_fighter

Should a menu that pops up when they join the server that forces them to join a team, but can change anytime they want mid-session, like switching jobs on a darkrp. Just a suggestion.

Now the people who join are forced into the builder team but I am planning to make it a menu later
And added the menu, for now it just runs the “go_x” command but I will change it later

Neat idea, and a neat addon.

I think /build and /fight might be better chat commands, though.

Great idea, sent the update to the workshop

Awesome, I’m going to use this once I get my Sandbox set up!

Works greate but it dosent works with ULX Team/uteam and sui_scoreboard, could you fix this?

I’ll look into it later
Does it not work it all or does it just not show the team in the scoreboard?

[editline]6th April 2013[/editline]

Sent out an update that toggles damage dealt from npcs to fighters with a “sandboxteams_npcdamage” convar

Ok I think I fixed it, the names are also properly colored in chat now (red for fighters, blue for builders)

Does this still work for everyone?
For some reason it’s completely broken on my server but works fine on my local pc and I can’t figure out why

Any interfering files? e.g Addons.

Doesnt seem to be the problem, it just doesnt load the init file

Its still broken, when someone type /fight:

It’s a good idea but people just switch teams and dont care about building i find, it doesnt stop the mingebags.

When you get killed 2 times, you get automatic switched to builder.

Now that’s weird, I have no idea why would that happen. I’ll try to look into it

I’ve been trying to replicate the “killed 2 times” problem but it does not happen on my server, must be a conflict on your side sorry

I have tried !go_fighter and /fight in the chat with no success they just show as normal chat with no action. Also when in fight mode and we kill someone, it registers on the scoreboard and in console but does not show who killed who in the upper right hand corner… I’ve seen this working on another partner server. Perhaps I am missing something simple? There are no conflicting addons that I am aware of, after we die it appears we are ragdolled and able to be kicked around. I am using Evolve with Falco’s Prop Protection… awesome work by the way!

Edit: This is a link to my workshop collection if you are interested in seeing if something may be conflicting with the kill hud in the upper right hand corner.

Edit: This is also global, no one on the server can see the kills/deaths but suicides show up fine.