View Single Post
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 12-28-2017 , 07:22   Re: [CS:GO] PTaH - V1.0.8
Reply With Quote #107

hi guys!

i used this plugin for console cleaner with cleaner.cfg !!

but not work!! console cleaner dont work in the my servers !!

Does the code work properly:
PHP Code:
PTaH(PTaH_ServerConsolePrintHookServerConsolePrint); 
plugin:
PHP Code:
#pragma semicolon 1  
#include <PTaH>  

public Plugin myinfo 

    
name "Cleaner"
    
author "Phoenix (˙·٠●Феникс●٠·˙)"
    
version "1.0.0"
    
url "https://zizt.ru/ | http://hlmod.ru | https://forums.alliedmods.net/" 
}; 

char sPath[128]; 
char sFilter[32][256]; 
int sFilter_

public 
void OnPluginStart()   

    
BuildPath(Path_SMsPathsizeof(sPath), "configs/cleaner.cfg"); 
    if(!
FileExists(sPath)) SetFailState("[Cleaner] File cleaner.cfg not found"); 
    
PTaH(PTaH_ServerConsolePrintHookServerConsolePrint);  


public 
void OnMapStart()  

    
sFilter_ 0
    
File bdc OpenFile(sPath"r"); 
    while (!
bdc.EndOfFile()) 
    { 
        
bdc.ReadLine(sFilter[sFilter_], sizeof(sFilter[])); 
        
sFilter_++; 
    } 
    
delete bdc


public 
Action ServerConsolePrint(const char[] sMessageLoggingSeverity severity)  

    for(
int isFilter_i++) if (StrContains(sMessagesFilter[i]) != -1) return Plugin_Handled;  
    return 
Plugin_Continue;  


Last edited by Dr.Mohammad; 12-28-2017 at 07:25.
Dr.Mohammad is offline