Thread: [Any] FakeSay
View Single Post
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 11-23-2011 , 01:41   Re: [Any] FakeSay
Reply With Quote #4

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(1Targetsizeof(Target));
    
GetCmdArg(2textsizeof(text));

    new 
itarget FindTarget(clientTarget);
    if(
itarget == -1)
    {
        
ReplyToCommand(client"Unable to find target");
        return 
Plugin_Handled;
    }
    
CPrintToChatAllEx(itarget"{teamcolor}%N{default} :  %s"itargettext);
    
LogAction(clientitarget"%L made %L say %s "clientitargettext);
    
    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.
__________________

Last edited by Dr. McKay; 11-23-2011 at 01:43.
Dr. McKay is offline