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

Get User console output?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 01-20-2017 , 12:46   Get User console output?
Reply With Quote #1

is there any way to get client's conosle output?
for example a printed conosle message by a plugin or ...
just wondering if possible.
__________________
ambn is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 01-20-2017 , 13:27   Re: Get User console output?
Reply With Quote #2

Yes, It's possible by PTaH, https://github.com/komashchenko/PTaH
__________________


Max-Play.pl - the best polish servers
CamerDisco is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 01-20-2017 , 14:19   Re: Get User console output?
Reply With Quote #3

So like this:
PHP Code:
#include <PTaH>
public void OnPluginStart()
{
    
PTaH(PTaH_ConsolePrintHookConsolePrint);
}
public 
Action ConsolePrint(int clientchar sMessage[2048])
{
    if(
StrContains(sMessage"error"true) != -1)
    {
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

It's not compiling ...
__________________

Last edited by ambn; 01-20-2017 at 14:20.
ambn is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-20-2017 , 14:58   Re: Get User console output?
Reply With Quote #4

Have you had a look at the include file?
The callback has the array size set to 512.
PHP Code:
function Action (int iClientchar sMessage[512]); 
__________________
Peace-Maker 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 12:02.


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