Raised This Month: $32 Target: $400
 8% 

Solved How to FakeChatCommand? (GetCmdReplySource)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-15-2020 , 03:54   How to FakeChatCommand? (GetCmdReplySource)
Reply With Quote #1

PHP Code:
/*
enum ReplySource
{
    SM_REPLY_TO_CONSOLE = 0,
    SM_REPLY_TO_CHAT = 1
};
*/

public void OnPluginStart()
{
    
RegAdminCmd("sm_test"Cmd_TestADMFLAG_ROOT);
    
RegAdminCmd("sm_payload"Cmd_PayloadADMFLAG_ROOT);
}

public 
Action Cmd_Test(int clientint args)
{
    
FakeClientCommandEx(client"sm_payload");
    return 
Plugin_Handled;
}

public 
Action Cmd_Payload(int clientint args)
{
    
PrintToChat(client"GetCmdReplySource = %i"GetCmdReplySource());
    return 
Plugin_Handled;

returns 0, I need 1.

Required by Commands Eater to replicate (modify) commands accurately.

Thanks.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 02-16-2020 at 02:55.
Dragokas is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 02-15-2020 , 04:36   Re: How to FakeChatCommand? (GetCmdReplySource)
Reply With Quote #2

FakeClientCommandEx is faking a console command, not a chat one.
Try to use FakeClientCommandEx(client, "say /payload");
__________________

Last edited by Ilusion9; 02-15-2020 at 04:42.
Ilusion9 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-16-2020 , 02:55   Re: How to FakeChatCommand? (GetCmdReplySource)
Reply With Quote #3

Thank you. Everything works fine.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply



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 14:40.


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