Raised This Month: $ Target: $400
 0% 

Print (ADMIN) Message problem.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GarbageBox
Senior Member
Join Date: Feb 2010
Old 07-28-2011 , 07:02   Print (ADMIN) Message problem.
Reply With Quote #1

How can I print the "(ADMIN)" msg to those people who is admin but does not have the i(amx_chat) flags?
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-28-2011 , 09:47   Re: Print (ADMIN) Message problem.
Reply With Quote #2

Edit adminchat.sma . Line 208:

PHP Code:
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag
Add another flag of your choice.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
GarbageBox
Senior Member
Join Date: Feb 2010
Old 07-28-2011 , 10:42   Re: Print (ADMIN) Message problem.
Reply With Quote #3

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?
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-28-2011 , 16:49   Re: Print (ADMIN) Message problem.
Reply With Quote #4

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


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.
__________________
fysiks is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-28-2011 , 21:20   Re: Print (ADMIN) Message problem.
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
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))) 
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 07-28-2011, 21:23
fysiks
This message has been deleted by fysiks. Reason: Oh wait, you are right, gotta think the bit ops through :)
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 00:48.


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