Raised This Month: $12 Target: $400
 3% 

[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 , 15: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 - 1372 views - 1.2 KB)
    File Type: smx fakesay.smx (6.3 KB, 1549 views)

    Last edited by Mitch; 08-16-2011 at 15:09.
    Mitch is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 08-16-2011 , 18: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 , 17: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 17: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 , 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
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-23-2011 , 03: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 , 11: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
    nynCuKaH
    Member
    Join Date: Apr 2012
    Location: void
    Old 05-22-2014 , 15:28   Re: [Any] FakeSay
    Reply With Quote #7

    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 , 20:23   Re: [Any] FakeSay
    Reply With Quote #8

    Does not support letter spacing, for ex:

    hi my name is...

    Only this:

    hi_my_name_is...

    Tested on L4D2
    PepeZukas is offline
    shanapu
    Veteran Member
    Join Date: Apr 2015
    Location: .de
    Old 03-31-2017 , 20:35   Re: [Any] FakeSay
    Reply With Quote #9

    Quote:
    Originally Posted by PepeZukas View Post
    Does not support letter spacing, for ex:

    hi my name is...

    Only this:

    hi_my_name_is...

    Tested on L4D2
    try sm_fakesay shanapu "hi my name is..."
    __________________
    coding & free software
    shanapu is offline
    PepeZukas
    Member
    Join Date: Oct 2015
    Location: Banana Republic
    Old 04-01-2017 , 00:28   Re: [Any] FakeSay
    Reply With Quote #10

    Quote:
    Originally Posted by shanapu View Post
    try sm_fakesay shanapu "hi my name is..."
    Worked!

    Thx
    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 05:30.


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