Поиск TEAM tag NICK

Shadowless

Пользователь
Регистрация
24 Фев 2019
Сообщения
237
Симпатии
4
Пол
Мужской
i`m looking for plugin wich will TAG all nick names after "say /alltag"

something like this

#include <amxmodx>
#pragma semicolon 1

// ADMIN LEVEL TO NOT HAVE TAG
// -----------------------------------
#define TAG_ADMIN ADMIN_IMMUNITY
// -----------------------------------

// pCvars
new gEnabled;
new gType;
new gTtag;
new gCTtag;
new gAtag;
new gAdmin;

public plugin_init()
{
register_plugin("Tag Adder", "2.0", "Exolent");
gEnabled = register_cvar("tag_enabled", "1");
gType = register_cvar("tag_type", "1");
gTtag = register_cvar("tag_addon_t", "[T TAG]");
gCTtag = register_cvar("tag_addon_ct", "[CT TAG]");
gAtag = register_cvar("tag_addon_all", "[ALL TAG]");
gAdmin = register_cvar("tag_admin", "1");
}

public client_infochanged(id)
{
if(get_pcvar_num(gEnabled) == 1)
{
new admincvar = get_pcvar_num(gAdmin);
if(admincvar == 1 && !(get_user_flags(id) & TAG_ADMIN) || admincvar != 1)
{
new type = get_pcvar_num(gType);
new name[32];
get_user_info(id, "name", name, 31);
if(type == 1)
{
new string[16];
get_pcvar_string(gAtag, string, 15);
if(containi(name, string) == -1)
{
new newname[48];
formatex(newname, 47, "%s %s", string, name);
set_user_info(id, "name", newname);
}
}
else if(type == 2)
{
new team = get_user_team(id);
new cttag[16], ttag[16];
get_pcvar_string(gCTtag, cttag, 15);
get_pcvar_string(gTtag, ttag, 15);
new bool:changeName = false;
if(team == 1)
{
if(containi(name, cttag) != -1)
{
changeName = true;
replace(name, 31, cttag, ttag);
}
if(containi(name, ttag) == -1)
{
changeName = true;
formatex(name, 31, "%s %s", ttag, name);
}
}
else if(team == 2)
{
if(containi(name, ttag) != -1)
{
changeName = true;
replace(name, 31, ttag, cttag);
}
if(containi(name, cttag) == -1)
{
changeName = true;
formatex(name, 31, "%s %s", cttag, name);
}
}
if(changeName)
{
set_user_info(id, "name", name);
}
}
}
}
}

but its changeing nick after join to team, i want it manualy with cmd "say /alltag"

and after "say /alluntag" back all nicks if it postible
 
Сверху Снизу