Here you go, i hard-coded the values since i was lazy. Add in whatever commands you want to restrict in commands[][] and change restrict_team to the team you want to use the command.
2 = RED, 3 = BLUE teams for TF2
2 = T, 3 = CT ???
I could be wrong with T/CT team numbers, i'm only guessing it.
PHP Code:
#include <sourcemod>
#include <sdktools>
#define restrict_team 2
char commands[][] = {
"sm_slay",
"sm_kick",
"sm_ban"
}
public Action OnClientCommand(int client, int args)
{
char buffer[32];
GetCmdArg(0, buffer, 32);
for (int i = 0; i < sizeof(commands); ++i)
{
if (!strcmp(buffer, commands[i]))
{
if (GetClientTeam(client) != restrict_team)
return Plugin_Stop;
break;
}
}
return Plugin_Continue;
}
__________________