Raised This Month: $32 Target: $400
 8% 

Round Terminator


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related        Approver:   Hawk552 (427)
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2010 , 11:37   Round Terminator
Reply With Quote #1

Round Terminator
- v1.0.1, last updated : 14 apr 2010

Simple and efficient way to force a round to end.
It does not kill players. The way is direct.

All the default win conditions are supported :
  • The timer has ended ;
  • A whole team is exterminated ;
  • An objective has been completed ;
  • A round draw.
All the default objectives are supported :
  • Bomb/Defuse ;
  • Hostage Rescue ;
  • Vip/Assasination ;
  • Prison Escape.
A command is provided and can handle also these specific cases :
  • Maps with multiple objectives ;
  • Dynamic entities managed by another plugin.
A command is provided to manage easily all the conditions.
A native is provided to be used in others plugins.

People may need to terminate a round automatically, but it would be more appropriate
to let the people integrating the native in their plugins, instead of trying to implement
a feature with conditions since the needs can be very different.

Contents :

Requirements top
CS 1.6, CZ.
AMX Mod X 1.8.x or higher.
Orpheu 2.3 and higher.
Steam server.

Command top
  • terminate_round <RoundEndType> [ <TeamWinning> <MapType> ]

    The command works with keywords for each fields.

    Tip1 : only the first character is checked ( except for timer/team the 2 first ).
    Tip2 : typing the command without argument and you will get the command syntax and the arguments list.

    RoundEndType
    - timer : The timer has ended. The main objectives has not been completed.
    - team : A team has been exterminated. You must specify the winning team you want.
    - objective : An objective has been completed or not. You must specify the winning team you want.
    - draw : To have a round draw.
    TeamWinning
    - terrorist : Specify the terrorists as winning team of the round.
    - ct : Specify the cts as winning team of the round.

    It must be used either with "team" or "objectives".
    MapType
    - auto : Value by default. It will detect the current objective. It will work for custom entities created in game.
    - bomb : Specify the type as bomb map without checking.
    - hostage : Specify the type as hostage map without checking. Only for cts.
    - vip : Specify the type as vip map without checking. Will work only if there is a VIP in game.
    - escape : Specify the type as escape map without checking.

    Optional. If you specify a type and the entity is not present, nothing will happen.
    Useful for maps with multiple objectives.

    To avoid further questions, here all the possibilities of this command :

    Time is up / round draw.
    terminate_round timer
    terminate_round draw
    One of the team has been exterminated.
    terminate_round team terrorist
    terminate_round team ct
    The current map objective of the team has been completed.
    terminate_round objective terrorist
    terminate_round objective ct
    The provided map objective of the team has been completed. (will work only if the related entity is present)
    terminate_round objective terrorist vip
    terminate_round objective terrorist hostage
    terminate_round objective terrorist escape
    terminate_round objective ct vip
    terminate_round objective ct bomb
    terminate_round objective ct hostage
    terminate_round objective ct escape

API Documentation top
  • TerminateRound( const roundEndType, const teamWinning = TeamWinning_None, const mapType = MapType_AutoDetect );

    A native is provided to be used in others plugin.
    To avoid further questions, here all the possibilities of this native :

    Time is up / round draw.
    TerminateRound( RoundEndType_Timer );
    TerminateRound( RoundEndType_Draw );
    One of the team has been exterminated.
    TerminateRound( RoundEndType_TeamExtermination, TeamWinning_Terrorist );
    TerminateRound( RoundEndType_TeamExtermination, TeamWinning_Ct );
    The current map objective of the team has been completed.
    TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist );
    TerminateRound( RoundEndType_Objective, TeamWinning_Ct );
    The provided map objective of the team has been completed. (will work only if the related entity is present)
    TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist, MapType_VipAssasination );
    TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist, MapType_Hostage );
    TerminateRound( RoundEndType_Objective, TeamWinning_Terrorist, MapType_PrisonEscape );
    TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_VipAssasination );
    TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_Bomb );
    TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_Hostage );
    TerminateRound( RoundEndType_Objective, TeamWinning_Ct, MapType_PrisonEscape );

