Raised This Month: $ Target: $400
 0% 

[HELP] Allchat + Admin Chat Tag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nikotinas
New Member
Join Date: Mar 2014
Old 03-28-2014 , 16:32   [HELP] Allchat + Admin Chat Tag
Reply With Quote #1

Hey, i'm having a problem. When I'm using Allchat and Admin Chat Tag plugins it doesn't work properly. When i'm dead, Admin Chat Tag plugin doesn't write tags. I have code, where these plugin are connected, but still doesn't work. Code :
PHP Code:
 #include <amxmodx>

#define FLAG ADMIN_RESERVATION
#define VERSION "1.1"

new COLCHAR[3][2] = { "^x03"/*team col*/"^x04"/*green*/"^x01"/*white*/ }

new const 
AdminsDatas[][] =  

    {
"Owner"ADMIN_RCON},
    {
"Manager"ADMIN_RESERVATION},
    {
"SAdmin"ADMIN_IMMUNITY},
    {
"Admin"ADMIN_BAN},
    {
"VIP"ADMIN_LEVEL_H}
};

//cvar pointers
new p_allchatp_namecolp_msgcolp_alltalkp_hidestatp_teamchat

//vars to check if message has already been duplicated
new alv_sndralv_str2[26], alv_str4[101]
new 
msg[200];

public 
plugin_init( )
{
    
register_plugin("All Chat",VERSION,"Ian Cammarata And ConnorMcLeod")
    
register_cvar("allchat_version",VERSION,FCVAR_SERVER)
    
    
p_allchat register_cvar"sv_allchat""1" )
    
p_namecol register_cvar"ac_namecolor""0" )
    
p_msgcol register_cvar"ac_msgcolor""2" )
    
p_hidestat register_cvar"ac_hidestatus""0" )
    
p_teamchat register_cvar"ac_teamchat""1" )
    
    
p_alltalk get_cvar_pointer"sv_alltalk" )
    
    
register_messageget_user_msgid("SayText"), "col_changer" )
    return 
PLUGIN_CONTINUE
}

public 
col_changermsg_idmsg_destrcvr )
{
    new 
str2[26]
    
get_msg_arg_string2str225 )
    if( 
equalstr2"#Cstrike_Chat"13 ) )
    {
        new 
str3[22]
        
get_msg_arg_string3str321 )
        
        if( !
strlenstr3 ) )
        {
            new 
str4[101]
            
get_msg_arg_string4str4100 )
            new 
sndr get_msg_arg_int)
            
            new 
bool:is_team_msg = !bool:equalstr2"#Cstrike_Chat_All"17 )
            
            new 
sndr_team get_user_teamsndr )
            new 
bool:is_sndr_spec = !bool:( sndr_team )
            
            new 
namecol clampget_pcvar_num(p_namecol), 0)
            new 
msgcol clampget_pcvar_num(p_msgcol), 0)
            
            new 
bool:same_as_last bool:( alv_sndr == sndr && equalalv_str2str2 ) && equalalv_str4str4) )
            
            if( !
same_as_last )
            {
//Duplicate message once
                
new allchat clampget_pcvar_nump_allchat ), 0)
                if( 
allchat == || ( allchat == && clampget_pcvar_nump_alltalk ), 0) == ) )
                {
                    if( !( 
is_team_msg && ( is_sndr_spec || is_team_msg && get_pcvar_nump_teamchat ) == ) ) )
                    {
//Don't duplicate if it's a spectator team message
                        
new flags[5], team[10]
                        if( 
is_user_alivesndr ) ) flags "bch"
                        
else flags "ach"
                        
                        
if( is_team_msg )
                        {
                            
addflags[strlenflags )], 4"e" )
                            if( 
sndr_team == team "TERRORIST"
                            
else team "CT"
                        
}
                        
                        new 
players[32], num
                        get_players
playersnumflagsteam )

                        
/* if( get_user_flags( sndr ) & FLAG )
                            buildmsg( sndr, is_sndr_spec, is_team_msg, sndr_team, namecol, msgcol, str4 ) //admin colored, by cvars
                        else */ 
                        
buildmsgsndris_sndr_specis_team_msgsndr_team02str4 //normal colors
                        
                        
for( new i=0numi++ )
                        {
                            
message_beginMSG_ONEget_user_msgid"SayText" ), _players[i] )
                            
write_bytesndr )
                            
write_stringmsg )
                            
message_end()
                        }
                        
                    }
    
                    
alv_sndr sndr
                    alv_str2 
str2
                    alv_str4 
str4
                    
                    
if(task_exists(411))
                        
remove_task(411)
                    
                    
set_task0.1"task_clear_antiloop_vars"411 )
                }
            }
            
            if( 
get_user_flagssndr ) & FLAG && ( namecol != || msgcol != ) )
            {
//execute if sndr is admin and cols are not set to engine defaults
                
if( !same_as_last buildmsgsndris_sndr_specis_team_msgsndr_teamnamecolmsgcolstr4 )

                
set_msg_arg_string2msg )
                
