This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[REQ] amx_who


Post New Thread Reply   
 
Thread Tools Display Modes
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
Old 05-26-2013, 11:23
ScrappeR
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Old 05-26-2013, 11:52
Smatify
This message has been deleted by Smatify.
Old 05-29-2013, 15:36
ScrappeR
This message has been deleted by ConnorMcLeod. Reason: Read rules https://forums.alliedmods.net/misc.php?do=showrules
bat
Veteran Member
Join Date: Jul 2012
Old 07-18-2013 , 02:46   Re: [REQ] amx_who
Reply With Quote #2

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 i = 0; i < sizeof(g_groupNames); i++)
    {
        g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
    }
}

public cmdWho(id)
{
    new hostname[64]
    get_cvar_string("hostname", hostname, 63)
    console_print(id, "===%s===", hostname)
    
    new iPlayers[32], iNumPlayers, iPlayer
    new iPlayerFlags[33], iAdminCount, iFlags
    get_players(iPlayers, iNumPlayers)
    
    for( new i = 0; i < iNumPlayers; i++ )
    {
        iPlayer = iPlayers[i]
        iFlags=get_user_flags(iPlayer)
        if( iFlags>0 && !(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], i, j
        for(i = 0; i < sizeof(g_groupNames); i++)
        {
            console_print(id, "%s - %s", g_groupNames[i], iFlags)
            for(j = 0; j < iAdminCount; j++)
            {
                iPlayer = iPlayers[j]
                if(iPlayerFlags[iPlayer] == g_groupFlagsValue[i])
                {
                    get_user_name(iPlayer, szName, 31)
                    console_print(id, "%s", szName)
                }
            }
        }
    }
    console_print(id, "===%s===", hostname)

    return PLUGIN_HANDLED
}
bat is offline
Send a message via Skype™ to bat
ScrappeR
Senior Member
Join Date: Dec 2010
Old 10-01-2013 , 14:18   Re: [REQ] amx_who
Reply With Quote #3

Not work?
__________________
ScrappeR is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 10-01-2013 , 16:43   Re: [REQ] amx_who
Reply With Quote #4

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
ScrappeR
Senior Member
Join Date: Dec 2010
Old 10-01-2013 , 18:14   Re: [REQ] amx_who
Reply With Quote #5

lool look this !!!

--==Owner==--
ScrappeR, Acces: abcdefghijklmnopqrstu
--==Co-Owner==--
Flooow, Acces: abcdefghijkmnopqrstu
__________________
ScrappeR is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 10-01-2013 , 21:50   Re: [REQ] amx_who
Reply With Quote #6

Quote:
Originally Posted by ScrappeR View Post
lool look this !!!

--==Owner==--
ScrappeR, Acces: abcdefghijklmnopqrstu
--==Co-Owner==--
Flooow, Acces: abcdefghijkmnopqrstu
I don't get what you mean lol. But if you speak other languages tell me in it please.


*I talk Arab, Spanish, French, English.
__________________
Like my clean plugins and work?
Baws is offline
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 19:27.


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