I made some changes in this plugin:
PHP Code:
#include <amxmodx>
#include <vip>
//#define ACCESS_FLAG
new channels[8][] =
{
"#Cstrike_Chat_CT",
"#Cstrike_Chat_T",
"#Cstrike_Chat_CT_Dead",
"#Cstrike_Chat_T_Dead",
"#Cstrike_Chat_Spec",
"#Cstrike_Chat_All",
"#Cstrike_Chat_AllDead",
"#Cstrike_Chat_AllSpec"
}
new newChannels[8][] =
{
"(Equipa-Azul) [VIP] %s1: %s2",
"(Equipa-Vermelha) [VIP] %s1: %s2",
"*Morto* (Equipa-Azul) [VIP] %s1: %s2",
"*Morto* (Equipa-Vermelha) [VIP] %s1: %s2",
"(Espectador) [VIP] %s1: %s2",
"[VIP] %s1: %s2",
"*Morto* [VIP] %s1: %s2",
"*Espectador* [VIP] %s1: %s2"
}
// = green
// = yellow
// = team color
new Trie:vipChannels
public plugin_init()
{
register_plugin("VipPrefix", "1.5", "ZETA+Syturio");
vipChannels = TrieCreate();
for (new i = 0; i < 8; i++)
{
TrieSetString(vipChannels, channels[i], newChannels[i]);
}
register_message(get_user_msgid("SayText"), "MessageSayText");
}
public MessageSayText(msgid, msgdest, id)
{
new channel[64];
get_msg_arg_string(2, channel, charsmax(channel));
if(!TrieGetString(vipChannels, channel, channel, charsmax(channel)))
{
return;
}
new sender = get_msg_arg_int(1);
if(sender && is_user_vip(id))
{
set_msg_arg_string(2, channel);
}
}
public plugin_end()
{
TrieDestroy(vipChannels);
}
But it is not working properly.
I can see my tag+greentext but outhers cant, and i also see everyone with it too, even if they aren't '
is_user_vip'...
Can someone help me?