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

[ANY] Get Full Info About Player


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Naathy
Member
Join Date: Mar 2022
Location: Brazil
Plugin ID:
8218
Plugin Version:
1.0
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Get all info about an player
    Old 10-02-2022 , 02:36   [ANY] Get Full Info About Player
    Reply With Quote #1

    Description
    This plugin get info about a player. It can make staff work a lot easier.
    List of infos below.

    Commands
    sm_getinfo <#userid|name> - Get Info of player mentioned

    Dependencies
    GeoIP Extension 1.11

    Infos List
    Nick, Profile URL, Steam32, IP, City, Country, Ping, Packets, Loss and Choke

    Changelogs
    Spoiler


    GitHub Repo
    Attached Files
    File Type: zip GetInfo.zip (29.6 KB, 88 views)
    File Type: zip GetInfo_v1.0.1.zip (29.7 KB, 102 views)
    __________________
    Owner of NGServers

    Contact
    Discord | Steam | Github

    Last edited by Naathy; 11-26-2023 at 15:04.
    Naathy is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 10-02-2022 , 05:36   Re: [ANY] Get Full Info About Player
    Reply With Quote #2

    need a few fixes
    PHP Code:
    #pragma semicolon 1
    #pragma newdecls required

    #include <multicolors>

    #include <sdktools>
    #include <geoip>

    public Plugin myinfo 
    {
        
    name "Get Info",
        
    author "Nathy",
        
    description "Get full info about an player",
        
    version "1.1.0",
        
    url "https://steamcommunity.com/id/nathyzinhaa"
    }

    public 
    void OnPluginStart()
    {
        
    LoadTranslations("common.phrases");    // required when using the FindTarget() function

        
    RegAdminCmd("sm_getinfo"Command_GetInfoADMFLAG_GENERIC"sm_getinfo <#userid|name>");
    }

    public 
    Action Command_GetInfo(int clientint args)
    {
        if(
    args 1)
        {
            
    ReplyToCommand(client"[SM] Usage: sm_getinfo <#userid|name>");
            return 
    Plugin_Handled;
        }

        
    char buffer[PLATFORM_MAX_PATH], country[32];
        
    GetCmdArg(1buffersizeof(buffer));
        
    int target FindTarget(clientbuffer);

        
    CReplyToCommand(client"Name: {green}%N"target);
        
    GetClientAuthId(targetAuthId_SteamID64buffersizeof(buffer));
        
    CReplyToCommand(client"Profile: {green}https://steamcommunity.com/profiles/%s"buffer);
        
    GetClientAuthId(targetAuthId_Steam2buffersizeof(buffer));
        
    CReplyToCommand(client"SteamID: {green}%s"buffer);
        
    GetClientIP(targetbuffersizeof(buffer));
        
    CReplyToCommand(client"IP: {green}%s"buffer);
        
    GeoipCountry(buffercountrysizeof(country));
    #if SOURCEMOD_V_MAJOR == 1 && SOURCEMOD_V_MINOR < 11
        
    CReplyToCommand(client"Country: {green}%s"country);
    #else
        
    char city[32];
        
    GeoipCity(buffercitysizeof(city));    // since SM1.11
        
    CReplyToCommand(client"Location: {green}%s {default}- {green}%s"citycountry);
    #endif
        
    CReplyToCommand(client"Ping: {green}%i"RoundToNearest(1000 GetClientAvgLatency(targetNetFlow_Both)));
        
    CReplyToCommand(client"Packets: {green}%f"GetClientAvgPackets(targetNetFlow_Both));
        
    CReplyToCommand(client"Loss: {green}%f"GetClientAvgLoss(targetNetFlow_Both));
        
    CReplyToCommand(client"Choke: {green}%f"GetClientAvgChoke(targetNetFlow_Both));

        return 
    Plugin_Handled;

    PHP Code:
    //// GetInfo 1.0.sp
    //
    // Code size:         30616 bytes
    // Data size:         7276 bytes
    // Stack/heap size:      18512 bytes
    // Total requirements:   56404 bytes
    //
    // Compilation Time: 0,42 sec
    // ----------------------------------------

    //// GetInfo 1.1.0.sp
    //
    // Code size:         30516 bytes
    // Data size:         7208 bytes
    // Stack/heap size:      18512 bytes
    // Total requirements:   56236 bytes
    //
    // Compilation Time: 0,41 sec
    // ---------------------------------------- 
    __________________
    Grey83 is offline
    Naathy
    Member
    Join Date: Mar 2022
    Location: Brazil
    Old 10-03-2022 , 04:16   Re: [ANY] Get Full Info About Player
    Reply With Quote #3

    Grey83;2790177


    Translation added, thanks!

    About checking SM version, i will not implement it, since we can update GeoIP extension without update SourceMod.

    Also, i think you complicated the code a bit more than needed, dont you? ^^'
    __________________
    Owner of NGServers

    Contact
    Discord | Steam | Github

    Last edited by Naathy; 10-03-2022 at 04:18.
    Naathy is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 10-03-2022 , 06:00   Re: [ANY] Get Full Info About Player
    Reply With Quote #4

    Quote:
    Originally Posted by Naathy View Post
    About checking SM version, i will not implement it, since we can update GeoIP extension without update SourceMod.
    Yes, this is possible, but for compilation you still need to use the include geoip.inc from SM1.11. I have doubts that many will do this (instead of updating the entire SM). The compiler cannot determine the version of the include being used. Only SM version.
    Quote:
    Originally Posted by Naathy View Post
    Also, i think you complicated the code a bit more than needed, dont you? ^^'
    No, I do not think so. ¯\(°_o)/¯
    __________________
    Grey83 is offline
    Naathy
    Member
    Join Date: Mar 2022
    Location: Brazil
    Old 10-03-2022 , 18:23   Re: [ANY] Get Full Info About Player
    Reply With Quote #5

    Quote:
    Originally Posted by Grey83 View Post
    Yes, this is possible, but for compilation you still need to use the include geoip.inc from SM1.11. I have doubts that many will do this (instead of updating the entire SM). The compiler cannot determine the version of the include being used. Only SM version.
    No, its wrong. I compiled with SM 1.10 & geoip.inc 1.11. All working fine, no errors.
    Both versions was compiled this way.
    __________________
    Owner of NGServers

    Contact
    Discord | Steam | Github

    Last edited by Naathy; 10-03-2022 at 18:25.
    Naathy is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 10-04-2022 , 04:34   Re: [ANY] Get Full Info About Player
    Reply With Quote #6

    Quote:
    Originally Posted by Naathy View Post
    No, its wrong. I compiled with SM 1.10 & geoip.inc 1.11. All working fine, no errors..
    That's what I said: to compile, you need an include from SM1.11+
    __________________
    Grey83 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 04:58.


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