infinite_round.inc
Original include source with line numbers.
| 1 | /* |
| 2 | │ Author : Arkshine |
| 3 | │ Plugin : Infinite Round |
| 4 | │ Version : v2.1.1 |
| 5 | |
| 6 | Support : http://forums.alliedmods.net/showthread.php?t=120866 |
| 7 | |
| 8 | This plugin is free software; you can redistribute it and/or modify it |
| 9 | under the terms of the GNU General Public License as published by the |
| 10 | Free Software Foundation; either version 2 of the License, or (at |
| 11 | your option) any later version. |
| 12 | |
| 13 | This plugin is distributed in the hope that it will be useful, but |
| 14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this plugin; if not, write to the Free Software Foundation, |
| 20 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | */ |
| 22 | |
| 23 | #if defined _infinite_round_included |
| 24 | #endinput |
| 25 | #endif |
| 26 | #define _infinite_round_included |
| 27 | |
| 28 | #pragma reqlib infinite_round |
| 29 | |
| 30 | |
| 31 | enum RoundEndType ( <<= 1 ) |
| 32 | { |
| 33 | RoundEndType_RoundTimeExpired = 1, // a 1 |
| 34 | RoundEndType_BombExploded, // b 2 |
| 35 | RoundEndType_BombDefused, // c 4 |
| 36 | RoundEndType_HostagesRescued, // d 8 |
| 37 | RoundEndType_VipEscaped, // e 16 |
| 38 | RoundEndType_VipAssassinated, // f 32 |
| 39 | RoundEndType_TerroristWin, // g 64 |
| 40 | RoundEndType_CTWin, // h 128 |
| 41 | RoundEndType_RoundDraw, // i 256 |
| 42 | RoundEndType_TerroristsEscaped, // j 512 |
| 43 | RoundEndType_CTsPreventEscape, // k 1024 |
| 44 | }; // * 2047 |
| 45 | |
| 46 | const RoundEndType:RoundEndTypes_Bomb = RoundEndType_BombExploded | RoundEndType_BombDefused; |
| 47 | const RoundEndType:RoundEndTypes_Vip = RoundEndType_VipEscaped | RoundEndType_VipAssassinated; |
| 48 | const RoundEndType:RoundEndTypes_Team = RoundEndType_TerroristWin | RoundEndType_CTWin; |
| 49 | const RoundEndType:RoundEndTypes_Prison = RoundEndType_TerroristsEscaped | RoundEndType_CTsPreventEscape; |
| 50 | const RoundEndType:RoundEndTypes_Others = RoundEndType_HostagesRescued | RoundEndType_RoundDraw; |
| 51 | |
| 52 | const RoundEndType:Invalid_RoundEndType = RoundEndType:0; |
| 53 | const RoundEndType:RoundEndType_None = Invalid_RoundEndType; |
| 54 | const RoundEndType:RoundEndType_All = RoundEndType - RoundEndType:1; |
| 55 | |
| 56 | /** |
| 57 | * @brief Called when a round ends. |
| 58 | * |
| 59 | * @note You can block a round end happening by returning PLUGIN_HANDLED. |
| 60 | * Blocking from the forward supercedes always the ir_block_roundend cvar value. |
| 61 | * |
| 62 | * @param type The type of round end. See RoundEndType constants. |
| 63 | */ |
| 64 | forward OnRoundEnd( const RoundEndType:type ); |
| 65 | |
| 66 | /** |
| 67 | * @brief Set what round end to block. Same behavior as 'ir_block_roundend' cvar. |
| 68 | * |
| 69 | * @param type The type of round end. See RoundEndType constants. |
| 70 | * @noreturn |
| 71 | */ |
| 72 | native SetBlockingRoundEnd( const RoundEndType:type ); |