round_terminator.inc
Original include source with line numbers.
| 1 | #if defined _round_terminator_included |
| 2 | #endinput |
| 3 | #endif |
| 4 | #define _round_terminator_included |
| 5 | |
| 6 | #pragma reqlib round_terminator |
| 7 | |
| 8 | |
| 9 | enum /* Round End Type */ |
| 10 | { |
| 11 | RoundEndType_Timer = 0, |
| 12 | RoundEndType_TeamExtermination, |
| 13 | RoundEndType_Objective, |
| 14 | RoundEndType_Draw |
| 15 | }; |
| 16 | |
| 17 | enum /* Team Winning */ |
| 18 | { |
| 19 | TeamWinning_None = 0, |
| 20 | TeamWinning_Terrorist, |
| 21 | TeamWinning_Ct |
| 22 | }; |
| 23 | |
| 24 | enum /* Map Type */ |
| 25 | { |
| 26 | MapType_AutoDetect = 0, |
| 27 | MapType_VipAssasination, |
| 28 | MapType_Bomb, |
| 29 | MapType_Hostage, |
| 30 | MapType_PrisonEscape |
| 31 | }; |
| 32 | |
| 33 | /** |
| 34 | * Force a round to end whatever the conditions. |
| 35 | * |
| 36 | * Here all the possibilities of this native, |
| 37 | * to avoid further questions : |
| 38 | * |
| 39 | * // Time is up / round draw. |
| 40 | * |
| 41 | * TerminateRound( RoundEndType_Timer ); |
| 42 | * TerminateRound( RoundEndType_Draw ); |
| 43 | * |
| 44 | * // One of the team has been exterminated. |
| 45 | * |
| 46 | * TerminateRound( RoundEndType_TeamExtermination, TeamWinning_Terrorist ); |
| 47 | * TerminateRound( RoundEndType_TeamExtermination, TeamWinning_Ct ); |
| 48 | * |
| 49 | * // The current map objective of the team has been completed. |
| 50 | * |
| 51 | * TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist ); |
| 52 | * TerminateRound( RoundEndType_Objective, TeamWinning_Ct ); |
| 53 | * |
| 54 | * // The provided map objective of the team has been completed. (will work only if the related entity is present) |
| 55 | * |
| 56 | * TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist, MapType_VipAssasination ); |
| 57 | * TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist, MapType_Bomb ); |
| 58 | * TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist, MapType_PrisonEscape ); |
| 59 | * TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_VipAssasination ); |
| 60 | * TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_Bomb ); |
| 61 | * TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_Hostage ); |
| 62 | * TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_PrisonEscape ); |
| 63 | * |
| 64 | * @param roundEndType The round end type you want to force. |
| 65 | * @param teamWinning The team winning if the round type end is either team extermination or objective. |
| 66 | * @param mapType The map type if there are severals objectives on the map. |
| 67 | */ |
| 68 | native TerminateRound( const roundEndType, const teamWinning = TeamWinning_None, const mapType = MapType_AutoDetect ); |