How do I code a respawn system and team-specific spawn points?

I have a basic TDM gamemode, it’s functional, but I still need to add a respawn system and team-specific spawn points.

  1. How do I add a respawn system? I have no idea where to start besides that I have to use the GM:PlayerDeathThink function. I’ve google it and got very short and hard to understand tutorials (or at least everything I could find was very brief and un-informal. I’d like to add a feature when they are killed, it puts the attackers steam picture, their name, and what gun they used to kill the victim with. If anyone could explain this to me more in-depth that would be awesome, or send me a link to a previous thread. (I couldn’t find any good ones)

  2. How would I add team-specific respawn/initial spawn locations?

If you need more information or need me to explain further, please ask. My steam is austin741830 if you need to add me. Thanks in advance!

For the second question, you will need to use this:


You should look at other gamemodes’ code if you’re not sure how to do this.

You can use team library to add spawns for teams, then set GM.TeamBased = true; in shared.lua…

For a respawn system you’ll want to look at PlayerDeathThink:

And if you want a fully customizable spawn system, take a look at this: