AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Roundend Blocker (https://forums.alliedmods.net/showthread.php?t=85365)

Nextra 02-09-2009 09:18

Roundend Blocker
 
18 Attachment(s)
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

BeasT 02-09-2009 11:14

Re: Roundend Blocker
 
Nice. I'll try this with soccerjam.

vittu 02-09-2009 16:40

Re: Roundend Blocker
 
Can I ask what is different over Jim's version? (fixes/improvements/etc?)

Nextra 02-09-2009 16:57

Re: Roundend Blocker
 
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.

jim_yang 02-09-2009 21:20

Re: Roundend Blocker
 
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)

Emp` 02-10-2009 01:19

Re: Roundend Blocker
 
Quote:

Originally Posted by jim_yang (Post 759124)
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)

Nextra 02-10-2009 10:19

Re: Roundend Blocker
 
Quote:

Originally Posted by jim_yang (Post 759124)
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` (Post 759189)
Will do. (Leaving this in New Submissions for a little bit so people can see it)

Thanks for approval.


Small update.

niFe 02-10-2009 19:44

Re: Roundend Blocker
 
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!

Nextra 02-11-2009 08:12

Re: Roundend Blocker
 
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.

Nighty Nite 02-11-2009 10:04

Re: Roundend Blocker
 
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.


All times are GMT -4. The time now is 01:28.

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