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

Solved [CS:GO] Deathcry radio command blocker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r3v
Senior Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 07-07-2021 , 12:20   [CS:GO] Deathcry radio command blocker
Reply With Quote #1

Hello. I need a plugin which can block one radio console command.
This video shows what i want to block:
https://www.youtube.com/watch?v=g8Cx...l=3kliksphilip

Last edited by r3v; 07-08-2021 at 11:19.
r3v is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-07-2021 , 12:59   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #2

PHP Code:
public void OnPluginStart()
{
    if(
GetFeatureStatus(FeatureType_CapabilityFEATURECAP_COMMANDLISTENER) != FeatureStatus_Available)
    
SetFailState("SourceMod COMMAND LISTENER is not available");

    
AddCommandListener(listen"playerradio");
}

public 
Action listen(int client, const char[] commandint argc)
{
    if(
client && argc == 2)
    {
        
char buffer[10];
        
GetCmdArg(1buffersizeof(buffer));
        
        if(
StrEqual(buffer"deathcry"false))
        {
            if(
IsClientInGame(client))
            {
                
PrintToChat(client"[SM] Stop it.");
            }

            return 
Plugin_Handled;
        }
    }
    
    return 
Plugin_Continue;


Last edited by Bacardi; 07-07-2021 at 13:51. Reason: ==
Bacardi is offline
r3v
Senior Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 07-07-2021 , 13:20   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #3

PHP Code:
//// deathcry_blocker.sp
//
// D:\Servers\public_csgo\csgo\addons\sourcemod\scripting\deathcry_blocker.sp(11) : warning 211: possibly unintended assignment
// D:\Servers\public_csgo\csgo\addons\sourcemod\scripting\deathcry_blocker.sp(11) : error 022: must be lvalue (non-constant)
// D:\Servers\public_csgo\csgo\addons\sourcemod\scripting\deathcry_blocker.sp(11) : warning 215: expression has no effect
// D:\Servers\public_csgo\csgo\addons\sourcemod\scripting\deathcry_blocker.sp(11) : error 001: expected token: ";", but found ")"
// D:\Servers\public_csgo\csgo\addons\sourcemod\scripting\deathcry_blocker.sp(11) : error 029: invalid expression, assumed zero
// D:\Servers\public_csgo\csgo\addons\sourcemod\scripting\deathcry_blocker.sp(11) : fatal error 190: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
//
// Compilation Time: 0,34 sec
// ----------------------------------------

Press enter to exit ... 
r3v is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-07-2021 , 13:51   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #4

Dam ==. Try again
__________________
Do not Private Message @me
Bacardi is offline
r3v
Senior Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 07-08-2021 , 11:19   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
Dam ==. Try again
Sorry, for late response. Plugin is working! Thank You!
r3v is offline
digin
Member
Join Date: Nov 2019
Old 07-15-2021 , 03:26   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #6

Quote:
Originally Posted by Bacardi View Post
PHP Code:
public void OnPluginStart()
{
    if(
GetFeatureStatus(FeatureType_CapabilityFEATURECAP_COMMANDLISTENER) != FeatureStatus_Available)
    
SetFailState("SourceMod COMMAND LISTENER is not available");

    
AddCommandListener(listen"playerradio");
}

public 
Action listen(int client, const char[] commandint argc)
{
    if(
client && argc == 2)
    {
        
char buffer[10];
        
GetCmdArg(1buffersizeof(buffer));
        
        if(
StrEqual(buffer"deathcry"false))
        {
            if(
IsClientInGame(client))
            {
                
PrintToChat(client"[SM] Stop it.");
            }

            return 
Plugin_Handled;
        }
    }
    
    return 
Plugin_Continue;

Thanks!
digin is offline
mranis18
Junior Member
Join Date: Apr 2020
Old 07-25-2021 , 10:15   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #7

Quote:
Originally Posted by Bacardi View Post
PHP Code:
public void OnPluginStart()
{
    if(
GetFeatureStatus(FeatureType_CapabilityFEATURECAP_COMMANDLISTENER) != FeatureStatus_Available)
    
SetFailState("SourceMod COMMAND LISTENER is not available");

    
AddCommandListener(listen"playerradio");
}

public 
Action listen(int client, const char[] commandint argc)
{
    if(
client && argc == 2)
    {
        
char buffer[10];
        
GetCmdArg(1buffersizeof(buffer));
        
        if(
StrEqual(buffer"deathcry"false))
        {
            if(
IsClientInGame(client))
            {
                
PrintToChat(client"[SM] Stop it.");
            }

            return 
Plugin_Handled;
        }
    }
    
    return 
Plugin_Continue;

i need same plugin just for block this playerradio Guardian.Victory
if u can help me
mranis18 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-25-2021 , 17:09   Re: [CS:GO] Guardian radio command blocker
Reply With Quote #8

PHP Code:
public void OnPluginStart()
{
    if(
GetFeatureStatus(FeatureType_CapabilityFEATURECAP_COMMANDLISTENER) != FeatureStatus_Available)
    
SetFailState("SourceMod COMMAND LISTENER is not available");

    
AddCommandListener(listen"playerradio");
}

public 
Action listen(int client, const char[] commandint argc)
{
    if(
client && argc == 2)
    {
        
char buffer[30];
        
GetCmdArg(1buffersizeof(buffer));
        
        if(
StrContains(buffer"guardian."false) != -1)
        {
            if(
IsClientInGame(client))
            {
                
PrintToChat(client"[SM] Stop it.");
            }

            return 
Plugin_Handled;
        }
    }
    
    return 
Plugin_Continue;

Bacardi is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-25-2021 , 18:45   Re: [CS:GO] Deathcry radio command blocker
Reply With Quote #9

I quick make test plugin. For testing only.

- It read response_rules.txt file (inside VPK) and collect possible playerradio words.
- sm_test open menu with list words.
- Reloading plugin you see in server console list of words.
- In-game cooldown will slow you for spamming playerradio commands :/

- Most working playerradio words are actually set in other file, file name is called by model name.
I have no time to fiddle with that...

- So most words in menu would not work, it depends either of team, model or it is round event sound, game play ? etc. etc.


test plugin
__________________
Do not Private Message @me
Bacardi 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 00:21.


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