Raised This Month: $ Target: $400
 0% 

[CS:GO] Advanced Servers IP Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author
xoxo_
Junior Member
Join Date: Sep 2018
Location: Israel
Plugin ID:
6918
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    ServerList
    Old 01-24-2020 , 15:08   [CS:GO] Advanced Servers IP Menu
    Reply With Quote #1

    Description:

    Hello everyone,
    I have created a small ServerList system which will be possible with the command
    !s
    See your list of servers and that way you can connect to the server you want faster.

    Cvars:

    sm_server_prefix "SM"

    installation:

    addons / sourcemod / plugins / ServerList.smx
    addons / sourcemod / scripts / ServerList.sp
    addons / sourcemod / config / ServerList.cfg

    Inside the Config there is ServerList.cfg and write like this for example

    "Servers List"
    {
    "Surf Combat"
    {
    "name" "SurfCombat"
    "address" "185.185.134.226:27017"
    }
    }

    Pictures::


    1.
    2.

    enjoy
    Attached Files
    File Type: sp Get Plugin or Get Source (ServerList.sp - 639 views - 2.6 KB)
    File Type: smx ServerList.smx (6.1 KB, 232 views)
    File Type: cfg ServerList.cfg (132 Bytes, 293 views)
    __________________


    Feel free to Donate with paypal
    My plugins

    Last edited by xoxo_; 01-24-2020 at 15:11.
    xoxo_ is offline
    ItsCEED
    Member
    Join Date: Jun 2016
    Old 01-24-2020 , 20:04   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #2

    Advanced? don't get me wrong, but as far as i see on other servers there's a plugin showing even players on the server

    But overall its pretty neat plugin. You can use A2S to get server data tho

    Last edited by ItsCEED; 01-24-2020 at 20:16.
    ItsCEED is offline
    Send a message via Skype™ to ItsCEED
    starcs
    Member
    Join Date: Nov 2018
    Old 01-24-2020 , 20:46   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #3

    Nice plugin.
    __________________
    Founder of ⭐ STRTEAM
    starcs is offline
    xoxo_
    Junior Member
    Join Date: Sep 2018
    Location: Israel
    Old 01-25-2020 , 01:52   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #4

    Quote:
    Originally Posted by ItsCEED View Post
    Advanced? don't get me wrong, but as far as i see on other servers there's a plugin showing even players on the server

    But overall its pretty neat plugin. You can use A2S to get server data tho
    I can add how many people there are in each server listed in the serverlist
    __________________


    Feel free to Donate with paypal
    My plugins
    xoxo_ is offline
    RiToRn
    Junior Member
    Join Date: Aug 2019
    Old 01-25-2020 , 01:58   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #5

    Cool Plugin !
    RiToRn is offline
    Lubricant Jam
    AlliedModders Donor
    Join Date: Oct 2016
    Location: United Kingdom
    Old 01-25-2020 , 10:45   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #6

    Quote:
    Originally Posted by xoxo_ View Post
    I can add how many people there are in each server listed in the serverlist
    Probably would be best pal.
    __________________
    Lubricant Jam is offline
    Zivziv
    New Member
    Join Date: Jan 2020
    Old 02-03-2020 , 12:58   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #7

    Nice Plugin
    Zivziv is offline
    ItsCEED
    Member
    Join Date: Jun 2016
    Old 02-04-2020 , 06:18   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #8

    Quote:
    Originally Posted by xoxo_ View Post
    I can add how many people there are in each server listed in the serverlist
    That would be cool, if you add that i can see my self using the plugin.

    You can also implement Advertisement messages, saying Join our X Server It has (X/X) Players. You got the point.
    ItsCEED is offline
    Send a message via Skype™ to ItsCEED
    alphaearth
    Senior Member
    Join Date: Feb 2018
    Location: Turkey
    Old 03-13-2020 , 17:23   Re: [CS:GO] Advanced Servers IP Menu
    Reply With Quote #9

    https://github.com/Wend4r/sm-redirect-core with library

    When you select it in the menu, do you set it to connect to the server?

    I have tried. but I don't know if it works. I did not test.

    PHP Code:
    #pragma semicolon 1

    #define DEBUG
     
    #define PLUGIN_AUTHOR "xoxo^^"
    #define PLUGIN_VERSION "2.0"
     
    #include <sourcemod>
    #include <sdktools>
    #include <cstrike>
    #include <socket>
    #include <redirect_core>

    char PREFIX[64];
    char Path[] = "configs/ServerList.cfg";

    int g_iIPg_iPort;

    StringMap ServersTrie;

    public 
    Plugin myinfo =
    {
        
    name "ServerList",
        
    description "[CS:GO] Advanced Servers IP Menu",
        
    author "xoxo^^",
        
    version "1.00",
        
    url ""
    };
     
    public 
    void OnPluginStart()
    {
        
        
    RegConsoleCmd("sm_servers"Servers);
        
    RegConsoleCmd("sm_serverlist"Servers);
        
        
    Handle convar CreateConVar("sm_server_prefix""SourceTurk");
        
        
    GetConVarString(convarPREFIXsizeof(PREFIX));
        
        
    HookConVarChange(convaronConVarChange_PREFIX);
        
    ServersTrie = new StringMap();
        
        
    ReadConfigFile();
    }

    public 
    void onConVarChange_PREFIX(Handle convarchar[] oldValuechar[] newValue)
    {
        
    FormatEx(PREFIXsizeof(PREFIX), newValue);
    }

    int IPToNum(const char[] sIP)
    {
        
    char sResult[4][4];
        return (
    ExplodeString(sIP"."sResult44) == 4) ? GetIP32FromIPv4(sResult) : 0;
    }

    public 
    void ReadConfigFile()
    {
        
    char FullPath[PLATFORM_MAX_PATH];
        
        
    BuildPath(Path_SMFullPathsizeof(FullPath), Pathsizeof(Path));
        
        if(!
    FileExists(FullPath))
            
    UC_CreateEmptyFile(FullPath);
            
        
    KeyValues kv = new KeyValues("Server List");
        
    kv.ImportFromFile(FullPath);
        
        
    kv.GotoFirstSubKey();
        
        
    char Name[64];
        
    char IPAddress[35];
        
        do
        {
            
    kv.GetString("name"Namesizeof(Name));
            
    kv.GetString("address"IPAddresssizeof(IPAddress));
            
            
    ServersTrie.SetString(NameIPAddress);
        }
        while(
    kv.GotoNextKey());
        
        
    delete kv;
    }

    public 
    Action Servers(int clientint args)
    {
        
    Menu menu = new Menu(MenuHandler1);
        
    menu.SetTitle(" [%s] ServerList " ,PREFIX);
        
        
    StringMapSnapshot TrieSnapshot ServersTrie.Snapshot();
        
        
    char Name[64], IPAddress[64];
        for(
    int i=0;TrieSnapshot.Length;i++)
        {
            
    TrieSnapshot.GetKey(iNamesizeof(Name));
            
            
    ServersTrie.GetString(NameIPAddresssizeof(IPAddress));
            
            
    menu.AddItem(IPAddressName);
        }
        
        
    delete TrieSnapshot;
        
        
    menu.ExitButton true;
        
    menu.Display(client20);
        return 
    Plugin_Handled;
    }
     
    public 
    int MenuHandler1(Menu menuMenuAction actionint clientint item)
    {
        if(
    action == MenuAction_End)
        {
            
    delete menu;
            
            return;
        }
        else if (
    action == MenuAction_Select)
        {
            
            
    char info[32], name[64];
            
            
    int dummy_value;
            
            
    menu.GetItem(iteminfosizeof(info), dummy_valuenamesizeof(name));
            
            for(
    int x strlen(info) - 1>= 0x--)
            {
                if(
    info[x] == ':')
                {
                    
    g_iPort StringToInt(info[1]);
                    
    info[x] = '\0';
                    break;
                    }
                }
            
    g_iIP IPToNum(info);
            
            
    RedirectClientOnServer(clientg_iIPg_iPort);
            
    PrintToChatAll("[/x02%s/x01] /x02%N /x04oyuncusu /x02%s /x04sunucusuna bağlandı."PREFIXclientinfo);
        }
    }

    stock UC_CreateEmptyFile(const char[] sPath)
    {
        
    CloseHandle(OpenFile(sPath"a"));

    __________________

    Last edited by alphaearth; 03-13-2020 at 17:25. Reason: code
    alphaearth is offline
    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 20:55.


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