Raised This Month: $ Target: $400
 0% 

[REQ] /commands plugin to show all commands in menu


Post New Thread Reply   
 
Thread Tools Display Modes
Chokitu
Senior Member
Join Date: Oct 2013
Old 05-17-2015 , 10:39   Re: [REQ] /commands plugin to show all commands in menu
Reply With Quote #11

Didn`t, but its because he is my friend.
And he made me a favor before!
Chokitu is offline
Send a message via Skype™ to Chokitu
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 05-17-2015 , 11:19   Re: [REQ] /commands plugin to show all commands in menu
Reply With Quote #12

Quote:
Originally Posted by Chokitu View Post
Didn`t, but its because he is my friend.
And he made me a favor before!
common... ...you send me a pn after my "post it here" post:


Quote:
Chokitu
Today , 00:25 Sold him that
shanapu is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 05-17-2015 , 11:44   Re: [REQ] /commands plugin to show all commands in menu
Reply With Quote #13

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

public Plugin myinfo 
{
    
name "[ANY] sm_help menu",
    
author "AlliedModders LLC",
    
description "Display command information",
    
version SOURCEMOD_VERSION,
    
url "http://www.sourcemod.net/"
};

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_commands"HelpCmd"Displays SourceMod commands and descriptions in a menu");
}

public 
Action HelpCmd(int clientint args)
{
    
Menu menu CreateMenu(Menu_Commands);
    
menu.SetTitle("SM help commands\n ");

    
char Name[64], Desc[255], NoDesc[128];
    
int Flags;
    
Handle CmdIter GetCommandIterator();

    
FormatEx(NoDescsizeof(NoDesc), "No description");
    
    for (
int i 0ReadCommandIterator(CmdIterNamesizeof(Name), FlagsDescsizeof(Desc)); i++)
    {
        if (
CheckCommandAccess(clientNameFlags))
        {
            
char strDisplay[56];    //512 / 9
            
Format(strDisplaysizeof(strDisplay), "%s - %s"Name, (Desc[0] == '\0') ? NoDesc Desc);
            
menu.AddItem(""strDisplayITEMDRAW_DISABLED);
        }
    }
    
    
menu.ExitButton true;
    
menu.Display(clientMENU_TIME_FOREVER);

    
delete CmdIter;

    return 
Plugin_Handled;
}

public 
int Menu_Commands(Handle menuMenuAction actionint clientint option)
{
    if(
action == MenuAction_End)
    {
        
CloseHandle(menu);
    }

__________________
Pelipoika 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 01:31.


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