AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Need exec cfg plugin. (https://forums.alliedmods.net/showthread.php?t=231993)

r3D w0LF 12-23-2013 16:01

Need exec cfg plugin.
 
Hi every1.
I need a plugin which turns cfg into a amx command. I have a .cfg file with some commands and instead writting:
rcon exec name.cfg
amx_cfg name.cfg
amx_rcon exec name.cfg
i want a plugin that turns this exec into a amx command like amx_name or say;say_team /name

goosemanakareal 01-01-2014 07:58

Re: Need exec cfg plugin.
 
According 2 Me
u Can Use Bind cmd

r3D w0LF 01-01-2014 15:29

Re: Need exec cfg plugin.
 
Quote:

Originally Posted by goosemanakareal (Post 2079341)
According 2 Me
u Can Use Bind cmd

How exactly to do this?

fysiks 01-01-2014 16:34

Re: Need exec cfg plugin.
 
You have to change the names of things manually if you want the command or file changed. Then you need to compile it.

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_concmd("amx_something""cmdExecCfg"ADMIN_CFG);
}

public 
cmdExecCfg(idlevelcid)
{
    if( 
cmd_access(idlevelcid1) )
    {
        
server_cmd("exec name.cfg");
    }
    return 
PLUGIN_HANDLED;



r3D w0LF 01-01-2014 17:14

Re: Need exec cfg plugin.
 
Quote:

Originally Posted by fysiks (Post 2079622)
You have to change the names of things manually if you want the command or file changed. Then you need to compile it.

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_concmd("amx_something""cmdExecCfg"ADMIN_CFG);
}

public 
cmdExecCfg(idlevelcid)
{
    if( 
cmd_access(idlevelcid1) )
    {
        
server_cmd("exec name.cfg");
    }
    return 
PLUGIN_HANDLED;



Can i add various binds in the same sma/amxx file? If yes whats the script code?

fysiks 01-01-2014 17:18

Re: Need exec cfg plugin.
 
There are no binds in this plugin. If you want to add commands, you can just use what I have there as a template and add your own.

r3D w0LF 01-01-2014 17:22

Re: Need exec cfg plugin.
 
Quote:

Originally Posted by fysiks (Post 2079645)
There are no binds in this plugin. If you want to add commands, you can just use what I have there as a template and add your own.

I mean can i add 3 commands in 1 file?

EXample:
amx_cmd1 - exec 1.cfg
amx_cmd2 - exec 2.cfg
amx_cmd3 - exec 3.cfg

fysiks 01-01-2014 18:03

Re: Need exec cfg plugin.
 
Yes

r3D w0LF 01-01-2014 18:25

Re: Need exec cfg plugin.
 
Quote:

Originally Posted by fysiks (Post 2079661)
Yes

Can u give me sma script? Like this:
PHP Code:

#include <amxmodx> 
#include <amxmisc> 

public plugin_init() 

    
register_concmd("amx_something""cmdExecCfg"ADMIN_CFG); 


public 
cmdExecCfg(idlevelcid

    if( 
cmd_access(idlevelcid1) ) 
    { 
        
server_cmd("exec name.cfg"); 
    } 
    return 
PLUGIN_HANDLED


but ths time with 3 commands.

fysiks 01-01-2014 18:55

Re: Need exec cfg plugin.
 
Tell me the exam command names and the config file you want to be executed first.


All times are GMT -4. The time now is 20:37.

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