Raised This Month: $51 Target: $400
 12% 

Admin Chat Color


Post New Thread Reply   
 
Thread Tools Display Modes
iNdio
Senior Member
Join Date: Apr 2015
Location: Ro
Old 05-02-2016 , 13:44   Re: Admin Chat Color
Reply With Quote #11

(PLAYER) iNdio: Hi (T)
(PLAYER) iNdio: Hi (CT)
(ADMIN) iNdio: Hi (T)
(ADMIN) iNdio: Hi (CT)
Attached Files
File Type: sma Get Plugin or Get Source (adminchat.sma - 216 views - 11.1 KB)
__________________
Where Cs had no value, amxx, sometimes, had its price...
iNdio is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-02-2016 , 13:56   Re: Admin Chat Color
Reply With Quote #12

Quote:
Originally Posted by ComedyShotsGamer View Post
You cant just help me instead of posting for the above post.
Until you post correctly i won't help (and others shall) , otherwise all threads would have looked like 1 yard long papyrus sheet.

Now i see that you had corrected that post.

So here is plugin how you requested (Attached).

P.S. If you compile locally you shall have colorchat.inc in include folder.. I think you know what i'm talking about...
Attached Files
File Type: sma Get Plugin or Get Source (adminchat.sma - 176 views - 11.0 KB)

Last edited by siriusmd99; 05-02-2016 at 14:09.
siriusmd99 is offline
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 05-03-2016 , 11:59   Re: Admin Chat Color
Reply With Quote #13

iNdio with your Plugin all players can see the Admin Chat...
ComedyShotsGamer is offline
iNdio
Senior Member
Join Date: Apr 2015
Location: Ro
Old 05-03-2016 , 12:50   Re: Admin Chat Color
Reply With Quote #14

My bad
Attached Files
File Type: sma Get Plugin or Get Source (adminchat.sma - 218 views - 11.1 KB)
__________________
Where Cs had no value, amxx, sometimes, had its price...
iNdio is offline
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 05-03-2016 , 13:00   Re: Admin Chat Color
Reply With Quote #15

Only the admin who writes in admin chat can see it
ComedyShotsGamer is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-03-2016 , 16:47   Re: Admin Chat Color
Reply With Quote #16

Quote:
Originally Posted by ComedyShotsGamer View Post
Only the admin who writes in admin chat can see it
Test mine ,which I gave to you, or you are angry on me?
siriusmd99 is offline
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 05-04-2016 , 05:54   Re: Admin Chat Color
Reply With Quote #17

Errors http://prntscr.com/b03bg4
ComedyShotsGamer is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-04-2016 , 08:46   Re: Admin Chat Color
Reply With Quote #18

Quote:
Originally Posted by ComedyShotsGamer View Post
sorry, I searched for default adminchat on internet, give me the original or your sma file and I will add colours as you requested.
siriusmd99 is offline
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 05-04-2016 , 08:55   Re: Admin Chat Color
Reply With Quote #19

