Raised This Month: $ Target: $400
 0% 

[REQ] amx_who


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ScrappeR
Senior Member
Join Date: Dec 2010
Old 05-25-2013 , 16:23   [REQ] amx_who
Reply With Quote #1

PHP Code:
#include <amxmodx>

new g_groupNames[][] = {
    
"--==Owner==--",
    
"--==Co-Owner==--",
    
"--==Moderator==--",
    
"--==Admin==--",
    
"--==Slot==--"
}

new 
g_groupFlags[sizeof(g_groupNames)][] = {
    
"abcdefghijklmnopqrstu",
    
"abcdefghijkmnopqrstu",
    
"abcdefgijmnopqrstu",
    
"bcefgijmnopqrstu",
    
"abi"
}
new 
g_groupFlagsValue[sizeof(g_groupFlags)]

public 
plugin_init()
{
    
register_plugin("Amx_Who""1.0""Author")
    
register_concmd("amx_who""cmdWho"0)
    
    for(new 
0sizeof(g_groupNames); i++)
    {
        
g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
    }
}

public 
cmdWho(id)
{
    new 
hostname[64]
    
get_cvar_string("hostname"hostname63)
    
console_print(id"===%s==="hostname)
    
    new 
iPlayers[32], iNumPlayersiPlayer
    
new iPlayerFlags[33], iAdminCountiFlags
    get_players
(iPlayersiNumPlayers)
    
    for( new 
0iNumPlayersi++ )
    {
        
iPlayer iPlayers[i]
        
iFlags=get_user_flags(iPlayer)
        if( 
iFlags>&& !(iFlags&ADMIN_USER) ) // is_user_admin()
        
{
            
iPlayerFlags[iPlayer] = iFlags
            iPlayers
[iAdminCount] = iPlayer
            iAdminCount
++
        }
    }

    
iFlags get_user_flags(id)
    if( 
iFlags ADMIN_USER || iFlags == 0)
    {
        
console_print(id"Admins: %d"iAdminCount)
    }
    else
    {
        new 
szName[32], ij
        
for(0sizeof(g_groupNames); i++)
        {
            
console_print(id"%s"g_groupNames[i])
            for(
0iAdminCountj++)
            {
                
iPlayer iPlayers[j]
                if(
iPlayerFlags[iPlayer] == g_groupFlagsValue[i])
                {
                    
get_user_name(iPlayerszName31)
                    
console_print(id"%s"szName)
                }
            }
        }
    }
    
console_print(id"===%s==="hostname)

    return 
PLUGIN_HANDLED

Can someone edited this script example..

--==Owner==--
ScrappeR, Acces: abcdefghijklmnopqrstu
--==Co-Owner==--
Flooow, Acces: abcdefghijkmnopqrstu

thanks its very cool i like it..
__________________

Last edited by ScrappeR; 05-27-2013 at 13:29.
ScrappeR is offline
 



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 16:21.


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