#include <amxmodx>
#include <amxmisc>
new const PLUGIN[] = "Show Webpage"
new const VERSION[] = "2.0"
new const AUTHOR[] = "kiki"
new g_Web;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /web","web",0)
register_clcmd("say /weblap","web",0)
register_clcmd("say /net","web",0)
register_clcmd("say /bongeszo","web",0)
register_clcmd("say /internet","web",0)
register_clcmd("say_team /web","web",0)
register_clcmd("say_team /weblap","web",0)
register_clcmd("say_team /net","web",0)
register_clcmd("say_team /bongeszo","web",0)
register_clcmd("say_team /internet","web",0)
}
public plugin_cfg()
{
g_Web = menu_create("\rWeboldalak:","MENU_HANDLER");
menu_additem(g_Web,"\ index.hu","1",0);
menu_additem(g_Web,"\ kapu.hu","2",0);
menu_additem(g_Web,"\ origo.hu","3",0);
menu_additem(g_Web,"\ amxx.try.hu","4",0);
}
public web(id)
{
if(!is_user_connected(id)) return;
menu_display(id,g_Web,0);
}
public MENU_HANDLER(id,menu,item)
{
if(item == MENU_EXIT) return PLUGIN_HANDLED;
static data[10],iName[64],iAccess,callback;
menu_item_getinfo(menu,item,iAccess,data,9,iName,63,callback);
new key = str_to_num(data);
switch(key)
{
case 1: show_motd(id, "index.txt", "Index");
case 2: show_motd(id, "kapu.txt", "KAPU- A legjonn weblapok...");
case 3: show_motd(id, "origo.txt", "[origo]");
case 4: show_motd(id, "amxx.txt", "AMX MOD X Hungary");
}
return PLUGIN_HANDLED;
}