Raised This Month: $ Target: $400
 0% 

[REQ] amx_who


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Baws
Veteran Member
Join Date: Oct 2012
Old 10-01-2013 , 16:43   Re: [REQ] amx_who
Reply With Quote #7

Quote:
Originally Posted by ScrappeR View Post
Can someone edited this script example..

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

thanks its very cool i like it..
You saying changing Owner to ScrappeR and Co-Owner to Flooow? if so then this is the code.

PHP Code:
#include <amxmodx>

new g_groupNames[][] = {
    
"--==ScrappeR==--",
    
"--==Flooow==--",
    
"--==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

__________________
Like my clean plugins and work?
Baws 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