Execute cfg via chat
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.
|
Re: Execute cfg via chat
you can do amx_rcon exec lo3.cfg
|
Re: Execute cfg via chat
Quote:
HTML Code:
#include <amxmodx> |
Re: Execute cfg via chat
Quote:
|
Re: Execute cfg via chat
Quote:
|
Re: Execute cfg via chat
Quote:
This will support saying /lo3 or .lo3 PHP Code:
|
Re: Execute cfg via chat
Quote:
|
Re: Execute cfg via chat
That's because it's currently passing the whole chat argument through to the command line. You need to remove the first character in the same way that it was done for the comparison. I.e. add the indexing of the szArg array in the server_cmd() function like this:
Code:
server_cmd( "exec %s.cfg" , szArg[1] ); |
Re: Execute cfg via chat
Ah, my bad.
As fysiks said, you can do: server_cmd( "exec %s.cfg" , szArg[ 1 ] ); or server_cmd( "exec %s.cfg" , configs[ i ] ); both will do the exact same thing. |
Re: Execute cfg via chat
|
All times are GMT -4. The time now is 00:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.