set_msg_arg_string4"" )
            }
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
buildmsgsndris_sndr_specis_team_msgsndr_teamnamecolmsgcolstr4[ ] )
{
    new 
sndr_name[33]
    
get_user_namesndrsndr_name32 )
    
    new 
prefix[30] = "^x01"
    
if( get_pcvar_nump_hidestat ) == )
    {
        if( 
is_sndr_spec prefix "^x01*SPEC* "
        
else if( !is_user_alivesndr ) ) prefix "^x01*DEAD* "
    
}
    
    if(
is_user_connected(sndr))
    {
        new 
flags get_user_flags(sndr); 
        for(new 
isizeof(AdminsDatas); i++) 
        {
            if(
flags AdminsDatas[i][1])
            { 
                new 
szMsg[64];
                
format(szMsgsizeof(szMsg)-1"^4[%s] "AdminsDatas[i][0])
                
add(prefix[strlen(prefix)-1], 29szMsg);
                break; 
            } 
        } 
    }
    
    if( 
is_team_msg )
    {
        if( 
is_sndr_spec prefix "^x01(Spectator) "
        
else if( sndr_team == addprefix[strlen(prefix)-1], 29"(Terrorist) " )
        else if( 
sndr_team == addprefix[strlen(prefix)-1], 29"(Counter-Terrorist) " )
    }
    
    
formatmsg199"%s%s%s :  %s%s"strlenprefix ) > prefix ""COLCHAR[namecol], sndr_nameCOLCHAR[msgcol], str4 )
    return 
PLUGIN_HANDLED
}

public 
task_clear_antiloop_vars( )
{
    
alv_sndr 0
    alv_str2 
""
    
alv_str4 ""
    
return PLUGIN_HANDLED

Sorry for my english, it's so poor as my coding skills.
Thanks for help!
nikotinas is offline
bhatti_rulez_
Member
Join Date: Mar 2014
Old 03-28-2014 , 18:05   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #2

Mate first this the thing you try to making is PRivate plugin made by my friend you can buy from me what price
it will has
any tag you want to put with person name
and you will Have any colour multi colour tag you want and colour and city and country will be in it

Last edited by bhatti_rulez_; 03-28-2014 at 18:10.
bhatti_rulez_ is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-28-2014 , 18:10   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #3

Use admin prefixes or iChat?
__________________
Like my clean plugins and work?
Baws is offline
bhatti_rulez_
Member
Join Date: Mar 2014
Old 03-28-2014 , 18:40   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #4

Quote:
Originally Posted by baws View Post
Use admin prefixes or iChat?
mate but he need tag system and thats paid with colour
bhatti_rulez_ is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-28-2014 , 18:55   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #5

Quote:
Originally Posted by bhatti_rulez_ View Post
mate but he need tag system and thats paid with colour
Shut up.

Quote:
Originally Posted by nikotinas View Post
Text...
You could check my plugin suite and see if it fits your demands.
By a coincidence I'm working on a tag plugin right now that will have prefix and postfix tags by SteamID, admin flags and API + functions for simple integration with XP mods and similar. Will drop it tomorrow, at latest. Should work with most chat plugins as well as mine.
https://forums.alliedmods.net/showthread.php?t=236576
__________________

Last edited by Black Rose; 03-28-2014 at 19:07.
Black Rose is offline
bhatti_rulez_
Member
Join Date: Mar 2014
Old 03-28-2014 , 20:54   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #6

Quote:
Originally Posted by Black Rose View Post
Shut up.


You could check my plugin suite and see if it fits your demands.
By a coincidence I'm working on a tag plugin right now that will have prefix and postfix tags by SteamID, admin flags and API + functions for simple integration with XP mods and similar. Will drop it tomorrow, at latest. Should work with most chat plugins as well as mine.
https://forums.alliedmods.net/showthread.php?t=236576
but this does not have the tag in my plugin you can set any tag you want
bhatti_rulez_ is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-28-2014 , 20:56   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #7

Quote:
Originally Posted by bhatti_rulez_ View Post
but this does not have the tag in my plugin you can set any tag you want
I'm working on it now. Will be out tomorrow, highly customizable with API and shiznit.
I dropped an example image where you can see it in action.
__________________

Last edited by Black Rose; 03-28-2014 at 20:57.
Black Rose is offline
bhatti_rulez_
Member
Join Date: Mar 2014
Old 03-28-2014 , 21:26   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #8

Black Rose
can you pls check my Post pls
https://forums.alliedmods.net/showthread.php?t=237731
bhatti_rulez_ is offline
nikotinas
New Member
Join Date: Mar 2014
Old 03-29-2014 , 05:29   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #9

Quote:
Originally Posted by baws View Post
Use admin prefixes or iChat?
I just want simple plugin, your listed plugins is too hardcore for me.
I will try black rose plugin, see if it works
nikotinas is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-29-2014 , 11:48   Re: [HELP] Allchat + Admin Chat Tag
Reply With Quote #10

Then black rose's seems the right one for you i believe.
__________________
Like my clean plugins and work?
Baws 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 06:01.


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