Raised This Month: $ Target: $400
 0% 

Prefix+GreenText


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 12-05-2014 , 15:31   Prefix+GreenText
Reply With Quote #1

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 
08i++)
    {
        
TrieSetString(vipChannelschannels[i], newChannels[i]);
    }
    
    
register_message(get_user_msgid("SayText"), "MessageSayText");
}

public 
MessageSayText(msgidmsgdestid)
{
    new 
channel[64];
    
get_msg_arg_string(2channelcharsmax(channel));
    
    if(!
TrieGetString(vipChannelschannelchannelcharsmax(channel)))
    {
        return;
    }

    new 
sender get_msg_arg_int(1);

    if(
sender && is_user_vip(id))
    {
        
set_msg_arg_string(2channel);
    }
}

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?
Attached Files
File Type: inc vip.inc (1.3 KB, 100 views)

Last edited by Syturi0; 12-05-2014 at 15:32.
Syturi0 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode