Участник
Пользователь
- Сообщения
- 256
- Реакции
- 12
I have a below plugin which adds our community tag inside server. Where do I need to make changes in plugin where it ADDs the TAG only in Scoreboard & Not in Normal Chat. Can someone please help me
Код:
#include <amxmodx>
#include <amxmisc>
#define TagUpAdmin
#define TAG "]|-ABCD-| "
public plugin_init()
{
register_plugin("TAG ME", "1.0", "DiGiTaL")
register_clcmd("say /tag", "tagUser")
register_clcmd("say /untag", "untagUser")
}
#if defined TagUpAdmin
public client_putinserver(id)
if(is_user_admin(id)) tagUser(id)
public client_infochanged(id)
if(is_user_admin(id) && is_user_alive(id)) set_task(1.5, "tagUser", id)
#endif
public tagUser(id)
{
new szName[32], tagged[32]
get_user_name(id, szName, charsmax(szName))
if(containi(szName, TAG) != -1) return PLUGIN_CONTINUE
formatex(tagged, charsmax(tagged), "%s %s", TAG, szName)
set_user_info(id, "name", tagged)
return PLUGIN_HANDLED
}
public untagUser(id)
{
new szName[32]
get_user_name(id, szName, charsmax(szName))
if(containi(szName, TAG) != -1) {
#if AMXX_VERSION_NUM < 183
replace_all(szName, charsmax(szName), TAG, "")
#else
replace_string(szName, charsmax(szName), TAG, "", true)
#endif
set_user_info(id, "name", szName)
}
}