simulator 发表于 2005-1-17 13:55:36

【感谢olol老大】浏览网页+死后自动浏览指定页面的插件!

基于 f117bomb 的web_browse 1.4 由 olol 老大修改为玩家死后打开指定网页

下面是原码,For AMX0.99,再次谢谢olol老大!

/* AMX Mod script.
*
* (c) Copyright 2005, f117bomb&olol
* This file is provided as is (no warranties).
*/

#include <amxmod>
#include <amxmisc>

/*
* Commands:
* say /browse <url>
* amx_browse <url> - Opens specified website
* amx_whois <authid, nick or #userid> - Looks up player by steamid on steamid.elite-pimps.com
* amx_whoisteam <team name> - Looks up team on steamid.elite-pimps.com
*
* Usage:
* amx_browse http://forum.dt-club.net
* say /browse http://forum.dt-club.net
* say /browse http2://forum.dt-club.net
* say /browse http://forum.dt-club.net
* say /browse http://forum.dt-club.net
* amx_whois player (Looks up player by steamid on steamid.elite-pimps.com)
* amx_whois #11 (Looks up player by steamid on steamid.elite-pimps.com)
* amx_whoisteam 3d (Looks up team on steamid.elite-pimps.com)
*/

new default_website[] = "http://forum.dt-club.net"
new default_title[] = "DT Web Browser"

public plugin_init() {
register_plugin("Web Browser","1.5","f117bomb&olol")
register_event("DeathMsg", "start_dg", "a")
register_concmd("amx_browse","amx_browse",0,"<url> - Opens specified website")
register_concmd("amx_whois","amx_whois",0,"<authid, nick or #userid> - Looks up player by steamid on steamid.elite-pimps.com")
register_concmd("amx_whoisteam","amx_whoisteam",0,"<team name> - Looks up team on steamid.elite-pimps.com")
register_clcmd("say","event_say")
return PLUGIN_CONTINUE
}

public amx_browse(id, level, cid) {

new url, temp
read_argv(1,url,31)
if( contain(url, "://")!=-1 )
url ? show_motd(id, url, default_title) : show_motd(id, default_website, default_title)
else {
format(temp, 63, "http://%s",url)
url ? show_motd(id, temp, default_title) : show_motd(id, default_website, default_title)
}
client_cmd(id, "escape")

show_motd(id, temp, default_title)
return PLUGIN_HANDLED
}

public amx_whois(id, level, cid) {

if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new arg1
read_argv(1,arg1,31)

new player = cmd_target(id,arg1,10)
if (!player)
return PLUGIN_HANDLED

new authid, name, url, title
get_user_authid(player, authid, 31)
get_user_name(player, name, 31)
replace(authid,31, "STEAM_0", "0")
format(url, 127, "http://steamid.elite-pimps.com/?action=search&type=single&key=steamid&query=%s",authid)
format(title, 63, "Lookup For Player: %s",name)
show_motd(id, url, title)

client_cmd(id, "escape")

return PLUGIN_HANDLED
}

public amx_whoisteam(id, level, cid) {

if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new arg1, url, title
read_argv(1,arg1,31)

format(url, 127, "http://steamid.elite-pimps.com/?action=search&type=single&key=team&query=%s",arg1)
format(title, 63, "Lookup For Team: %s",arg1)
show_motd(id, url, title)

client_cmd(id, "escape")

return PLUGIN_HANDLED
}

public start_dg() {
new pv = read_data(2)
client_cmd(pv,"amx_browse http://forum.dt-club.net")
}

public event_say(id) {

new text, cmd, url, temp
read_args(text,63)
remove_quotes(text)
parse(text, cmd, 31, url, 31)

if(equal(cmd, "/browse") || equal(cmd, "/web")) {
if( contain(url, "://")!=-1 )
url ? show_motd(id, url, default_title) : show_motd(id, default_website, default_title)
else {
format(temp, 63, "http://%s",url)
url ? show_motd(id, temp, default_title) : show_motd(id, default_website, default_title)
}
}

return PLUGIN_CONTINUE
}

BoeZombie 发表于 2005-1-17 14:28:21

那下一局开始后,玩家还得手动关闭网页吧?多耽误时间

所以还需要设为 当一局结束,马上自动关闭web页。

simulator 发表于 2005-1-17 14:53:57

恩,那样就更完美了! :20:

simulator 发表于 2005-1-17 17:32:03

感谢olol老大实现了我需要的功能!

yym 发表于 2005-1-17 17:53:26

把你老大给你的源代码提供给我们呀

yym 发表于 2005-1-17 17:53:59

要amxx1.0 的哦

simulator 发表于 2005-1-17 17:57:57

老大只给了我amx0.99的。。。

我也没有用AMXX。。。。

BoeZombie 发表于 2005-1-17 21:30:26

那现在能自动关闭马???

总觉得强行让玩家看网页,效果不好,人家愿意看吗?

两厢情愿才完美。

lzlxqs 发表于 2005-1-17 21:44:04

感觉是:不能强人所难!!!
不是吗????

BoeZombie 发表于 2005-1-17 23:06:10

死了---看网页---新一局开始---先关网页---再买枪....好位置都让敌人占了...

楼主的服务器公布一下吧

让有条件的,进去感觉一下。
页: [1] 2 3
查看完整版本: 【感谢olol老大】浏览网页+死后自动浏览指定页面的插件!