Raised This Month: $ Target: $400
 0% 

Prefix+GreenText


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 12-05-2014 , 23:14   Re: Prefix+GreenText
Reply With Quote #1

Why complicates your life?

PHP Code:
#include <amxmodx>
#include <vip>

new szPrefix[] = "[VIP]"// VIP Prefix

public plugin_init() {
    
register_plugin("VIP Prefix""1.0""OnePL");

    
register_message(76"PrefixSay");
}

public 
PrefixSay(msgIdmsgDestmsgEnt) {
    new 
id get_msg_arg_int(1);
    if(!
is_user_connected(id) || !is_user_vip(id)) return 0;

    new 
szTmp[196], szTmp2[196];
    
get_msg_arg_string(2szTmp195);

    
formatex(szPrefix31"^x04%s"szPrefix);

    
/*^x01 - normal color
    ^x03 - team color
    ^x04 - green color*/

    
if(!equal(szTmp"#Cstrike_Chat_All")) {
        
add(szTmp2195szPrefix);
        
add(szTmp2195" ");
        
add(szTmp2195szTmp);
    } else {
        
add(szTmp2195szPrefix);
        
add(szTmp2195"^x03 %s1^x01 :  %s2");
    }
    
set_msg_arg_string(2szTmp2);
    return 
0;

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 12-05-2014 , 23:22   Re: Prefix+GreenText
Reply With Quote #2

Quote:
Originally Posted by OnePL View Post
Why complicates your life?

PHP Code:
#include <amxmodx>
#include <vip>

new szPrefix[] = "[VIP]"// VIP Prefix

public plugin_init() {
    
register_plugin("VIP Prefix""1.0""OnePL");

    
register_message(76"PrefixSay");
}

public 
PrefixSay(msgIdmsgDestmsgEnt) {
    new 
id get_msg_arg_int(1);
    if(!
is_user_connected(id) || !is_user_vip(id)) return 0;

    new 
szTmp[196], szTmp2[196];
    
get_msg_arg_string(2szTmp195);

    
formatex(szPrefix31"^x04%s"szPrefix);

    
/*^x01 - normal color
    ^x03 - team color
    ^x04 - green color*/

    
if(!equal(szTmp"#Cstrike_Chat_All")) {
        
add(szTmp2195szPrefix);
        
add(szTmp2195" ");
        
add(szTmp2195szTmp);
    } else {
        
add(szTmp2195szPrefix);
        
add(szTmp2195"^x03 %s1^x01 :  %s2");
    }
    
set_msg_arg_string(2szTmp2);
    return 
0;

Doesnt work properly.
Syturi0 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 12-05-2014 , 23:26   Re: Prefix+GreenText
Reply With Quote #3

Quote:
Originally Posted by OnePL View Post
Why complicates your life?

PHP Code:
#include <amxmodx>
#include <vip>

new szPrefix[] = "[VIP]"// VIP Prefix

public plugin_init() {
    
register_plugin("VIP Prefix""1.0""OnePL");

    
register_message(76"PrefixSay");
}

public 
PrefixSay(msgIdmsgDestmsgEnt) {
    new 
id get_msg_arg_int(1);
    if(!
is_user_connected(id) || !is_user_vip(id)) return 0;

    new 
szTmp[196], szTmp2[196];
    
get_msg_arg_string(2szTmp195);

    
formatex(szPrefix31"^x04%s"szPrefix);

    
/*^x01 - normal color
    ^x03 - team color
    ^x04 - green color*/

    
if(!equal(szTmp"#Cstrike_Chat_All")) {
        
add(szTmp2195szPrefix);
        
add(szTmp2195" ");
        
add(szTmp2195szTmp);
    } else {
        
add(szTmp2195szPrefix);
        
add(szTmp2195"^x03 %s1^x01 :  %s2");
    }
    
set_msg_arg_string(2szTmp2);
    return 
0;

The [VIP] tag doesnt shows.
And i want it to have this:
PHP Code:
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 
Syturi0 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-06-2014 , 13:34   Re: Prefix+GreenText
Reply With Quote #4

Quote:
Originally Posted by OnePL View Post
Why complicates your life?

PHP Code:
public PrefixSay(msgIdmsgDestid)
{

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



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