Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DisplayBanReasonMenu(int client)
- {
- Menu menu = new Menu(MenuHandler_BanReasonList);
- char title[100];
- Format(title, sizeof(title), "%T: %N", "Ban reason", client, g_BanTarget[client]);
- menu.SetTitle(title);
- menu.ExitBackButton = true;
- //Add custom chat reason entry first
- //menu.AddItem("", "Custom reason (type in chat)");
- //Loading configurable entries from the kv-file
- char reasonName[100];
- char reasonFull[255];
- //Iterate through the kv-file
- g_hKvBanReasons.GotoFirstSubKey(false);
- do
- {
- g_hKvBanReasons.GetSectionName(reasonName, sizeof(reasonName));
- g_hKvBanReasons.GetString(NULL_STRING, reasonFull, sizeof(reasonFull));
- //Add entry
- menu.AddItem(reasonFull, reasonName);
- } while (g_hKvBanReasons.GotoNextKey(false));
- //Reset kvHandle
- g_hKvBanReasons.Rewind();
- menu.Display(client, MENU_TIME_FOREVER);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement