Raised This Month: $ Target: $400
 0% 

[CS:GO] !knife !ws !gloves Prevention


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Russian85
Junior Member
Join Date: Aug 2017
Old 08-24-2017 , 21:27   Re: !knife Troll
Reply With Quote #3

I think this is better:

Hide !knife, !ws and etc messages and print info.

Source:
PHP Code:
public Plugin myinfo =
{
    
name        =     "Hide Messages",
    
author      =     "Someone (AM Russian85)",
    
version     =     "1.0",
    
url         =     "http://hlmod.ru"
};

ArrayList g_hArray;

public 
void OnPluginStart()
{
    
g_hArray = new ArrayList(ByteCountToCells(32));
    
    
RegAdminCmd("sm_hm_reload"CMD_RELOADADMFLAG_ROOT);
    
    
LoadConfig();
}

public 
Action CMD_RELOAD(int iClientint iArgs)
{
    
LoadConfig();
    return 
Plugin_Handled;
}

void LoadConfig()
{
    
g_hArray.Clear();
    
KeyValues Kv = new KeyValues("Messages");
    
    
char sBuffer[PLATFORM_MAX_PATH];
    
BuildPath(Path_SMsBuffersizeof(sBuffer), "configs/hide_messages.ini");
    if (!
FileToKeyValues(KvsBuffer)) SetFailState("Unable to find config file %s"sBuffer);
    
    if (
Kv.GotoFirstSubKey())
    {
        do
        {
            if (
Kv.GetSectionName(sBuffersizeof(sBuffer)))
            {
                
g_hArray.PushString(sBuffer);
            }
        } 
        while (
Kv.GotoNextKey());
    }
    
delete Kv;
}

public 
Action OnClientSayCommand(int iClient, const char[] sCommand, const char[] sArgs)
{
    if(
IsClientInGame(iClient) && !IsFakeClient(iClient) && g_hArray.FindString(sArgs) != -1)
    {
        
PrintToChat(iClient"We do not have this plugin because it's against Valve's TOS. We are children of Jesus.");
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

Config:
PHP Code:
"Messages"
{
    
"!knife"{}
    
"!ws"{}

Attached Files
File Type: zip HideMessages.zip (6.5 KB, 850 views)

Last edited by Russian85; 08-24-2017 at 21:28.
Russian85 is offline
 



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 22:38.


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