AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Print (ADMIN) Message problem. (https://forums.alliedmods.net/showthread.php?t=163246)

GarbageBox 07-28-2011 07:02

Print (ADMIN) Message problem.
 
How can I print the "(ADMIN)" msg to those people who is admin but does not have the i(amx_chat) flags?

hornet 07-28-2011 09:47

Re: Print (ADMIN) Message problem.
 
Edit adminchat.sma . Line 208:

PHP Code:

if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag

Add another flag of your choice.

GarbageBox 07-28-2011 10:42

Re: Print (ADMIN) Message problem.
 
I know that but I want to show the admin message to other else player or admin who have a specific flag but doesn't have the admin_chat flag.
Code:

        new iPlayers[32], iNum, i, tempid;
        get_players(iPlayers , iNum , "ch");
       
        for(i = 0; i < iNum; i++)
        {
                tempid = iPlayers[i]
               
                if(get_user_flags(tempid) & ADMIN_LEVEL_E)
                        format(szMessages, sizeof(szMessages) - 1, "^x04%s ^x03%s ^x01: %s", szTag, szName, szMessages[1]);
        }

Does it correct?

fysiks 07-28-2011 16:49

Re: Print (ADMIN) Message problem.
 
PHP Code:

if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag

:arrow:

PHP Code:

if (players[i] != id && (get_user_flags(players[i]) & g_AdminChatFlag || get_user_flags(players[i]) & ADMIN_LEVEL_E)) 

Note that it is not optimized.

Exolent[jNr] 07-28-2011 21:20

Re: Print (ADMIN) Message problem.
 
Quote:

Originally Posted by fysiks (Post 1520602)
PHP Code:

if (players[i] != id && (get_user_flags(players[i]) & g_AdminChatFlag || get_user_flags(players[i]) & ADMIN_LEVEL_E)) 

Note that it is not optimized.

PHP Code:

if (players[i] != id && (get_user_flags(players[i]) & (g_AdminChatFlag ADMIN_LEVEL_E))) 



All times are GMT -4. The time now is 00:48.

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