Since you're using Sourcemod - couldn't you just addServerCommand("sm_slay %i", i)since the AdvCommands swap script uses i
Plus I see you posted the Command_TeamSwap and not the Command_Swap
Here's what should work for Command_Swap with the slay portion added (untested):
public Action:Command_Swap(client,args)
{
if (!args)
{
ReplyToCommand(client,"[SM] Usage: sm_swap <target>");
return Plugin_Handled;
}
decl String:pattern[MAX_NAME];
GetCmdArg(1,pattern,sizeof(pattern));
new cl = FindTarget(client,pattern);
if (cl != -1)
SwapPlayer(client,cl);
ServerCommand("sm_slay %i", client) // <-- new portion
else
ReplyToCommand(client,"%t","No target",YELLOW,TEAMCOLOR,pattern,YELLOW);
return Plugin_Handled;
}
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.