Last active
December 20, 2015 14:29
-
-
Save underyx/6146771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sourcemod> | |
public Plugin:myinfo = | |
{ | |
name = "---", | |
author = "---", | |
description = "---", | |
version = "---", | |
url = "---" | |
}; | |
public OnPluginStart() | |
{ | |
RegConsoleCmd("sm_choosecfg", Show_CFGMenu); | |
} | |
public CFGMenu(Handle:menu, MenuAction:action, param1, param2) | |
{ | |
if (action == MenuAction_Select) | |
{ | |
decl String:info[32]; | |
GetMenuItem(menu, param2, info, sizeof(info)); | |
if (StrEqual(info, "bball2v2")) {ServerCommand("exec bball2on2");} | |
else if (StrEqual(info, "bball3v3")) {ServerCommand("exec bball3on3");} | |
else if (StrEqual(info, "goombaon")) {ServerCommand("exec goombaon");} | |
else if (StrEqual(info, "goombaoff")) {ServerCommand("exec goombaoff");} | |
else if (StrEqual(info, "restart")) {ServerCommand("exec restart");} | |
} | |
else if (action == MenuAction_End) | |
{ | |
CloseHandle(menu); | |
} | |
} | |
public Action:Show_CFGMenu(client, args) | |
{ | |
new Handle:menu = CreateMenu(CFGMenu); | |
SetMenuTitle(menu, "Choose CFG"); | |
AddMenuItem(menu, "bball2v2", "BBall 2v2"); | |
AddMenuItem(menu, "bball3v3", "BBall 3v3"); | |
AddMenuItem(menu, "goombaon", "Goomba Mode On"); | |
AddMenuItem(menu, "goombaoff", "Goomba Mode Off"); | |
AddMenuItem(menu, "restart", "Restart"); | |
SetMenuExitButton(menu, true); | |
DisplayMenu(menu, client, 20); | |
return Plugin_Handled; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment