You mean a command sm_team (client) (team) ?
I have made this quick-source code, i use it for ZM, it should work for HL2DM too...
PHP Code:
#include <sourcemod>
#define PLUGIN_VERSION "1.0"
public Plugin:myinfo =
{
name = "Change team",
author = "Nican132",
description = "Roll the dice",
version = PLUGIN_VERSION,
url = "http://www.sourcemod.net/"
};
public OnPluginStart()
{
RegAdminCmd("sm_team", ChangeTeam, ADMFLAG_KICK, "sm_team <#userid|name> <team>");
}
public Action:ChangeTeam(client, args){
if (args < 2)
{
ReplyToCommand(client, "[SM] Usage: sm_team <#userid|name> <team>");
return Plugin_Handled;
}
decl String:arg[65];
GetCmdArg(1, arg, sizeof(arg));
new target = FindTarget(client, arg, true , false);
if (target == -1)
return Plugin_Handled;
decl String:s_time[12];
GetCmdArg(2, s_time, sizeof(s_time));
new team = StringToInt(s_time);
if (team < 1 || team > 4)
return Plugin_Handled;
GetClientName(target, arg, sizeof(arg));
ChangeClientTeam(target, team);
PrintToChatAll("[SM] Admin has changed %s to team #%d", arg, team)
return Plugin_Handled;
}
__________________