Raised This Month: $89 Target: $400
 22% 

Players List


Post New Thread Reply   
 
Thread Tools Display Modes
Author
urus
Senior Member
Join Date: Jan 2007
Plugin ID:
186
Plugin Version:
0.4
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    27 
    Plugin Description:
    Display players list in console like Mani`s ma_users
    Old 09-18-2007 , 18:11   Players List
    Reply With Quote #1

    Example:

    Code:
    # SteamID           IP             Country   Nick
    1 STEAM:0:xxxxxxxx  xx.xx.xx.xx    USA       Testplayer1 
    2 STEAM:0:xxxxxxxx  xx.xx.xx.xx    CHZ       Testplayer2


    Command:
    sm_plist - shows players on server with steamid, ip address, country code, name. If sm_plistpub 0 this command works only for admins.

    Cvar:
    sm_plistpub - enabled/disabled command sm_plist for regular players


    It simple remake command sm_who from plugin basecommands.



    Version:

    0.4
    cleanup and optimized code
    added three character country code from an IP address

    0.3
    Fix serious bug in the code - thanks to Anubis

    0.2
    Cvar sm_usersaylist changed to sm_plistpub
    Public chat command /plist changed to console command sm_plist

    0.1
    Release
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_playerslist_unml.sp - 2698 views - 2.6 KB)
    File Type: smx sm_playerslist_unml.smx (2.9 KB, 1528 views)

    Last edited by urus; 07-18-2010 at 14:26. Reason: new version
    urus is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 09-18-2007 , 18:41   Re: Players List
    Reply With Quote #2

    I'm not going to approve this right now. I'm going to talk to BAIL about just adding IP and authid's to sm_who
    __________________
    I'm a blast from the past!
    ferret is offline
    urus
    Senior Member
    Join Date: Jan 2007
    Old 09-18-2007 , 19:06   Re: Players List
    Reply With Quote #3

    sm_who now display only list players with privileges.
    And this command only for admins.

    I specially make this plugin because it not good, if every player on server can see who has admin rights.
    urus is offline
    imported_Anth0ny
    Senior Member
    Join Date: Jan 2005
    Location: Saturn
    Old 09-19-2007 , 03:01   Re: Players List
    Reply With Quote #4

    nice work! =)

    http://bugs.alliedmods.net/index.php...ls&task_id=932

    and .... can you add a sm_help-agalog (/help_cmds for example) for ordinar users, what can show only command, not requred admin's privelegies?
    __________________
    aka Mad.Eagle
    Creator\Owner\Admin of
    www.megatron.ws

    Last edited by imported_Anth0ny; 09-19-2007 at 03:03.
    imported_Anth0ny is offline
    Send a message via ICQ to imported_Anth0ny
    urus
    Senior Member
    Join Date: Jan 2007
    Old 09-19-2007 , 12:13   Re: Players List
    Reply With Quote #5

    Small update.
    I has moved chat command /plist to console command sm_plist.
    Now here the same command for both type players - regular and admin. I think it more logically.

    Quote:
    can you add a sm_help-agalog (/help_cmds for example) for ordinar users, what can show only command, not requred admin's privelegies?
    IMHO i think it impossible, because players command don`t registered. They processing "on fly".
    urus is offline
    Anubis
    Junior Member
    Join Date: Mar 2007
    Location: Poland
    Old 09-22-2007 , 12:16   Re: Players List
    Reply With Quote #6

    There is a serious bug in the code:

    Code:
    public Action:OnClientCommand(client, args)
    {
            new String:usrlist[16]
        GetCmdArg(0, usrlist, sizeof(usrlist));
    
        if (StrEqual(usrlist, "sm_plist"))
        {
                if (GetConVarInt(g_UserSayList) == 0)
                    {
                    return Plugin_Handled;
                    }
    
            decl String:t_name[16], String:t_ip[16], String:t_steamid[16];
            Format(t_name, sizeof(t_name), "Nick");
            Format(t_ip, sizeof(t_ip), "IP");
            Format(t_steamid, sizeof(t_steamid), "SteamID");
    
            PrintToConsole(client, "#  %-25s %-20.5s %s", t_name, t_ip, t_steamid);
    
            /* List all players */
            new maxClients = GetMaxClients();
    
            for (new i=1; i<=maxClients; i++)
            {
                if (!IsClientInGame(i))
                {
                    continue;
                }
                decl String:name[65], String:ip[32], String:steamid[32];
                GetClientName(i, name, sizeof(name));
                GetClientIP(i, ip, sizeof(ip));
                GetClientAuthString(i, steamid, sizeof(steamid));
                PrintToConsole(client, "%d. %-24.35s %-20s %s", i, name, ip, steamid);
            }
        }
            return Plugin_Stop;  
    }
    As you see ALL PLAYER COMMANDS are blocked. For example you can not choose a team and play

    Fixed code:
    Code:
    public Action:OnClientCommand(client, args)
    {
            new String:usrlist[16]
        GetCmdArg(0, usrlist, sizeof(usrlist));
    
        if (StrEqual(usrlist, "sm_plist"))
        {
                if (GetConVarInt(g_UserSayList) == 0)
                    {
                    return Plugin_Handled;
                    }
    
            decl String:t_name[16], String:t_ip[16], String:t_steamid[16];
            Format(t_name, sizeof(t_name), "Nick");
            Format(t_ip, sizeof(t_ip), "IP");
            Format(t_steamid, sizeof(t_steamid), "SteamID");
    
            PrintToConsole(client, "#  %-25s %-20.5s %s", t_name, t_ip, t_steamid);
    
            /* List all players */
            new maxClients = GetMaxClients();
    
            for (new i=1; i<=maxClients; i++)
            {
                if (!IsClientInGame(i))
                {
                    continue;
                }
                decl String:name[65], String:ip[32], String:steamid[32];
                GetClientName(i, name, sizeof(name));
                GetClientIP(i, ip, sizeof(ip));
                GetClientAuthString(i, steamid, sizeof(steamid));
                PrintToConsole(client, "%d. %-24.35s %-20s %s", i, name, ip, steamid);
            }
            return Plugin_Stop;
        }
     
        return Plugin_Continue;
    }
    anyway usefull addon ;)


    regards

    ps. fixed code attached.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_playerslist_unml.sp - 2265 views - 2.7 KB)

    Last edited by Anubis; 09-22-2007 at 12:18.
    Anubis is offline
    urus
    Senior Member
    Join Date: Jan 2007
    Old 09-24-2007 , 09:24   Re: Players List
    Reply With Quote #7

    OMG... mia culpa.
    Anubis - big thanks.

    Sorry have been busy some days
    urus is offline
    imported_Anth0ny
    Senior Member
    Join Date: Jan 2005
    Location: Saturn
    Old 09-24-2007 , 09:48   Re: Players List
    Reply With Quote #8

    is sm_plistpub set to "0" by default?
    __________________
    aka Mad.Eagle
    Creator\Owner\Admin of
    www.megatron.ws
    imported_Anth0ny is offline
    Send a message via ICQ to imported_Anth0ny
    saulstari
    Member
    Join Date: Jan 2006
    Old 12-03-2007 , 17:52   Re: Players List
    Reply With Quote #9

    thx, great plug
    saulstari is offline
    MoggieX
    Veteran Member
    Join Date: Aug 2007
    Location: n00bville
    Old 12-17-2007 , 08:11   Re: Players List
    Reply With Quote #10

    Quote:
    Originally Posted by ferret View Post
    I'm not going to approve this right now. I'm going to talk to BAIL about just adding IP and authid's to sm_who
    That would be our prefered solution, however this woudl just fine and dandy for now :-)

    Matt
    __________________
    MoggieX is offline
    Send a message via Skype™ to MoggieX
    Reply


    Thread Tools
    Display Modes

    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 01:01.


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