AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Admin Menu (https://forums.alliedmods.net/showthread.php?t=347221)

Under Dog 04-12-2024 16:24

Admin Menu
 
How do you add the individual commands from a plugin to the admin menu in admins_simple.txt?

when you use sm_admin you'll have the new plugin option to select and then all the options for that plugin under that selection.

Is this possible or do you have to bind keys or type in the console every time?

Thanks,

Peter Brev 04-28-2024 17:49

Re: Admin Menu
 
It is usually the plugin authors that add their functionality to the admin menu in their source code.

Under Dog 04-28-2024 17:55

Re: Admin Menu
 
Thank You for the reply.

SyntX 05-03-2024 00:37

Re: Admin Menu
 
use adminmenu_custom.txt to add new plugins commands in your admin menu, For example:

PHP Code:

"Category Name"
{
        
"Name"
        
{
            
"cmd"                   "sm_commandhere #1"
            "execute"               "player"
            "1"
            
{
                
"type"              "teamplayer"
                "method"            "name"
                "title"             "Player: "
            
}
        }


Default sourcemod slap,slay,freeze Command. Please do not use this beacuse sourcemod itself add them into default menu.

PHP Code:

"Demo"
{
        
"Slap"
        
{
            
"cmd"                   "sm_slap #1"
            "execute"               "player"
            "1"
            
{
                
"type"              "teamplayer"
                "method"            "name"
                "title"             "Player: "
            
}
        }
        
"Slay"
        
{
            
"cmd"                   "sm_slay #1"
            "execute"               "player"
            "1"
            
{
                
"type"              "teamplayer"
                "method"            "name"
                "title"             "Player: "
            
}
        }
       
"Freeze"
        
{
            
"cmd"                   "sm_freeze #1"
            "execute"               "player"
            "1"
            
{
                
"type"              "teamplayer"
                "method"            "name"
                "title"             "Player: "
            
}
        }



Under Dog 05-03-2024 19:54

Re: Admin Menu
 
Thanks for the replay. But I guess I'll just keep binding keys for spawning stuff. I can get a menu to come up in game. But I can't figure out how to make it execute the command. Like using the mini gun spawner... I can get this to come up in game,

1 50 Cal
2 Mini Gun
3 Remove Guns

But, No matter how I try to put in the command, I doesn't spawn anything when I push 1, 2 or 3.

It's much easier to just bind a key to these commands than to try to get admin_custom.txt to work. Or maybe you just can't put these type of spawn commands into the admin menus.

SyntX 05-06-2024 06:08

Re: Admin Menu
 
Could you please provide me which plugins are you using? If you can give me the information of plugins like, commands then i could help you with putting those commands in your admin menu.

Under Dog 05-07-2024 15:30

Re: Admin Menu
 
Any really. I am just wanting to learn how to do it so I can make it like I want maybe. But lets say,

health cabinet spawner (plugin) and Explosive Barrel spawner (plugin)

in the console typing sm_cabinet or sm_barrel will spawn those items on your cross hair.
or binding a key will spawn them.

so can something like that be done in the menu? something like this?

4.Extra Stuff (pressing 4 next menu) then you get this,

1.Cabinet (sm_cabinet)
2.Barrel (sm_barrel)
3..
4..

so pressing 1 spawns the cabibet and pressing 2 spawns the barrel?

I can get the menu to come up, I just can't get it to execute the commands.


All times are GMT -4. The time now is 17:11.

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