I felt confused about my code which highlighted in red color.
As I won't use adminchat.amxx but I still want to use the ADMIN channel function, so I put it in my code, but it seems doesn't work correctly.
If I don't have any flags, I can't see what I said.
But the admin who has chat flags can see.
Code:
public cmdHookSayTeam(id)
{
new iMessages[192];
read_args(iMessages, 191);
remove_quotes(iMessages);
get_user_name(id, iUserName, 31);
if(iMessages[0] != '@')
{
static player;
for(player = 1; player <= gMaxplayers; player++)
{
//...
}
}
else
{
if(get_user_flags(id) & ADMIN_ADMIN)
iTag = "(ADMIN)"
else
iTag = "(PLAYER)"
new iPlayers[32], iNum;
get_players(iPlayers, iNum, "ch");
for(new i = 0; i < iNum; i++)
{
if(get_user_flags(iPlayers[i]) & ADMIN_CHAT)
{
client_color(iPlayers[i], id, "^x04%s ^x03%s ^x01: %s", iTag, iUserName, iMessages[1]);
}
else if(!is_user_admin(iPlayers[i]))
{
client_color(iPlayers[i], id, "^x04%s ^x03%s ^x01: %s", iTag, iUserName, iMessages[1]);
}
}
}
return PLUGIN_HANDLED;
}
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others