go in a server, then off the chat, type "/team [1-64]" and your friend can join you by typing in the same number as you.
Then, you can use the command "/lock" so nobody can join your team (if you're not in run, else tey wont be able to even if it wasn't locked), and if you kill, it kills everyone and you guys don't get sent to team 0