This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Execute cfg via chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
tedaimlocks
Senior Member
Join Date: Jan 2024
Old 04-17-2024 , 10:08   Re: Execute cfg via chat
Reply With Quote #6

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
 



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 03:58.


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