View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2020 , 22:52   Re: Aliases of Amx_searchcmd | Adminhelp.sma 01/09/2020
Reply With Quote #11

The changes that you made to this default plugin are so trivial that it doesn't really merit posting it as a plugin submission.

Also, the fact that it's so trivial, it's a bit insulting that you changed the author of the plugin to some random name. I generally add my name after the original to denote that I'm a secondary author and/or add a signifier to the version (e.g. "f1", "f2", ..., etc.). And, this is even if I've made more than just trivial changes.

This whole thing can basically be accomplished with a separate plugin using client_cmd() or amxclient_cmd() without needing to replace the original adminhelp plugin. Another benefit to this approach is that it's basically forwards compatible! In fact, I suspect that there is a generic aliasing plugin already out there that can do this already.

Code:
#include <amxmodx>

public plugin_init()
{
	register_concmd("myAlias", "cmdAlias")
}

public cmdAlias(id)
{
	new szString[64]
	read_argv(0, szString, charsmax(szString))
	client_cmd(id, "amx_searchcmd %s", szString)
}
__________________

Last edited by fysiks; 01-09-2020 at 22:55.
fysiks is offline