#pragma semicolon 1 #pragma newdecls required #include #include #include /* INTS */ int g_iBreak = 0; /* BOOLS */ bool g_bBreak = false; /* HANDLES */ Handle g_hBreak = null; /* FORWARDS */ GlobalForward g_hFwd_OnBreakStarted = null; GlobalForward g_hFwd_OnBreakFinished = null; GlobalForward g_hFwd_OnBreakCancelled = null; //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public Plugin myinfo = { name = "Break", author = "zaCade", description = "Allows for making breaks during events ect.", version = "1.0.0" }; //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public APLRes AskPluginLoad2(Handle hMyself, bool bLate, char[] sError, int iErrorSize) { CreateNative("Break_IsBreakActive", Native_IsBreakActive); RegPluginLibrary("Break"); return APLRes_Success; } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public void OnPluginStart() { g_hFwd_OnBreakStarted = new GlobalForward("Break_OnBreakStarted", ET_Ignore); g_hFwd_OnBreakFinished = new GlobalForward("Break_OnBreakFinished", ET_Ignore); g_hFwd_OnBreakCancelled = new GlobalForward("Break_OnBreakCancelled", ET_Ignore); RegAdminCmd("sm_break", Command_InitiateBreak, ADMFLAG_BAN); RegAdminCmd("sm_cancelbreak", Command_CancelBreak, ADMFLAG_BAN); } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public void OnMapEnd() { ResetVariables(); } //---------------------------------------------------------------------------------------------------- // Purpose: //---------------------------------------------------------------------------------------------------- public Action Command_InitiateBreak(int iClient, int iArgs) { if (iArgs < 1) { ReplyToCommand(iClient, "[SM] Usage: sm_break