View Single Post
Austin
Senior Member
Join Date: Oct 2005
Old 06-16-2023 , 19:26   Re: [CSGO] Any way to block certain bot radio commands?
Reply With Quote #4

Quote:
Originally Posted by oqyh View Post
you can disable bot radio

bot_chatter "off"

or what you want (not tested)
I don't want to turn off most bot chatter only a few.

Why I wanted this is because Vit_amin wrote a plugin for me that significantly increases the bot response to radio commands and it works very good!

This is great but the next problem I noticed is the bots that are following my commands which could be follow me, hold this position, need back up, are "interrupted" and stop following my commands when another bot radios for back up
which is all the time!

I thought if I limited their ability to radio for backup it would fix this and it does!
Your example got me far enough along to get this done.

I don't know why you are looping through all clients.
Isn't the client parm to Call_Back_Sounds() the person/bot that issued the command?

This seems to work great and keeps the bots from giving up on my commands!
Thanks!


Vit_amin
I don't understand the point your making.
?


PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>

//-----------------------------------------------------------------------------
public void OnPluginStart()
{
    
AddNormalSoundHook(Call_Back_Sounds);
    
PrintToServer("ABS_CSGO_BotRadio Loaded");
}

//-----------------------------------------------------------------------------
public Action Call_Back_Sounds(int clients[64], int &numClientschar sample[PLATFORM_MAX_PATH], int &clientint &channelfloat &volumeint &levelint &pitchint &flags)
{
    if (
StrContains(sample"takingfire")    != -||
        
StrContains(sample"underfire")     != -||
        
StrContains(sample"bottarget")     != -1)
    if(
IsValidClient(client) && IsFakeClient(client))
    {
        
PrintToServer("BLOCKED RADIO %s"sample);
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;
}

//-----------------------------------------------------------------------------
bool IsValidClient(int client)
{
    if (!(
client <= MaxClients))
        return 
false;
    if (!
IsClientInGame(client))
        return 
false;
    return 
true;


Last edited by Austin; 06-16-2023 at 19:28.
Austin is offline