有能使客户端定时执行命令的插件吗?
因为有一些广告,所以想让所有玩家定时执行一些命令,比如:say /motd
amx_browse
有这个插件吗?
:burn:
回复: 有能使客户端定时执行命令的插件吗?
按Y或U输入/motd :rolleyes::spiderman:boss:回复: 有能使客户端定时执行命令的插件吗?
二楼好人呀!!!谢谢回复: 有能使客户端定时执行命令的插件吗?
Post by liuzd因为有一些广告,所以想让所有玩家定时执行一些命令,比如:
say /motd
amx_browse
有这个插件吗?
:burn:
我有amx下的,使用方法:
在你的amx.cfg中加入下面语句:
amx_task time "command" flags
标志:
m - 分钟
s - 秒
r - 重复任务
t - 指定时间(0:00-23:59, 假定已经有 "r" 标志)
For example to restart the round every 5 minutes use:
举例:每5分钟restart一次
amx_task 5 "sv_restart 1" mr
回复: 有能使客户端定时执行命令的插件吗?
附件传不上来,直接写出来吧。/* AMX Mod script. (Nov 10th, 2002)
*
* Task Scheduler 0.2
*by JustinHoMi
*
* amx_task time "task" flags
* flags:
*m - time is in minutes
*s - time is in seconds
*r - repeat task
*t - specific time
*
*/
#include <amxmod>
new task_cmds
new task_times
new numtasks = 0
public load_task()
{
if (read_argc() < 4) {
server_print(" Usage:amx_task < time > ^"command^" < flags >")
return PLUGIN_HANDLED
}
new args
read_args(args,128)
new time, cmd, flags
parse(args,time,6,cmd,108,flags,5)
new Float:time_f = floatstr(time)
new flag = ""
if (contain(flags,"r") != -1)
flag="b"
if (contain(flags,"m") != -1)
time_f = time_f * 60
if (contain(flags,"t") != -1)
{
copy(task_cmds,108,cmd)
copy(task_times,6,time)
numtasks++
return PLUGIN_HANDLED
}
set_task(time_f,"run_task",0,cmd,108,flag)
return PLUGIN_CONTINUE
}
public run_task(cmd[])
{
server_cmd(cmd)
return PLUGIN_HANDLED
}
public check_time()
{
new curtime
get_time("%H:%M",curtime,16)
for(new i=0; i<numtasks; i++)
if(equal(curtime,task_times))
server_cmd(task_cmds)
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin("Task Scheduler","0.2","JustinHoMi")
register_srvcmd("amx_task","load_task")
set_task(60.0,"check_time",1,"",0,"b")
return PLUGIN_CONTINUE
} 你 确定这个 能用 ????命令怎么 写 。,都 说明白啊 ,看不懂
页:
[1]