Add /untag feature , add cvar for taking tag, add menu disable cvar and direct tag by /tagme
PHP Code:
#include < amxmisc >
#include < cstrike >
#define PLUGIN "Ask4Tag"
#define VERSION "3.1"
#define AUTHOR "Jhob94"
#define PREFIX "-=[AB]=-.::"
#define SUFIX "::."
public plugin_init()
{
register_plugin("PLUGIN", "VERSION","AUTHOR")
register_clcmd( "say /tagme", "tagmenu" )
register_clcmd( "say_team /tagme", "tagmenu" )
}
public client_putinserver(id)
PUB(id)
public PUB(id)
{
client_print(id, print_chat, "[AMXX] Say /tagme to use our TAG. HAVE FUN!"
set_task(120.0, "PUB", id)
}
public client_disconnect(id)
remove_task(id)
public tagmenu(id,level,cid)
{
if(!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
new Menu = menu_create("\yDo you want use our TAG?^n\r", "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
new iData[6];
new iAccess;
new iCallback;
new iName[64];
menu_item_getinfo(Menu , item , iAccess , iData , 5 , iName, 63 , iCallback )
switch (str_to_num(iData))
{
case 1 : {
name(id)
}
case 2 : {
menu_destroy(Menu)
}
}
return 0
}
public name(id)
{
new pname[100]
new newname[70]
get_user_info(id, "name", pname, 49)
format(newname, 69, "%s %s %s", PREFIX, pname, SUFIX)
set_user_info(id, "name", newname)
return PLUGIN_CONTINUE
}
__________________