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

[EDIT] my plugin amx_who


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 09-25-2016 , 07:38   [EDIT] my plugin amx_who
Reply With Quote #1

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

#define PLUGIN            "ULTIMATE WHO"
#define VERSION            "1.1"
#define AUTHOR            "Schwarzkopf=D"

#define CharsMax(%1)        sizeof %1 - 1
#define time_shower        1.0

#define GROUPS_NAME 6
#define GROUPS_ACCESS 6

#define motd_msg        "IRAQ MONSTERS Admin's Online"

new color[][] =
{
    
"ba00ff",
    
"ff0000",
    
"ffc000",
    
"0030ff",
    
"80e200",
    
"ff6000",
    
"dd0063"
}

new 
GroupNames[GROUPS_NAME][] = 
{
    
"IM~SuperVisor",
    
"OWNER",
    
"CO-OWNER",
    
"ELDER",
    
"MODERATOR",
    
"ADMINISTRATOR",
    
"HELPER"
}

new 
GroupFlags[GROUPS_ACCESS][] = 
{
    
"abcdefghijklmnopqrstu^",
    
"abcdefghijklmnopqrstu",
    
"abcdeijmu",
    
"bcdeijmu",
    
"bcdeimu",
    
"bceiu",
    
"beiu"
}

new 
GroupFlagsValue[GROUPS_NAME]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
   
    for(new 
p_of_pw p_of_pw GROUPS_NAME p_of_pw++)
        
GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
    
register_clcmd("say""cmdSay")
    
register_clcmd("say_team""cmdSay")
}

public 
cmdSay(id)
{
    new 
say[8]
    
read_args(say7)
     
    if ((
containi(say"/who") != -
    
|| contain(say"/admin") != -
    
|| contain(say"/admins") != -1))
        
who_motd(id)
    
    return 
PLUGIN_CONTINUE
}

who_motd(id)
{
    new 
sPlayers[32], iNumiPlayer
    
new sName[32], sBuffer[1024]
    new 
iLen
    
    iLen 
formatex(sBuffersizeof sBuffer 1"<body bgcolor=#000000><font color=#ffffff><pre>")
   
    
get_players(sPlayersiNum"ch")
   
    for(new 
p_of_pw 0p_of_pw GROUPS_NAME p_of_pw++)
    {   
        
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen"<center><h5><font color=^"#ffffff^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
        
for(new 0iNum a++)
        {   
            
iPlayer sPlayers[a]
         
            if(
get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
            {
                
get_user_name(iPlayersNamesizeof sName 1)
                
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen"<center><font color=^"%s^">%s^n</center></font>"color[p_of_pw], sName)
            }
        }        
    }
    
    
show_motd(idsBuffermotd_msg)
    return 
PLUGIN_CONTINUE

when anyone type in chat /who
the plugin will display team of admins



ok i added a new group color his name
IM~SuperVisor
but i have problem because this group have flags
abcdefghijklmnopqrstu^
when i make compile



well can anyone add the value of the flag
value is number
abcdefghijklmnopqrstu^ = 538968063
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-25-2016 , 07:44   Re: [EDIT] my plugin amx_who
Reply With Quote #2

#define GROUPS_NAME 7
#define GROUPS_ACCESS 7

"abcdefghijklmnopqrstu^^",
__________________

Last edited by Black Rose; 09-25-2016 at 07:45.
Black Rose is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 09-25-2016 , 08:07   Re: [EDIT] my plugin amx_who
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
#define GROUPS_NAME 7
#define GROUPS_ACCESS 7

"abcdefghijklmnopqrstu^^",

work 100% thanks bro
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
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 10:17.


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