AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Round Terminator (https://forums.alliedmods.net/showthread.php?t=121744)

Arkshine 03-19-2010 11:37

Round Terminator
 
3 Attachment(s)
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


Arkshine 03-19-2010 11:37

Re: Round Terminator
 
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.

ConnorMcLeod 03-19-2010 11:39

Re: Round Terminator
 
Useless :mrgreen:

papyrus_kn 03-19-2010 11:54

Re: Round Terminator
 
Yea, at last:)

KadiR 03-19-2010 12:21

Re: Round Terminator
 
Damn cool, nice job! :up:

More plugins with orpheu please :)

xPaw 03-19-2010 12:24

Re: Round Terminator
 
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 ) :arrow: if ( argumentCount < 3 )

Arkshine 03-19-2010 12:33

Re: Round Terminator
 
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.

xPaw 03-19-2010 12:37

Re: Round Terminator
 
Well, i see..

crazyeffect 03-19-2010 13:49

Re: Round Terminator
 
Nice one!

`666 03-26-2010 13:30

Re: Round Terminator
 
this is the best round end plugin <3


All times are GMT -4. The time now is 16:43.

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