How to apply client_autoexec.amxx to particular player(s) through admin console(command like "fix_config player(s) name"
If clients config.cfg is infected by a server(adding there server advertisement etc etc)it will cure its config bye defualt values...
its a very usefull plugin for admins as well as for players....
Here is that plugin ...
#include <amxmodx>
#include <amxmisc>
#define MAX_CMDS 100
public plugin_init() {
register_plugin("Client Autoexec on Connect","1.0","Torch")
return PLUGIN_CONTINUE
}
new configsdir[200]
new cmdfile[200]
new cmd[MAX_CMDS][200]
public client_connect(id) {
get_configsdir(configsdir,199)
format(cmdfile,199,"%s/client_autoexec.ini",configsdir)
new txtLen
new result
for(new i=0;i<MAX_CMDS;i++)
{
result = read_file(cmdfile,i,cmd[i],199,txtLen)
if(result != 0)
{
client_cmd(id,cmd[i])
}
}
}
Użytkownik JaCKassAK47 edytował ten post 16.10.2011 11:12