Installation top
1. Firstly, you need Orpheu. You have just to unzip the content of orpheu_base.zip in ./amxmodx/ ;
2. Then unzip the content of the provided archive here in ./amxmodx/ ;
3. Install the plugin*, restart and it's ready.


* You need to compile locally the plugin or using this webcompiler since it uses third party includes from Orpheu and my plugin.

If you don't know how to compile locally on windows :
  1. Download AMX Mod X Base for windows on the main site ;
  2. Unzip the package somewhere in a folder ;
  3. From the orpheu_base.zip package you have downloaded just before, copy the include files located in ./scripting/include/ to the folder created in 2. in ./addons/amxmodx/scripting/include/ ;
  4. Download round_terminator.inc and copy it to ./addons/amxmodx/scripting/include/ too ;
  5. Download round_terminator.sma and copy it in ./addons/amxmodx/scripting/ ;
  6. Now go to ./addons/amxmodx/scripting/ and drag and drop round_terminator.sma on compile.exe ;
  7. You will see a new folder named "compiled" which is automatically created. It contains round_terminator.amxx ;
  8. Congratulations, you have your compiled plugin, you can install it on your server. Restart and it's ready.

Installation Files top

Attached Files
File Type: sma Get Plugin or Get Source (round_terminator.sma - 13751 views - 32.6 KB)
File Type: inc round_terminator.inc (2.4 KB, 7483 views)
File Type: zip [signatures]round_terminator.zip (11.1 KB, 9660 views)
__________________

Last edited by Arkshine; 04-21-2010 at 05:22.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2010 , 11:37   Re: Round Terminator
Reply With Quote #2

Notes top

Change Log top
v1.0.1 : [ 14 apr 2010 ]
Added : A native 'TerminateRound()' is now provided to be used in others plugins. It will be more neat than the command.
Changed : g_pGameRules is not used anymore because the sig was not enough reliable. The object is now retrieved from InstallGameRules().
v1.0.0 : [ 19 mar 2010 ]
Initial release.
__________________

Last edited by Arkshine; 04-14-2010 at 19:04.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-19-2010 , 11:39   Re: Round Terminator
Reply With Quote #3

Useless
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
papyrus_kn
Senior Member
Join Date: Feb 2009
Location: Bulgaria
Old 03-19-2010 , 11:54   Re: Round Terminator
Reply With Quote #4

Yea, at last
__________________
papyrus_kn is offline
Send a message via Skype™ to papyrus_kn
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-19-2010 , 12:21   Re: Round Terminator
Reply With Quote #5

Damn cool, nice job!

More plugins with orpheu please
KadiR is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-19-2010 , 12:24   Re: Round Terminator
Reply With Quote #6

Finally, nice

Now make round end force if map doesn't have any objectives (where it doesn't round end after timer 0:00)
terminate_round timer/objective didn't end the round on map without obj.

- terminate_round team xx doesn't add the +1 to the team score //EDIT: just looked, and it only adds if both teams has a player
- 4th param doesn't seem to really work with 'objective'
if ( argumentCount != 3 ) if ( argumentCount < 3 )
__________________

Last edited by xPaw; 03-19-2010 at 12:31.
xPaw is offline
Old 03-19-2010, 12:30
Arkshine
This message has been deleted by Arkshine. Reason: later
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-19-2010 , 12:33   Re: Round Terminator
Reply With Quote #7

For map without objectives, use "team". I think it's logic no?

The score is not updated if you are alone on your server, it's the default CS behavior.

The last param, it works but you need to have obviously the entities present. If you do "obj ct hostages" without having the related entity ( rescue zone ), nothing will happen.
__________________

Last edited by Arkshine; 03-19-2010 at 12:35.
Arkshine is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-19-2010 , 12:37   Re: Round Terminator
Reply With Quote #8

Well, i see..
__________________
xPaw is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 03-19-2010 , 13:49   Re: Round Terminator
Reply With Quote #9

Nice one!
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
`666
AlliedModders Donor
Join Date: Jan 2006
Old 03-26-2010 , 13:30   Re: Round Terminator
Reply With Quote #10

this is the best round end plugin <3
`666 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode