hi guys how to use ColorChat here
PHP Code:
public cmdSayAdmin(id)
{
new said[2]
read_argv(1, said, 1)
if (said[0] != '@')
return PLUGIN_CONTINUE
new message[192], name[32], authid[32]
new players[32], inum
read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
if(get_user_flags(id) & ADMIN_CHAT)
format(message, 191, "[* ADMINS *] %s: %s", name, message[1])
else
format(message, 191, "[* PLAYER *] %s: %s", name, message[1])
get_players(players, inum)
for (new i = 0; i < inum; ++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(id, print_chat, "%s", message)
return PLUGIN_HANDLED
}
here
PHP Code:
if(get_user_flags(id) & ADMIN_CHAT)
format(message, 191, "[* ADMINS *] %s: %s", name, message[1])
else
format(message, 191, "[* PLAYER *] %s: %s", name, message[1])
i wrote
PHP Code:
if(get_user_flags(id) & ADMIN_CHAT)
ColorChat(message, GREY, 191, "^4[* ADMINS *] %s: %s", name, message[1])
else
ColorChat(message, GREY, 191, "^4[* PLAYER *] %s: %s", name, message[1])
Example:
[* ADMINS *] arvEL.-: Hi all
[* *] = Yellow color
ADMINS = Green color
arvEL.- = Grey color
Hi all = Yellow color
^1[*^4 ADMINS ^1*]^3 %s^1: %s
i hope you understand my meaning
but i have problem with compile :/
help me plz