Raised This Month: $ Target: $400
 0% 

[Any] FakeSay


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitch
Junior Member
Join Date: Aug 2011
Plugin ID:
2499
Plugin Version:
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A Safe version of sm_fakesay from FuncommandsX
    Old 08-16-2011 , 16:06   [Any] FakeSay
    Reply With Quote #1

    Description:
    A "Safe" version of sm_fakesay that doesn't let you force the client to use commands.

    Cvars:

    sm_fakesay_version - shows the plugin version.

    Commands:
    sm_fakesay <#userid|name> <text> - the fakesay command.

    Notes:
    Needs http://forums.alliedmods.net/showthread.php?t=96831
    to compile.
    Attached Files
    File Type: sp Get Plugin or Get Source (fakesay.sp - 1277 views - 1.2 KB)
    File Type: smx fakesay.smx (6.3 KB, 1414 views)

    Last edited by Mitch; 08-16-2011 at 16:09.
    Mitch is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 08-16-2011 , 19:53   Re: [Any] FakeSay
    Reply With Quote #2

    Lolz. Better code:

    PHP Code:
    public Action:Command_Fakesay(clientargs)
    {
        
    ReplyToCommand(client"Speak for yourself!");
        return 
    Plugin_Handled;

    Fun in any case!
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-21-2011 , 18:33   Re: [Any] FakeSay
    Reply With Quote #3

    Two quick fixes required:
    • You don't need to include <admin> since you aren't using any admin[menu] functions.
    • Please update this to use ProcessTargetString unless you have some specific reason to prevent admins from using group targeting.

      Also, you might want to add support for fake team chat messages.
    __________________

    Last edited by DarthNinja; 11-21-2011 at 18:52.
    DarthNinja is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 11-23-2011 , 02: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 02:43.
    Dr. McKay is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-23-2011 , 04:40   Re: [Any] FakeSay
    Reply With Quote #5

    McKay:
    http://forums.alliedmods.net/showpos...&postcount=383
    __________________
    DarthNinja is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 11-23-2011 , 12:58   Re: [Any] FakeSay
    Reply With Quote #6

    Quote:
    Originally Posted by DarthNinja View Post
    Cool. And I was wondering if this was our Mitch.
    __________________
    Dr. McKay is offline
    Sidder
    Member
    Join Date: Jan 2012
    Old 01-14-2012 , 08:29   Re: [Any] FakeSay
    Reply With Quote #7

    Could be mentiond what flag is needed?


    edit; thx for the idea, was able to sort it like that

    Last edited by Sidder; 01-15-2012 at 05:05.
    Sidder is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 01-14-2012 , 17:00   Re: [Any] FakeSay
    Reply With Quote #8

    It's ADMFLAG_BAN or whatever you set.
    __________________
    DarthNinja is offline
    nynCuKaH
    Member
    Join Date: Apr 2012
    Location: void
    Old 05-22-2014 , 16:28   Re: [Any] FakeSay
    Reply With Quote #9

    Quote:
    Originally Posted by Dr. McKay View Post
    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.
    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);
    	FakeClientCommandEx(itarget, text);
    	LogAction(client, itarget, "%L made %L say %s ", client, itarget, text);
    	return Plugin_Handled;
    }
    __________________
    nynCuKaH is offline
    PepeZukas
    Member
    Join Date: Oct 2015
    Location: Banana Republic
    Old 03-31-2017 , 21:23   Re: [Any] FakeSay
    Reply With Quote #10

    Does not support letter spacing, for ex:

    hi my name is...

    Only this:

    hi_my_name_is...

    Tested on L4D2
    PepeZukas is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 00:35.


    Powered by vBulletin®
    Copyright ©2000 - 2022, vBulletin Solutions, Inc.
    Theme made by Freecode