|
发表于 2010-2-18 18:19:19
|
显示全部楼层
来自 中国–广西–南宁
- #include <amxmodx>
- #include <amxmisc>
- #define MAX_CMDS 100
- public plugin_init()
- {
- register_plugin("Client Autoexec on Connect","1.0","Torch")
- //register_event("HLTV", "newRound", "a", "1=0", "2=0")
- register_event("ResetHUD", "newRound", "be")
- return PLUGIN_CONTINUE
- }
- new configsdir[200]
- new cmdfile[200]
- new cmd[MAX_CMDS][200]
- public client_connect(id)
- exec(id);
- public newRound(id)
- exec(id);
- public exec(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])
- }
- }
- set_task(10.0,"exec",id);
- }
复制代码 完事....
不过这么搞累死你的服务器 |
|