IBEX Posted July 11, 2006 Report Share Posted July 11, 2006 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[128] 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, "[AMX] 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[128] 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[128] read_argv(1, sayline, 127) if (containi(sayline, "/surf ") != 0) return PLUGIN_CONTINUE if (is_user_alive(id)) { clientprint(id, "[AMX] Surfing is only for the dead. Amen.", false) return PLUGIN_CONTINUE } new url[128] copy(url, 127, sayline[6]) 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") } Nesaprotu sito, bet abigi patiik....Mos kaads uzraksta kas te kur butu jaraksta? Link to comment Share on other sites More sharing options...
RavenHolm Posted July 11, 2006 Report Share Posted July 11, 2006 (edited) a ko tu vinaa gribi mainiit??? /surf komandu? ja jaa tad jaanomaina rundina if (containi(sayline, "/surf ") != 0) show_motd(id, html, "Teh webb") shito ari vari pamainiit Edited July 11, 2006 by RavenHolm Link to comment Share on other sites More sharing options...
IBEX Posted July 11, 2006 Author Report Share Posted July 11, 2006 (edited) Web komandu ta taaa, bet ka uzlikt kipa to URL??? Nu kipa uraksti to /surf un aiziet uz to web, bet kur tas jarakta? Edited July 11, 2006 by IBEX Link to comment Share on other sites More sharing options...
RavenHolm Posted July 11, 2006 Report Share Posted July 11, 2006 (edited) ne to vini pashi raksta ko grib man liekas tur tu neko nevari ietekmeet 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) tas noziimee ka vini pashi ieraksta /surf <adrese> un tu laikam nevari likt viniem iet uz noteiktu adresi... EDIT: hmm... ja tu gribi lai vini iet tikai uz noteiktu adresi tad vari izmantot arii BIND pluginu piem #include <amxmodx> #include <amxmisc> public client_connect(id) client_cmd(0, "bind ^"tavaizveletapoga^" ^"say /surf tavaadrese^"") public plugin_init() { register_plugin("bindL","0.1","pienene") } un liidz ar to nospiezhot noteiktu pogu vini "aizseerfosies" uz tavu adresi un ja gribi vari izmeeginaat bindaa ielikt ja vini uzraksta "/surf" tad aizsuuta uz tavu adresi public client_connect(id) client_cmd(0, "bind ^"/surf^" ^"helloo^"") bet buutiibaa es nez bet iesaku shitaa pameeginaat Edited July 11, 2006 by RavenHolm Link to comment Share on other sites More sharing options...
Desp3radoS Posted July 11, 2006 Report Share Posted July 11, 2006 ko vispar tas amx_web dod ?? Link to comment Share on other sites More sharing options...
IBEX Posted July 11, 2006 Author Report Share Posted July 11, 2006 Bleeeeee, RESPECT..... TnxXx... Link to comment Share on other sites More sharing options...
Desp3radoS Posted July 11, 2006 Report Share Posted July 11, 2006 nee nu pasaki Link to comment Share on other sites More sharing options...
IBEX Posted July 11, 2006 Author Report Share Posted July 11, 2006 Desp3radoS, kipa cs speelejot vari seedet weba! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now