PDA

View Full Version : [Paying][Request/Help] Adding Fire Balls & Slay after swap Command


OMGChronic
06-25-2011, 11:56
Closed.

OMGChronic
06-27-2011, 12:56
Closed.

TnTSCS
07-15-2011, 09:41
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;
}