Code: Select all
public Vote() { new title[64] formatex(title, charsmax(title), "\r%L", LANG_PLAYER, "TITLE") g_fVoteMenu = menu_create(title, "voteVV"); new itemOn[10], itemOff[10] formatex(itemOn, charsmax(itemOn), "%L", LANG_PLAYER, "MENU_ITEM_ON") formatex(itemOff, charsmax(itemOff), "%L", LANG_PLAYER, "MENU_ITEM_OFF") menu_additem(g_fVoteMenu, itemOn) menu_additem(g_fVoteMenu, itemOff) new pplayers[32], ppnum, ptempid; get_players(pplayers, ppnum, "ch"); for( new i; i<ppnum; i++ ){ ptempid = pplayers[i] client_print(ptempid, print_chat, "%s %L", PREFIX, LANG_PLAYER, "PICK") menu_display(ptempid, g_fVoteMenu, 0) } set_task(10.0, "EndVote" return PLUGIN_HANDLED}