View Single Post
tedaimlocks
Senior Member
Join Date: Jan 2024
Old 04-17-2024 , 10:08   Re: Execute cfg via chat
Reply With Quote #3

Quote:
Originally Posted by fjlep View Post
Some time ago I found a plugin that the function was to execute cfg using the say, for example to execute lo3.cfg I wrote in the chat lo3 and the configuration was loaded, but I don't remember where I saw it, I hope you can help me.
this should work, i guess


HTML Code:
#include <amxmodx>

#define PLUGIN "CFG Via Chat"
#define VERSION "1.0"
#define AUTHOR "tedaimlocks"

#define FLAG ADMIN_CFG

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_clcmd("say /lo3", "cfg")
	register_clcmd("say_team /lo3", "cfg")
}

public cfg() {
        if(!get_user_flags(id) & FLAG) {
            return PLUGIN_HANDLED;
        }
	server_cmd("exec lo3.cfg");
}

Last edited by tedaimlocks; 04-21-2024 at 05:08.
tedaimlocks is offline