|
发表于 2008-9-30 01:28:25
|
显示全部楼层
来自 中国–广东–深圳
回复: 没有控制台的情况下用Y来发送控制台命令的格式是什么?
Post by 恋网物语
如题,以前好像看到过,找了半天没找到,有知道的吗?
[php]
register_clcmd("say","say_cmd",ADMIN_ALL,"cmd <command line> - Execute command from client")
public say_cmd(id)
{
new cmdline[256]
read_args(cmdline, 255)
remove_quotes(cmdline)
if (equal(cmdline,"cmd"))
{
console_print(id, "%L: say cmd <command line> - Execute command from client",id,"USAGE")
return PLUGIN_HANDLED
}
if (contain(cmdline,"cmd ")==0)
{
trim(cmdline[4])
if (cmdline[4])
client_cmd(id, cmdline[4])
else
console_print(id, "%L: say cmd <command line> - Execute command from client",id,"USAGE")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
[/php] |
|