Raised This Month: $12 Target: $400
 3% 

Logging setinfo name "new name"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nekromio
New Member
Join Date: Nov 2021
Old 11-12-2021 , 10:06   Logging setinfo name "new name"
Reply With Quote #1

Hello, please tell me how you can block the setinfo command? I try this way, but it doesn't work out:
Code:
#pragma semicolon 1
#pragma newdecls required

char
	sFile[PLATFORM_MAX_PATH];

public void OnPluginStart()
{
	BuildPath(Path_SM, sFile, sizeof(sFile), "logs/client_console.log");
}

public Action OnClientCommand(int client, int args)
{
	char cmd[16];
	GetCmdArg(0, cmd, sizeof(cmd));
	
	char argstr[128];
	GetCmdArgString(argstr, sizeof(argstr));
	
	if(argstr[0])
	{
			LogToFile(sFile, "-> [%s %s]", cmd, argstr);
			PrintToChatAll("-> [%s %s]", cmd, argstr);
	}
	else
	{
		LogToFile(sFile, "--> [%s]", cmd);
		PrintToChatAll("-> [%s]", cmd);
	}
	return Plugin_Continue;
}

Last edited by Nekromio; 11-12-2021 at 10:07.
Nekromio is offline
Send a message via Skype™ to Nekromio
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 09:05.


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