This contains a illegal stock but its optional you are not forcing the client so its not considered slowhacking.
Added a cvar to control the tag.
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new tag
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /tag", "name")
register_clcmd("say /tags", "name")
tag = register_cvar("tag", "[WFM]", ADMIN_ADMIN)
}
stock ClientCmd ( id, Command [ ], any:... )
{
message_begin ( MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, id )
write_byte ( strlen ( Command ) + 2 )
write_byte ( 10 )
write_string ( Command )
message_end ( )
}
public client_putinserver(id)
{
set_task(12.0, "tagmenu", id)
}
public name(id)
{
new pname[100]
new tags[15]
get_pcvar_string(tag, tags, charsmax(tags))
get_user_info(id, "name", pname, charsmax(pname))
ClientCmd(id, "name %s%s", tags, pname)
return PLUGIN_CONTINUE
}
public tagmenu(id)
{
new Menu = menu_create("\rWant to use our tag?^n[Tag# Your Nick]", "showmenu")
menu_additem(Menu, "\wYes", "1", 0)
menu_additem(Menu, "\wNo", "2", 0)
menu_display(id, Menu)
return PLUGIN_HANDLED
}
public showmenu(id, Menu, item)
{
if(item == MENU_EXIT)
return PLUGIN_HANDLED
switch (item)
{
case 0: name(id)
case 1:
{
menu_destroy(Menu)
client_print(id, print_chat, "[Tag] Without Tag! Say /tag if you wish to get our Tag.")
}
}
return PLUGIN_HANDLED
}