The sm_fakesay in FuncommandsX was already updated to essentially this code.
Directly from the
FuncommandsX source code:
PHP Code:
public Action:Command_Fakesay(client,args)
{
if(args != 2)
{
ReplyToCommand(client, "[SM] Usage: sm_fakesay <#userid|name> <text>");
return Plugin_Handled;
}
decl String:Target[64];
decl String:text[128];
GetCmdArg(1, Target, sizeof(Target));
GetCmdArg(2, text, sizeof(text));
new itarget = FindTarget(client, Target);
if(itarget == -1)
{
ReplyToCommand(client, "Unable to find target");
return Plugin_Handled;
}
CPrintToChatAllEx(itarget, "{teamcolor}%N{default} : %s", itarget, text);
LogAction(client, itarget, "%L made %L say %s ", client, itarget, text);
return Plugin_Handled;
}
Matter of fact, if you extract Command_Fakesay from this plugin and from fakesay.sp in the FuncommandsX package and remove the whitespace, they're identical.
__________________