How To Add CFG in Admin Menu

Vertigo

⍥𝖜𝖞𝖊𝖗
Staff member
Administrator
This post explains about, how you can add cfg (Configuration file) to !admin menu and execute them whenever required.

Step 1: Create your cfg files and put it in cstrike/cfg or cstrike/cfg/sourcemod folder.
Step 2: Open cstrike/addons/sourcemod/config/adminmenu_cfgs.txt file.
Step 3: Add your cfg files path in the adminmenu_cfgs.txt file.
Step 4: Restart server or change map.

Now you can see your cfg listed in !admin menu.

Example :

- Let's say we want to turn on/off awp no scope using !admin menu by executing cfg files.
- Make sure awpns.smx plugin is in cstrike/addons/sourcemod/plugins/disabled folder.
- Create 2 cfg files, awp_noscope_on.cfg and awp_noscope_off.cfg.

awp_noscope_on.cfg

Code:
sm plugins load disabled/awpns.smx
say "AWP No Scope Mode is Enabled !!!"
sm_tsay blue "AWP No-Scope Enabled"
awp_noscope_off.cfg
Code:
sm plugins unload disabled/awpns.smx
say "AWP No Scope Mode is Disabled!!!"
sm_tsay red "AWP No-Scope Disabled"
- Put both cfg files in cstrike/cfg folder.
- Open cstrike/addons/sourcemod/config/adminmenu_cfgs.txt file and add both cfg files inside it.

adminmenu_cfgs.txt
Code:
/**
* List config files here (relative to moddir) to have them added to the exec config menu list
* Left side is the filename, right side is the text to be added to the menu
*/
Configs
{
    "cfg/server.cfg"                     "Standard Server Setup"
    "cfg/awp_noscope_on.cfg"             "Enable AWP No Scope"
    "cfg/awp_noscope_off.cfg"            "Disable AWP No Scope"
}
- Restart server or change map.
- Now you can see both the cfg files in !admin menu.

273
 

niko

Member
Bro Do You Have That awpns.smx Plugin I download Noscope.smx From Aliedmodders But Its Not Working CFG Is Working Bro SMX Files Not Working
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock