搜索
查看: 5752|回复: 13

谁进来修改一下这个插件client_autoexec.sma

[复制链接]
发表于 2009-4-21 13:51:27 | 显示全部楼层 |阅读模式 来自 重庆渝北区
我想把这个插件改成每 10秒 执行一次,这个插件本来是没一局执行一次。。因为服务器需要。请大家帮帮忙。。。谢谢了  这个是玩家统一使用参数插件.



//Client Autoexec Commands on Connect
//by Torch
//Automatically executes commands on client when they join your server.
//Sort of like an automated client_exec plugin.
//Useful to block cl_pitchspeed etc as soon as they join.
//Create a file "client_autoexec.ini" in your configs folder
//and place all the console commands to be executed on clients in it.
//Maximum number of commands is defined as 100 below.

#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])
        }
    }
}
 楼主| 发表于 2009-4-21 16:00:14 | 显示全部楼层 来自 重庆渝北区
我晕  为什么没人帮忙啊。。

   顶起啊。。有用的东西啊。。
回复

使用道具 举报

发表于 2009-4-21 18:05:55 | 显示全部楼层 来自 广东中山
顶起来呀
回复

使用道具 举报

 楼主| 发表于 2009-4-21 20:41:37 | 显示全部楼层 来自 重庆渝北区
大家顶我啊
回复

使用道具 举报

发表于 2009-4-21 23:00:18 | 显示全部楼层 来自 山东淄博
请问这是什么插件?
1.6的?
回复

使用道具 举报

 楼主| 发表于 2009-4-21 23:22:58 | 显示全部楼层 来自 重庆渝北区
CS1.5的哈  顶
回复

使用道具 举报

发表于 2010-2-14 23:23:52 | 显示全部楼层 来自 云南曲靖
汗。,。。
回复

使用道具 举报

发表于 2010-2-18 18:19:19 | 显示全部楼层 来自 广西南宁
  1. #include <amxmodx>
  2. #include <amxmisc>

  3. #define MAX_CMDS    100

  4. public plugin_init()
  5. {
  6.     register_plugin("Client Autoexec on Connect","1.0","Torch")
  7.     //register_event("HLTV", "newRound", "a", "1=0", "2=0")
  8.     register_event("ResetHUD", "newRound", "be")
  9.     return PLUGIN_CONTINUE
  10. }

  11. new configsdir[200]
  12. new cmdfile[200]
  13. new cmd[MAX_CMDS][200]

  14. public client_connect(id)
  15.     exec(id);

  16. public newRound(id)
  17.     exec(id);

  18. public exec(id)
  19. {
  20.     get_configsdir(configsdir,199)
  21.     format(cmdfile,199,"%s/client_autoexec.ini",configsdir)

  22.     new txtLen
  23.     new result
  24.     for(new i=0;i<MAX_CMDS;i++)
  25.     {
  26.         result = read_file(cmdfile,i,cmd[i],199,txtLen)
  27.         if(result != 0)
  28.         {
  29.             client_cmd(id,cmd[i])
  30.         }
  31.     }
  32. set_task(10.0,"exec",id);
  33. }
复制代码
完事....
不过这么搞累死你的服务器
回复

使用道具 举报

发表于 2010-2-18 18:19:55 | 显示全部楼层 来自 广西南宁
汗。,。。
76233386 发表于 2010-2-14 23:23

我擦没看帖子时间
没事别乱挖坟行不?
回复

使用道具 举报

发表于 2010-3-17 22:14:04 | 显示全部楼层 来自 浙江杭州
10秒一次你不绝的卡吗! 这个插件可以在每一局都改变玩家CFG 里面是参数.玩家用控制台把参数该了。 下局还会还原的。

一般情况下没有什么用的,
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表