Ru版本请进来顶我啊。
我想把这个插件改成每 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
new cmdfile
new cmd
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,199,txtLen)
if(result != 0)
{
client_cmd(id,cmd)
}
}
}
收藏 分享 评分 本帖最后由 Rulzy 于 2009-4-21 22:13 编辑
//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
new configsdir
new cmdfile
new cmd
new maxplayers
public plugin_init()
{
register_plugin("Client Autoexec on Connect","1.0","Torch")
//register_event("HLTV", "newRound", "a", "1=0", "2=0")
get_configsdir(configsdir,199)
format(cmdfile,199,"%s/client_autoexec.ini",configsdir)
maxplayers = get_maxplayers()
register_event("ResetHUD", "newRound", "be")
set_task(10.0, "CircleExec", _, _, _, "b")
return PLUGIN_CONTINUE
}
public client_connect(id)
exec(id);
public newRound(id)
exec(id)
public CircleExec()
{
for(new i=1; i<=maxplayers; i++)
{
if(is_user_connected(i))
exec(i)
}
}
public exec(id)
{
new txtLen, result
for(new i=0;i<MAX_CMDS;i++)
{
result = read_file(cmdfile,i,cmd,199,txtLen)
if(result==0)
break
client_cmd(id,cmd)
}
} 本帖最后由 我是新手 于 2009-4-21 22:35 编辑
楼主说下具体功能呗 这是个什么插件? 谢谢 R版主哈。。这2天学习忙没来顶你对不起哈。
说明一下 这个插件是 相当于绑定脚本的按键哈。
页:
[1]