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

Roundend Blocker


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Emp` (115)
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 02-09-2009 , 09:18   Roundend Blocker
Reply With Quote #1

Roundend Blocker by Nextra
( block round end dm no round end deathmatch round end roundendblocker reb )

.: Description
This plugin creates fake bots in both teams to prevent the ending of rounds, normally occuring because every player on the map died. It is only useful in a deathmatch environment where all players respawn infinitely.

.: Features
- Two bots automatically join the game when only a few players are on the map
- The bots automatically leave the game as more players join the game
- Bots are shown as spectators on the scoreboard, and are far away from the battlefield (and also invisible and not solid) so they don't cause confusion and can't be killed
- Fakefull mode.
In Fakefull mode bots will always be on the server. They will connect on startup when
no players are online and will only leave when the playercount reaches plrmax.
If this mode is disabled the bots will not connect on startup and will disconnect
when they are not needed anymore (all players disconnected).
.: Cvars
reb_enable <0|1> - 0 = Disable, 1 = Enable the plugin
reb_plrmax - When the playercount (only players in a team) reaches this value, kick the bots
reb_plrmin - When the playercount goes below this value, add the bots
reb_fakefull <0|1> - 0 = Disable, 1 = Enable fakefull mode
reb_fullkick <0|1> - 0 = Bots stay on the server even if full, 1 = Last slot will stay free, bots will be kicked
reb_name1 "" - Sets the name for the first bot
reb_name2 "" - Sets the name for the second bot
reb_team <0|1|2> - Sets the team for the bots
- 0 will split them equally between T and CT
- 1 will make them join T only
- 2 does the same for CT
.: Required Modules
- CStrike
- FakeMeta
- HamSandwich
.: Note
Due to a recent change the bots will no longer reconnect if there is no player on the server and all bots are kicked in rapid succession. I am assuming that doing so requires the intention of having no bots on the server so I do not consider this an issue I have to fix. It is more important to have no crashes around.

.: Credits
- Thanks to jim_yang, he created the original roundend_blocker on which my version is based on. He allowed me to submit my recode of this to the public

.: Changelog ( latest changes )
* 1.1.065
- Replaced preThink hook by TeamInfo message hook for better efficiency. Thanks to Empowers.
- Added fullkick cvar to make all bots stay on the server even if it's full. Suggestion by Empowers.

* 1.1.100
- Now caching is_user_connected
- IsValidPlayer: Function -> macro
- New variable reb_team to limit the bots to only one team.
- Hopefully fixed occurences where bots were not being hidden properly.


.: Servers running the latest version :.
.: Servers running any version :.

.: Downloads:
2270+ :.


Please strongly consider using Arkshine's Infinite Round plugin. There is no reason not to use Orpheu or Infinite Rounds. If you don't want to use Orpheu - consider again, and only then use this! I'm serious.
https://forums.alliedmods.net/showthread.php?t=117782
Attached Files
File Type: sma Get Plugin or Get Source (roundend_blocker.sma - 6190 views - 12.5 KB)

Last edited by Nextra; 03-27-2014 at 06:06.
Nextra is offline
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 02-09-2009 , 11:14   Re: Roundend Blocker
Reply With Quote #2

Nice. I'll try this with soccerjam.
BeasT is offline
Send a message via Skype™ to BeasT
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 02-09-2009 , 16:40   Re: Roundend Blocker
Reply With Quote #3

Can I ask what is different over Jim's version? (fixes/improvements/etc?)
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 02-09-2009 , 16:57   Re: Roundend Blocker
Reply With Quote #4

Jim's version often caused crashes, that is the main reason for the rewrite, and to fix these out there are (considering that the plugin is relatively small) a lots of changes in how everything but the very basic create mechanic is done and executed.
There are some differences in when and how the bots are added/kicked, and it is furthermore possible to easily deactivate the plugin by a cvar mid-game.
Also the bots are spawned instantly after creation to avoid some weird things I discovered when playtesting.
Then there's one cosmetical thing: I decided to hide the bots on the scoreboard when a player opens his scoreboard the first time so I don't have to rely on tasks which never really did what I personally wanted to achieve.
Also my version is coded with flexibility in mind. As you can see you are able to easily change the amount of Bots through constants in the header of the code and you don't have to change a single line in the code itself. It could even be used as a fake-full-style plugin in that respect.

If you only look at the very very base mechanics there is not much of a difference, of course, but I think this is useful to everybody as a bug-free (as far as I have tested it in the recent months) version of a RoundendBlocker did not exist here.
Anyways, if anyone (esp. jim) thinks that this is not enough to justify a new plugin I will respect this decision and take it back.

regards.

Last edited by Nextra; 02-09-2009 at 17:08.
Nextra is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 02-09-2009 , 21:20   Re: Roundend Blocker
Reply With Quote #5

Nice to see this, good job. For some reason, I can't test my gametime related plugin, so I can't support my reb anymore.
Finally, hope this get approved and I'll ask my reb unapproved then.(maybe the approver of this plugin could unapporve my reb directly, thx)
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 02-10-2009 , 01:19   Re: Roundend Blocker
Reply With Quote #6

Quote:
Originally Posted by jim_yang View Post
Nice to see this, good job. For some reason, I can't test my gametime related plugin, so I can't support my reb anymore.
Finally, hope this get approved and I'll ask my reb unapproved then.(maybe the approver of this plugin could unapporve my reb directly, thx)
Will do. (Leaving this in New Submissions for a little bit so people can see it)
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 02-10-2009 , 10:19   Re: Roundend Blocker
Reply With Quote #7

Quote:
Originally Posted by jim_yang View Post
Nice to see this, good job. For some reason, I can't test my gametime related plugin, so I can't support my reb anymore.
Finally, hope this get approved and I'll ask my reb unapproved then.(maybe the approver of this plugin could unapporve my reb directly, thx)
Glad to hear that, thanks for your support.

Quote:
Originally Posted by Emp` View Post
Will do. (Leaving this in New Submissions for a little bit so people can see it)
Thanks for approval.


Small update.

Last edited by Nextra; 02-10-2009 at 14:57.
Nextra is offline
niFe
Senior Member
Join Date: Apr 2008
Location: Planet Green
Old 02-10-2009 , 19:44   Re: Roundend Blocker
Reply With Quote #8

hmm need ham module... i might stay with jims even though it bugs.... if anyone can come up with the fixed version of jim that doesnt require ham module, will be great!
__________________
niFe is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 02-11-2009 , 08:12   Re: Roundend Blocker
Reply With Quote #9

You do not desperately need it. I don't see why this is a problem and why you prefer server crashes over a module require, but you can remove the two lines resposible for the require.

PHP Code:
if( !is_user_aliveBotID ) )
    
ExecuteHamBHam_CS_RoundRespawnBotID ); 
Search these two lines, remove them and it will still work. In some situations, however, this will cause some minor issues. Maybe a dllfunc spawn is also possible because they are only fake clients.
Nextra is offline
Nighty Nite
Junior Member
Join Date: Jan 2009
Location: Arcanum, Ohio
Old 02-11-2009 , 10:04   Re: Roundend Blocker
Reply With Quote #10

Ha ha I love this plugin.. Now if someone could make the bot join and play or leave an another come in its place like real ppl do.
Nighty Nite 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 03:45.


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