I don't know how else to better explain server commands.
If you want to be able to put a slash infront of something in chat and have something happen, you need it to be a server command. The structure for a server command is always like this.
function serverCmdCommandName(%client, %word1) - There can be something like 15 "%word#"s.
Also, your if statement is pretty handicapped looking.
if(%client.tdmTeam != -1)
messageClient(%client, '', "\c5You are in team" SPC %client.tdmTeam);
else
messageClient(%client, '', "\c5You not on a team.");
You can take the curly-braces out because there is only one statement to be ran if it evaluates true.
An else if is not required because there's only one alternative to what the first if is.