Code: Select all
new const gszBlockClassname[] = "bm_block";
new const gszSpriteClassname[] = "bm_sprite";
new const gszTeleportStartClassname[] = "bm_teleport_start";
new const gszTeleportEndClassname[] = "bm_teleport_end";
enum
{
TELEPORT_START,
TELEPORT_END
};
enum
{
BM_PLATFORM, //A
BM_BHOP, //B
BM_DAMAGE, //C
BM_HEALER, //D
BM_NOFALLDAMAGE, //I
BM_ICE, //J
BM_SPEEDBOOST, //H
BM_INVINCIBILITY, //E
BM_STEALTH, //F
BM_DEATH, //K
BM_CAMOUFLAGE, //M
BM_LOWGRAVITY, //N
BM_FIRE, //O
BM_SLAP, //P
BM_RANDOM, //Q
BM_HONEY, //R
BM_BARRIER_CT, //S
BM_BARRIER_T, //T
BM_BOOTSOFSPEED, //U
BM_GLASS, //V
BM_BHOP_NOSLOW, //W
BM_DELAYEDBHOP, //$
BM_FADE, // <
BM_USP, // 6
BM_DEAGLE, // #
BM_HE, // Y
BM_SMOKE, // Z
BM_FLASH, // !
BM_AWP, // @
BM_TRAMPOLINE_LOW, // =
BM_TRAMPOLINE_MID, // G
BM_TRAMPOLINE_HIGH, // )
BM_LIGHT, // (
BM_NOFALLDAMAGEBHOP, // 4
BM_DUCK, // 9
BM_MONEY, // 7
BM_SUPERMAN, //8
BM_XP // &
};
enum
{
NORMAL,
GLOWSHELL,
TRANSCOLOR,
TRANSALPHA,
TRANSWHITE
};
new const gszBlockNames[gBlockMax][39] =
{
"Platform",
"Bunnyhop",
"Damage",
"Healer",
"No Fall Damage",
"Ice",
"Speed Boost",
"Invincibility",
"Stealth",
"Death",
"Camouflage",
"Low Gravity",
"Fire",
"Slap",
"Random",
"Honey",
"CT Barrier",
"T Barrier",
"Boots Of Speed",
"Glass",
"Bunnyhop (No slow down)",
"Delayed Bhop",
"Blind (Trap)",
"Usp (Block)",
"Deagle (Block)",
"He Grenade",
"Frost Grenade",
"Flash Grenade",
"Awp (Block)",
"Trampoline (Low)",
"Trampoline",
"Trampoline (High)",
"Light",
"No Fall Damage (Bhop)",
"Duck",
"Money",
"Superman",
"XP Block"
};
// save IDs
new const gBlockSaveIds[gBlockMax] =
{
'A', 'B', 'C', 'D', 'I', 'J', 'H', 'E', 'F', 'K', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', '$', '<', '6', '#', 'Y', 'Z', '!', '@', '=', 'G', ')', '(', '4', '9', '7', '8', '&'
};
const gTeleportSaveId = '*';
//global array of strings to store the paths and filenames to the block models
new gszBlockModels[gBlockMax][256];
//array of blocks that the random block can be
const gRandomBlocksMax = 6;
new const gRandomBlocks[gRandomBlocksMax] =
{
BM_INVINCIBILITY,
BM_STEALTH,
BM_DEATH,
BM_CAMOUFLAGE,
BM_SLAP,
BM_BOOTSOFSPEED
};
//max speed for player when they have the boots of speed
const Float:gfBootsMaxSpeed = 400.0;
//how many pages for the block selection menu
new gBlockMenuPagesMax;
/***** PLUGIN START *****/
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar(PLUGIN, VERSION, FCVAR_SERVER, 0.0);
//register client commands
register_clcmd("say /bm", "showMainMenu");
register_clcmd("+bmgrab", "cmdGrab", BM_ADMIN_LEVEL, "bind a key to +bmgrab");
register_clcmd("-bmgrab", "cmdRelease", BM_ADMIN_LEVEL);
//register forwards
register_forward(FM_EmitSound, "forward_EmitSound");
//create the menus
createMenus();
//register menus
register_menucmd(register_menuid("bmMainMenu"), gKeysMainMenu, "handleMainMenu");
register_menucmd(register_menuid("bmBlockMenu"), gKeysBlockMenu, "handleBlockMenu");
register_menucmd(register_menuid("bmBlockSelectionMenu"), gKeysBlockSelectionMenu, "handleBlockSelectionMenu");
register_menucmd(register_menuid("bmTeleportMenu"), gKeysTeleportMenu, "handleTeleportMenu");
register_menucmd(register_menuid("bmOptionsMenu"), gKeysOptionsMenu, "handleOptionsMenu");
register_menucmd(register_menuid("bmChoiceMenu"), gKeysChoiceMenu, "handleChoiceMenu");