Raised This Month: $32 Target: $400
 8% 

Solved Coloured message


Post New Thread Reply   
 
Thread Tools Display Modes
sanimare
Senior Member
Join Date: Sep 2010
Old 03-06-2018 , 14:06   Re: Coloured message
Reply With Quote #11

Quote:
Originally Posted by instinctpt1 View Post
Try :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#if AMXX_VERSION_NUM < 183
    #include <chatcolor>
#endif

#define PLUGIN        "TagMe" 
#define VERSION        "2.0" 
#define AUTHOR        "ZOF'X" 

#define cm(%1)        (sizeof(%1)-1) 

new pCvar_Tag

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR); 
     
    
pCvar_Tag register_cvar("amx_sv_tag"" TAG | "); 
             

    
register_clcmd("say_team /tagme""cmdTagMe"ADMIN_BAN);
    
register_clcmd("say /tagme""cmdTagMe"ADMIN_BAN);
    
register_clcmd("say_team /untag""cmdunTag");
    
register_clcmd("say /untag""cmdunTag");
            


public 
cmdTagMe(idlvlcid
{
    if(!
cmd_access(id,lvl,cid0))
        return 
PLUGIN_HANDLED

    
new szArg[192]; 
    
read_args(szArgcharsmax(szArg)); 
    
remove_quotes(szArg); 
     
    static 
szName[33], szTag[16]; 
     
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
     
    if(
containi(szNameszTag) != -1
    {
        
client_print_color(id0"^3[AMXX TAG] ^4You already Have the Tag !");
        return 
PLUGIN_CONTINUE;
    } 
   
    
format(szNamecm(szName), "%s %s"szTagszName); 
    
set_user_info(id"name"szName);
    
client_print_color(id0"^3[AMXX TAG] ^4You are now having the Tag !");
    
    return(
szArg[0] == '/'); 


public 
cmdunTag(id

    static 
szName[33], szTag[16]; 
     
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
  
   
    
replace_allszNamecm(szName), szTag"" ); 
    
set_user_infoid"name"szName ); 
    
client_print_color(id0"^3[AMXX TAG ] ^4You have now removed the Tag !");
    
    return 
PLUGIN_CONTINUE

It workout
Is this good modified for 1.8.2 + check for 2 flags "t" and "d"
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN        "TagMe" 
#define VERSION        "2.0" 
#define AUTHOR        "ZOF'X" 

#define cm(%1)        (sizeof(%1)-1) 

new pCvar_Tag

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR); 
     
    
pCvar_Tag register_cvar("amx_sv_tag"" TAG | "); 
             

    
register_clcmd("say_team /tagme""cmdTagMe"ADMIN_BAN ADMIN_LEVEL_H);
    
register_clcmd("say /tagme""cmdTagMe"ADMIN_BAN ADMIN_LEVEL_H);
    
register_clcmd("say_team /untag""cmdunTag");
    
register_clcmd("say /untag""cmdunTag");
            


public 
cmdTagMe(idlvlcid
{
    if(!
cmd_access(id,lvl,cid0))
        return 
PLUGIN_HANDLED

    
new szArg[192]; 
    
read_args(szArgcharsmax(szArg)); 
    
remove_quotes(szArg); 
     
    static 
szName[33], szTag[16]; 
     
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
     
    if(
containi(szNameszTag) != -1
    {
        
ColorChat(idGREEN"^3[AMXX TAG] ^4You already Have the Tag !");
        return 
PLUGIN_CONTINUE;
    } 
   
    
format(szNamecm(szName), "%s %s"szTagszName); 
    
set_user_info(id"name"szName);
    
ColorChat(idGREEN"^3[AMXX TAG] ^4You are now having the Tag !");
    
    return(
szArg[0] == '/'); 


public 
cmdunTag(id

    static 
szName[33], szTag[16]; 
     
    
get_user_name(idszNamecm(szName)); 
    
get_pcvar_string(pCvar_TagszTagcm(szTag)); 
  
   
    
replace_allszNamecm(szName), szTag"" ); 
    
set_user_infoid"name"szName ); 
    
ColorChat(idGREEN"^3[AMXX TAG ] ^4You have now removed the Tag !");
    
    return 
PLUGIN_CONTINUE

I was thinking this plugin is working like /tagme clan1name
for example you can type /tagme clan2name and it only for admin can be used for few of them which i add in .sma
Thank's alot
sanimare is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 03-06-2018 , 14:41   Re: Coloured message
Reply With Quote #12

So you want Normal Players to use ClanName1
And Admins to use ClanName2
Right ?
instinctpt1 is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 03-06-2018 , 15:08   Re: Coloured message
Reply With Quote #13

Just admins can use TAG| before real nick, if someone join or something his nick will be auto changed if he do more changes to nick on server in console without /tagme command or being admin flag for doing that he will get kicked with message so if no admin on server his nick would be controled by server side.
And if you can make /tagme clan1 or /tagme clan2 so player can choose which tag in nickname he can have it would be great.

+ If admin say /tagmeprefix he will have added prefix to his name like:
ADMIN| NICK
this "ADMIN| " would be Green or what colors i choose.
This ADMIN| i will replace with tag name
sanimare is offline
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 16:19.


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