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

[Any] List SourceMod Commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author
denormal
New Member
Join Date: Oct 2014
Plugin ID:
4374
Plugin Version:
1.0
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 10-03-2014 , 21:08   [Any] List SourceMod Commands
    Reply With Quote #1

    Description
    This plugin simply prints the names of all commands starting with "sm_" which the client has access to.

    Command
    sm_listcmd (public by default)

    Installation
    Copy listcmd.smx to your sourcemod/plugins directory.
    Attached Files
    File Type: sp Get Plugin or Get Source (listcmd.sp - 1836 views - 960 Bytes)

    Last edited by denormal; 10-04-2014 at 04:33.
    denormal is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 10-03-2014 , 21:35   Re: [TF2] List SourceMod Commands
    Reply With Quote #2

    The built in sm_help already does that in addition to non sm_ prefixed commands.

    Last edited by Sreaper; 10-03-2014 at 21:55.
    Sreaper is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 10-03-2014 , 21:58   Re: [TF2] List SourceMod Commands
    Reply With Quote #3

    sm_searchcmds "" works also.
    Mitchell is offline
    Marcus_Brown001
    AlliedModders Donor
    Join Date: Nov 2012
    Location: Illinois, United States
    Old 10-04-2014 , 01:10   Re: [TF2] List SourceMod Commands
    Reply With Quote #4

    What makes this plugin only work on TF2? And what the other guys said.
    Marcus_Brown001 is offline
    denormal
    New Member
    Join Date: Oct 2014
    Old 10-04-2014 , 04:14   Re: [TF2] List SourceMod Commands
    Reply With Quote #5

    Quote:
    Originally Posted by Sreaper View Post
    The built in sm_help already does that in addition to non sm_ prefixed commands.
    Can't deny that. I guess that makes this plugin pretty much redundant.

    Quote:
    What makes this plugin only work on TF2? And what the other guys said.
    Nothing. Come to think of it it's not TF2 specific specific at all. That was thoughtless of me.

    In light of this, i'd say this is pretty useless and should obviously not be approved. I should do more research in future. Thanks for the feedback guys.
    Perhaps it could be improved to provide more useful information though? If anyone has any ideas i'm happy to hear them.

    Last edited by denormal; 10-04-2014 at 06:47.
    denormal is offline
    shanapu
    Veteran Member
    Join Date: Apr 2015
    Location: .de
    Old 12-13-2016 , 20:55   Re: [Any] List SourceMod Commands
    Reply With Quote #6

    I saw about this plugin in this thread and liked the idea.
    I made a little rewrite in new syntax & removed the console output.
    This plugin shows the commands with their description in a clickable menu.

    maybe if I'm bored sometimes I will make it alphabetical order.

    PHP Code:
    #pragma semicolon 1
    #pragma newdecls required

    #include <sourcemod>

    public Plugin myinfo ={
        
    name "List SourceMod Commands",
        
    author "denormal, shanapu",
        
    description "Lists SourceMod commands accessible to the client in a menu.",
        
    version "1.1",
        
    url ""
    };

    public 
    void OnPluginStart()
    {
        
    RegConsoleCmd("sm_listcmd"Command_listcmd"Open this commands menu");
    }

    public 
    Action Command_listcmd(int client,int args)
    {
        
    char command[64];
        
    char description[128];
        
    Handle cvar;
        
    bool isCommandflags;
        
        
    cvar FindFirstConCommand(commandsizeof(command), isCommandflagsdescriptionsizeof(description));
        
        if(
    cvar == INVALID_HANDLE) {
            
    PrintToConsole(client"Could not load cvar list");
            return 
    Plugin_Handled;
        }
        
    Menu menu CreateMenu(Handler_CMDmenu);
        
    menu.SetTitle("Commands");
        
        do {
            if(!
    isCommand
                continue;
            
            
    bool isSmCmd command[0] == 's' && command[1] == 'm' && command[2] == '_';
            
            if (
    isSmCmd && CheckCommandAccess(clientcommand0false)) 
            {
                
    char display[256];
                
    Format(displaysizeof(display), "%s\n%s"command ,description);
                
    menu.AddItem(commanddisplay);
            }
        } while(
    FindNextConCommand(cvarcommandsizeof(command), isCommandflagsdescriptionsizeof(description)));
        
        
    menu.ExitButton true;
        
    menu.Display(clientMENU_TIME_FOREVER);
        
        return 
    Plugin_Handled;
    }

    public 
    int Handler_CMDmenu(Menu menuMenuAction actionint clientint Position)
    {
        if (
    action == MenuAction_Select)
        {
            
    char command[32];
            
            
    menu.GetItem(Positioncommandsizeof(command));
            
            
    FakeClientCommand(clientcommand);
        }
        else if (
    action == MenuAction_End)
        {
            
    delete menu;
        }

    Attached Files
    File Type: sp Get Plugin or Get Source (listcmd.sp - 1317 views - 1.7 KB)
    __________________
    coding & free software

    Last edited by shanapu; 12-13-2016 at 21:00.
    shanapu is offline
    canadianjeff
    BANNED
    Join Date: Sep 2016
    Old 11-08-2020 , 05:34   Re: [Any] List SourceMod Commands
    Reply With Quote #7

    just a thought but could this plugin be used to find duplicate conflicting commands?
    canadianjeff 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 12:24.


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