View Single Post
Sples1
Senior Member
Join Date: Apr 2016
Location: Kitsune Lab
Old 12-03-2020 , 20:29   Re: [CSGO] Block Chat Wheel
Reply With Quote #2

For Radio blocks too...

Code:
public void OnPluginStart()
{
	HookUserMessage(GetUserMessageId("RadioText"), BlockRadio, true);

	AddCommandListener(Command_Ping, "chatwheel_ping");
	AddCommandListener(Command_Ping, "player_ping");
}

public Action Command_Ping(int client, const char[] command, int args)
{
	return Plugin_Handled;
}

public Action BlockRadio(UserMsg msg_id, Protobuf bf, const int[] players, int playersNum, bool reliable, bool init)
{
	char buffer[64];
	PbReadString(bf, "params", buffer, sizeof(buffer), 0);

	if (StrContains(buffer, "#Chatwheel_"))
	{
		return Plugin_Handled;
	}
	return Plugin_Continue;
}
__________________
Developer & Scripter from Kitsune Lab
Contact me: Steam | My Plugins | Kitsune Lab

Join to the community on our Discord server.
I stopped public develops. My old/new plugins available ONLY for my Discord community.

Last edited by Sples1; 12-03-2020 at 20:39.
Sples1 is offline