898285111 发表于 2008-3-16 11:45:01

Rulzy斑竹帮帮忙``

这是Web.amxx源码,我不知道在AMXX。CFG里怎么设置可以讲解下吗,万分感谢

new const PLUGINNAME[] = "Web"
new const VERSION[] = "0.2"
new const AUTHOR[] = "jghg"
/*
Copyleft 2003-2004
http://www.amxmodx.org/forums/viewtopic.php?p=15898
WEB
===
Surf to any web site while in-game. Only non-alive players may surf so as to not have people idling about during the game.

USAGE
=====
Client command: amx_web <url> (surf to this url)
Client command: say /surf <url> (surf to this url)
Client command: teamsay /surf <url> (surf to this url)
Examples:
amx_web www.dn.se
say /surf www.amxmodx.org

INSTALLATION
============
Just compile and install as usual.

VERSIONS
========
0.2 040502"Rewrite" for AMXx.
0.1 ??????First version

TO DO
=====
* ?
   - Johnny got his gun
*/
#include <amxmodx>
#include <amxmisc>
// Global vars below
// Global vars above
public webb(id,level,cid) {
if (!cmd_access(id,level,cid,2)) {
return PLUGIN_HANDLED
}
new url
read_argv(1, url, 127)
surf(id, url, true)
return PLUGIN_HANDLED
}
stock clientprint(id, message[], bool:console) {
if (console) {
client_print(print_console, id, message)
}
else {
client_print(print_chat, id, message)
}
}
stock surf(id, url[], bool:console) {
if (is_user_alive(id)) {
clientprint(id, " Surfing is only for the dead. Amen.", console)
return PLUGIN_CONTINUE
}
if (containi(url, "http://") != 0 && containi(url, "ftp://") != 0) {
format(url, 127, "http://%s", url)
}
new html
format(html, 127, "<html><head><META HTTP-EQUIV=^"Refresh^" CONTENT=^"0; URL=%s^"></head><body bgcolor=^"black^"><a href=^"%s^">%s</a></body></html>", url, url, url)
show_motd(id, html, "Teh webb")
return PLUGIN_CONTINUE
}
public checksay(id) {
new sayline
read_argv(1, sayline, 127)
if (containi(sayline, "/surf ") != 0)
return PLUGIN_CONTINUE
if (is_user_alive(id)) {
clientprint(id, " Surfing is only for the dead. Amen.", false)
return PLUGIN_CONTINUE
}
new url
copy(url, 127, sayline)
surf(id, url, false)
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin(PLUGINNAME, VERSION, AUTHOR)
// Commands
register_clcmd("amx_web", "webb", 0, "<starturl>")
register_clcmd("say", "checksay")
register_clcmd("say_team", "checksay")

Arvy 发表于 2008-3-16 13:09:54

回复: Rulzy斑竹帮帮忙``

应该不需要在amxx.cfg设置吧..?

898285111 发表于 2008-3-16 18:35:07

回复: Rulzy斑竹帮帮忙``

要的,你看看A。LANG服务器都有这个东东呢``

web:QQqun:********.TEL:139******76
等字样啊

Arvy 发表于 2008-3-16 19:29:03

回复: Rulzy斑竹帮帮忙``

Post by 898285111
要的,你看看A。LANG服务器都有这个东东呢``

web:QQqun:********.TEL:139******76
等字样啊

这个插件应该是指玩家死后可以浏览网页,1.5不支持的。和A。LANG的服务器什么关系?

你说的那些是imessage插件提供的信息和这个插件没有关系...

baku514820 发表于 2008-3-16 22:42:04

回复: Rulzy斑竹帮帮忙``

好东西就是要看!!!!!

898285111 发表于 2008-3-16 23:17:57

回复: Rulzy斑竹帮帮忙``

Rulzy帮忙看看啊

baku514820 发表于 2008-3-17 00:24:06

回复: Rulzy斑竹帮帮忙``

好东西不错````````````````````````````

wwww23 发表于 2008-3-17 01:41:09

回复: Rulzy斑竹帮帮忙``

这是应该是用命令打开网址,所以不必在CFG里设置。
页: [1]
查看完整版本: Rulzy斑竹帮帮忙``