ну вроде все работает
Code
#include <sourcemod>
#include <cstrike>
public OnPluginStart()
{
AddCommandListener(ChooseTeam, "jointeam");
}
public Action:ChooseTeam(client, const String:command[], args)
{
if (client == 0) return Plugin_Continue;
if (client < 1 || args < 1) return Plugin_Handled;
decl String:teamString[3];
GetCmdArg(1, teamString, sizeof(teamString));
new Target_Team = StringToInt(teamString);
if (Target_Team == 0)
{
ClientCommand(client, "play buttons/button11.wav");
PrintToChat(client, "\x03[nJoin] \x04Автовыбор отключен, нажми 1 или 2!");
return Plugin_Handled;
}
if (Target_Team == 1)
{
ClientCommand(client, "play buttons/button11.wav");
PrintToChat(client, "\x03[nJoin] \x04Спектор отключен, нажми 1 или 2!");
return Plugin_Handled;
}
return Plugin_Continue;
}