#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Free menu"
#define VERSION "1.0"
#define AUTHOR "Blak Rajder"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "menu_pokaz", "a", "1=0", "2=0")
}
public menu_pokaz(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
new menu = menu_create("Menu Free", "menu_handler")
menu_additem(menu, "Free", "1", 0)
menu_additem(menu, "Normalnie", "2", 0)
menu_setprop(menu, MPROP_EXITNAME, "Wyjscie")
menu_display(id, menu, 0)
}
}
public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED;
}
new data[6], iName[64]
new acces, callback
menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:{
client_cmd(id, "say /free")
client_print(id, print_center, "Wybrales free!")
menu_destroy(menu)
}
case 2:{
client_print(id, print_center, "Wybrales gre normalna!")
menu_destroy(menu)
}
}
menu_destroy(menu)
return PLUGIN_CONTINUE;
}
?