PHP Code:
/* AMX Mod X
*   Admin Chat Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE""COL_RED""COL_GREEN""COL_BLUE""COL_YELLOW""COL_MAGENTA""COL_CYAN""COL_ORANGE""COL_OCEAN""COL_MAROON"}
new 
g_Values[MAX_CLR][] = {{255255255}, {25500}, {02550}, {00255}, {2552550}, {2550255}, {0255255}, {227968}, {4589116}, {1034438}}
new 
Float:g_Pos[4][] = {{0.00.0}, {0.050.55}, {-1.00.2}, {-1.00.7}}

new 
amx_show_activity;
new 
g_AdminChatFlag ADMIN_CHAT;

public 
plugin_init()
{
    new 
admin_chat_id

    register_plugin
("Admin Chat"AMXX_VERSION_STR"AMXX Dev Team")
    
register_dictionary("adminchat.txt")
    
register_dictionary("common.txt")
    
register_clcmd("say""cmdSayChat"ADMIN_CHAT"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
    
register_clcmd("say_team""cmdSayAdmin"0"@<text> - displays message to admins")
    
register_concmd("amx_say""cmdSay"ADMIN_CHAT"<message> - sends message to all players")
    
admin_chat_id register_concmd("amx_chat""cmdChat"ADMIN_CHAT"<message> - sends message to admins")
    
register_concmd("amx_psay""cmdPsay"ADMIN_CHAT"<name or #userid> <message> - sends private message")
    
register_concmd("amx_tsay""cmdTsay"ADMIN_CHAT"<color> <message> - sends left side hud message to all players")
    
register_concmd("amx_csay""cmdTsay"ADMIN_CHAT"<color> <message> - sends center hud message to all players")
    
    
amx_show_activity get_cvar_pointer("amx_show_activity");
    
    if (
amx_show_activity == 0)
    {
        
amx_show_activity register_cvar("amx_show_activity""2");
    }

    new 
str[1]
    
get_concmd(admin_chat_idstr0g_AdminChatFlagstr0, -1)
}

public 
cmdSayChat(id)
{
    if (!
access(idg_AdminChatFlag))
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
said[6], 0
    read_argv
(1said5)
    
    while (
said[i] == '@')
    {
        
i++
    }
    
    if (!
|| 3)
    {
        return 
PLUGIN_CONTINUE
    
}
    
    new 
message[192], 0
    read_args
(message191)
    
remove_quotes(message)
    
    switch (
said[i])
    {
        case 
'r'1
        
case 'g'2
        
case 'b'3
        
case 'y'4
        
case 'm'5
        
case 'c'6
        
case 'o'7
    
}
    
    new 
ni
    
if (a)
    {
        
n++
        
s++
    }
    while (
said[s] && isspace(said[s]))
    {
        
n++
        
s++
    }
    

    new 
name[32], authid[32], userid
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^""nameuseridauthidmessage[n])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")"nameuseridauthidmessage[n], "en"g_Colors[a])
    
    if (++
g_msgChannel || g_msgChannel 3)
    {
        
g_msgChannel 3
    
}
    
    new 
Float:verpos g_Pos[i][1] + float(g_msgChannel) / 35.0
    
    set_hudmessage
(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[n])
                        
client_print(plprint_notify"%s :   %s"namemessage[n])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[n])
                        
client_print(plprint_notify"%s"message[n])
                    }
                }
            }
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[n])
            
client_print(0print_notify"%s :   %s"namemessage[n])
        }
        default:
        {
            
show_hudmessage(0"%s"message[n])
            
client_print(0print_notify"%s"message[n])
        }
    }

    return 
PLUGIN_HANDLED
}

public 
cmdSayAdmin(id)
{
    new 
said[2]
    
read_argv(1said1)
    
    if (
said[0] != '@')
        return 
PLUGIN_CONTINUE
    
    
new message[192], name[32], authid[32], userid
    
new players[32], inum
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage[1])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage[1])
    
    if (
is_user_admin(id))
        
format(message191"(%L) %s :  %s"id"ADMIN"namemessage[1])
    else
        
format(message191"(%L) %s :  %s"id"PLAYER"namemessage[1])

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        
// dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing
        
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag)
            
client_print(players[i], print_chat"%s"message)
    }
    
    
client_print(idprint_chat"%s"message)
    
    return 
PLUGIN_HANDLED
}

public 
cmdChat(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new message[192], name[32], players[32], inumauthid[32], userid
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
get_players(playersinum)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage)
    
    
format(message191"(ADMINS) %s :   %s"namemessage)
    
console_print(id"%s"message)
    
    for (new 
0inum; ++i)
    {
        if (
access(players[i], g_AdminChatFlag))
            
client_print(players[i], print_chat"%s"message)
    }
    
    return 
PLUGIN_HANDLED
}

public 
cmdSay(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new message[192], name[32], authid[32], userid
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
client_print(0print_chat"%L"LANG_PLAYER"PRINT_ALL"namemessage)
    
console_print(id"%L"LANG_PLAYER"PRINT_ALL"namemessage)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^""nameuseridauthidmessage)
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")"nameuseridauthidmessage)
    
    return 
PLUGIN_HANDLED
}

public 
cmdPsay(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new name[32]
    
read_argv(1name31)
    new 
priv cmd_target(idname0)

    if (!
priv)
        return 
PLUGIN_HANDLED
    
    
new length strlen(name) + 1

    get_user_name
(privname31); 
    
    new 
message[192], name2[32], authid[32], authid2[32], useriduserid2
    
    get_user_authid
(idauthid31)
    
get_user_name(idname231)
    
userid get_user_userid(id)
    
read_args(message191)
    
    if (
message[0] == '"' && message[length] == '"'// HLSW fix
    
{
        
message[0] = ' '
        
message[length] = ' '
        
length += 2
    
}
    
    
remove_quotes(message[length])
    
get_user_name(privname31)
    
    if (
id && id != priv)
        
client_print(idprint_chat"(%s) %s :   %s"namename2message[length])
    
    
client_print(privprint_chat"(%s) %s :   %s"namename2message[length])
    
console_print(id"(%s) %s :   %s"namename2message[length])
    
get_user_authid(privauthid231)
    
userid2 get_user_userid(priv)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^""name2useridauthidnameuserid2authid2message[length])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")"name2useridauthidnameuserid2authid2message[length])
    
    return 
PLUGIN_HANDLED
}

public 
cmdTsay(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid 0
    
    read_argv
(0cmd15)
    new 
bool:tsay = (tolower(cmd[4]) == 't')
    
    
read_args(message191)
    
remove_quotes(message)
    
parse(messagecolor15)
    
    new 
found 00
    
new lang[3], langnum get_langsnum()

    for (new 
0MAX_CLR; ++i)
    {
        for (new 
0langnumj++)
        {
            
get_lang(jlang)
            
format(color215"%L"langg_Colors[i])
            
            if (
equali(colorcolor2))
            {
                
i
                found 
1
                
break
            }
        }
        if (
found == 1)
            break
    }
    
    new 
length found ? (strlen(color) + 1) : 0
    
    
if (++g_msgChannel || g_msgChannel 3)
        
g_msgChannel 3

    
new Float:verpos = (tsay 0.55 0.1) + float(g_msgChannel) / 35.0
    
    get_user_authid
(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay 0.05 : -1.0verpos06.06.00.50.15, -1)

    switch ( 
get_pcvar_num(amx_show_activity) )
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(pl"%s :   %s"namemessage[length])
                        
client_print(plprint_notify"%s :   %s"namemessage[length])
                    }
                    else
                    {
                        
show_hudmessage(pl"%s"message[length])
                        
client_print(plprint_notify"%s"message[length])
                    }
                }
            }
            
console_print(id"%s :  %s"namemessage[length])
        }
        case 
2:
        {
            
show_hudmessage(0"%s :   %s"namemessage[length])
            
client_print(0print_notify"%s :   %s"namemessage[length])
            
console_print(id"%s :  %s"namemessage[length])
        }
        default:
        {
            
show_hudmessage(0"%s"message[length])
            
client_print(0print_notify"%s"message[length])
            
console_print(id"%s"message[length])
        }
    }

    
log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^""nameuseridauthidcmd[4], message[length])
    
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")"nameuseridauthidcmdmessage[length], color2)

    return 
PLUGIN_HANDLED

ComedyShotsGamer is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-04-2016 , 09:17   Re: Admin Chat Color
Reply With Quote #20

Here is :

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <colorchat>

new g_msgChannel 

#define MAX_CLR 10 

new g_Colors[MAX_CLR][] = {"COL_WHITE""COL_RED""COL_GREEN""COL_BLUE""COL_YELLOW""COL_MAGENTA""COL_CYAN""COL_ORANGE""COL_OCEAN""COL_MAROON"
new 
g_Values[MAX_CLR][] = {{255255255}, {25500}, {02550}, {00255}, {2552550}, {2550255}, {0255255}, {227968}, {4589116}, {1034438}} 
new 
Float:g_Pos[4][] = {{0.00.0}, {0.050.55}, {-1.00.2}, {-1.00.7}} 

new 
amx_show_activity
new 
g_AdminChatFlag ADMIN_CHAT

public 
plugin_init() 

    new 
admin_chat_id 

    register_plugin
("Admin Chat"AMXX_VERSION_STR"AMXX Dev Team"
    
register_dictionary("adminchat.txt"
    
register_dictionary("common.txt"
    
register_clcmd("say""cmdSayChat"ADMIN_CHAT"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message"
    
register_clcmd("say_team""cmdSayAdmin"0"@<text> - displays message to admins"
    
register_concmd("amx_say""cmdSay"ADMIN_CHAT"<message> - sends message to all players"
    
admin_chat_id register_concmd("amx_chat""cmdChat"ADMIN_CHAT"<message> - sends message to admins"
    
register_concmd("amx_psay""cmdPsay"ADMIN_CHAT"<name or #userid> <message> - sends private message"
    
register_concmd("amx_tsay""cmdTsay"ADMIN_CHAT"<color> <message> - sends left side hud message to all players"
    
register_concmd("amx_csay""cmdTsay"ADMIN_CHAT"<color> <message> - sends center hud message to all players"
     
    
amx_show_activity get_cvar_pointer("amx_show_activity"); 
     
    if (
amx_show_activity == 0
    { 
        
amx_show_activity register_cvar("amx_show_activity""2"); 
    } 

    new 
str[1
    
get_concmd(admin_chat_idstr0g_AdminChatFlagstr0, -1


public 
cmdSayChat(id

    if (!
access(idg_AdminChatFlag)) 
    { 
        return 
PLUGIN_CONTINUE 
    

     
    new 
said[6], 
    read_argv
(1said5
     
    while (
said[i] == '@'
    { 
        
i++ 
    } 
     
    if (!
|| 3
    { 
        return 
PLUGIN_CONTINUE 
    

     
    new 
message[192], 
    read_args
(message191
    
remove_quotes(message
     
    switch (
said[i]) 
    { 
        case 
'r'
        
case 'g'
        
case 'b'
        
case 'y'
        
case 'm'
        
case 'c'
        
case 'o'
    

     
    new 
n
    
if (a
    { 
        
n++ 
        
s++ 
    } 
    while (
said[s] && isspace(said[s])) 
    { 
        
n++ 
        
s++ 
    } 
     

    new 
name[32], authid[32], userid 
     
    get_user_authid
(idauthid31
    
get_user_name(idname31
    
userid get_user_userid(id
     
    
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^""nameuseridauthidmessage[n]) 
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")"nameuseridauthidmessage[n], "en"g_Colors[a]) 
     
    if (++
g_msgChannel || g_msgChannel 3
    { 
        
g_msgChannel 
    

     
    new 
Float:verpos g_Pos[i][1] + float(g_msgChannel) / 35.0 
     
    set_hudmessage
(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos06.06.00.50.15, -1

    switch ( 
get_pcvar_num(amx_show_activity) ) 
    { 
        case 
34
        { 
            new 
maxpl get_maxplayers(); 
            for (new 
pl 1pl <= maxplpl++) 
            { 
                if (
is_user_connected(pl) && !is_user_bot(pl)) 
                { 
                    if (
is_user_admin(pl)) 
                    { 
                        
show_hudmessage(pl"%s :   %s"namemessage[n]) 
                        
client_print(plprint_notify"%s :   %s"namemessage[n]) 
                    } 
                    else 
                    { 
                        
show_hudmessage(pl"%s"message[n]) 
                        
client_print(plprint_notify"%s"message[n]) 
                    } 
                } 
            } 
        } 
        case 
2
        { 
            
show_hudmessage(0"%s :   %s"namemessage[n]) 
            
client_print(0print_notify"%s :   %s"namemessage[n]) 
        } 
        default: 
        { 
            
show_hudmessage(0"%s"message[n]) 
            
client_print(0print_notify"%s"message[n]) 
        } 
    } 

    return 
PLUGIN_HANDLED 


public 
cmdSayAdmin(id

    new 
said[2
    
read_argv(1said1
     
    if (
said[0] != '@'
        return 
PLUGIN_CONTINUE 
     
    
new message[192], name[32], authid[32], userid 
    
new players[32], inum 
     
    read_args
(message191
    
remove_quotes(message
    
get_user_authid(idauthid31
    
get_user_name(idname31
    
userid get_user_userid(id
     
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage[1]) 
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage[1]) 
     
    
format(messagecharsmax(message), "(^4%L^3) ^4%s ^1:  %s"idis_user_admin(id) ? "ADMIN" "PLAYER"namemessage[1])

    
get_players(playersinum
     
    for (new 
0inum; ++i
    { 
        
// dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing 
        
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag
            
ColorChat(players[i], TEAM_COLOR"%s"message)            
    } 
     
    
ColorChat(idTEAM_COLOR"%s"message)
     
    return 
PLUGIN_HANDLED 


public 
cmdChat(idlevelcid

    if (!
cmd_access(idlevelcid2)) 
        return 
PLUGIN_HANDLED 

    
new message[192], name[32], players[32], inumauthid[32], userid 
     
    read_args
(message191
    
remove_quotes(message
    
get_user_authid(idauthid31
    
get_user_name(idname31
    
userid get_user_userid(id
    
get_players(playersinum
     
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage
     
    
format(message191"(ADMINS) %s :   %s"namemessage
    
console_print(id"%s"message
     
    for (new 
0inum; ++i
    { 
        if (
access(players[i], g_AdminChatFlag)) 
            
client_print(players[i], print_chat"%s"message
    } 
     
    return 
PLUGIN_HANDLED 


public 
cmdSay(idlevelcid

    if (!
cmd_access(idlevelcid2)) 
        return 
PLUGIN_HANDLED 

    
new message[192], name[32], authid[32], userid 
     
    read_args
(message191
    
remove_quotes(message
    
get_user_authid(idauthid31
    
get_user_name(idname31
    
userid get_user_userid(id
    
client_print(0print_chat"%L"LANG_PLAYER"PRINT_ALL"namemessage
    
console_print(id"%L"LANG_PLAYER"PRINT_ALL"namemessage
     
    
log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^""nameuseridauthidmessage
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")"nameuseridauthidmessage
     
    return 
PLUGIN_HANDLED 


public 
cmdPsay(idlevelcid

    if (!
cmd_access(idlevelcid3)) 
        return 
PLUGIN_HANDLED 
     
    
new name[32
    
read_argv(1name31
    new 
priv cmd_target(idname0

    if (!
priv
        return 
PLUGIN_HANDLED 
     
    
new length strlen(name) + 

    get_user_name
(privname31);  
     
    new 
message[192], name2[32], authid[32], authid2[32], useriduserid2 
     
    get_user_authid
(idauthid31
    
get_user_name(idname231
    
userid get_user_userid(id
    
read_args(message191
     
    if (
message[0] == '"' && message[length] == '"'// HLSW fix 
    

        
message[0] = ' ' 
        
message[length] = ' ' 
        
length += 
    

     
    
remove_quotes(message[length]) 
    
get_user_name(privname31
     
    if (
id && id != priv
        
client_print(idprint_chat"(%s) %s :   %s"namename2message[length]) 
     
    
client_print(privprint_chat"(%s) %s :   %s"namename2message[length]) 
    
console_print(id"(%s) %s :   %s"namename2message[length]) 
    
get_user_authid(privauthid231
    
userid2 get_user_userid(priv
     
    
log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^""name2useridauthidnameuserid2authid2message[length]) 
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")"name2useridauthidnameuserid2authid2message[length]) 
     
    return 
PLUGIN_HANDLED 


public 
cmdTsay(idlevelcid

    if (!
cmd_access(idlevelcid3)) 
        return 
PLUGIN_HANDLED 
     
    
new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid 
     
    read_argv
(0cmd15
    new 
bool:tsay = (tolower(cmd[4]) == 't'
     
    
read_args(message191
    
remove_quotes(message
    
parse(messagecolor15
     
    new 
found 0
    
new lang[3], langnum get_langsnum() 

    for (new 
0MAX_CLR; ++i
    { 
        for (new 
0langnumj++) 
        { 
            
get_lang(jlang
            
format(color215"%L"langg_Colors[i]) 
             
            if (
equali(colorcolor2)) 
            { 
                

                found 

                
break 
            } 
        } 
        if (
found == 1
            break 
    } 
     
    new 
length found ? (strlen(color) + 1) : 
     
    
if (++g_msgChannel || g_msgChannel 3
        
g_msgChannel 

    
new Float:verpos = (tsay 0.55 0.1) + float(g_msgChannel) / 35.0 
     
    get_user_authid
(idauthid31
    
get_user_name(idname31
    
userid get_user_userid(id
    
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay 0.05 : -1.0verpos06.06.00.50.15, -1

    switch ( 
get_pcvar_num(amx_show_activity) ) 
    { 
        case 
34
        { 
            new 
maxpl get_maxplayers(); 
            for (new 
pl 1pl <= maxplpl++) 
            { 
                if (
is_user_connected(pl) && !is_user_bot(pl)) 
                { 
                    if (
is_user_admin(pl)) 
                    { 
                        
show_hudmessage(pl"%s :   %s"namemessage[length]) 
                        
client_print(plprint_notify"%s :   %s"namemessage[length]) 
                    } 
                    else 
                    { 
                        
show_hudmessage(pl"%s"message[length]) 
                        
client_print(plprint_notify"%s"message[length]) 
                    } 
                } 
            } 
            
console_print(id"%s :  %s"namemessage[length]) 
        } 
        case 
2
        { 
            
show_hudmessage(0"%s :   %s"namemessage[length]) 
            
client_print(0print_notify"%s :   %s"namemessage[length]) 
            
console_print(id"%s :  %s"namemessage[length]) 
        } 
        default: 
        { 
            
show_hudmessage(0"%s"message[length]) 
            
client_print(0print_notify"%s"message[length]) 
            
console_print(id"%s"message[length]) 
        } 
    } 

    
log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^""nameuseridauthidcmd[4], message[length]) 
    
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")"nameuseridauthidcmdmessage[length], color2

    return 
PLUGIN_HANDLED 

siriusmd99 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 12:38.


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