AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D] Loading Bug Removal/ Door Lock (https://forums.alliedmods.net/showthread.php?t=93423)

drow 05-28-2009 16:53

[L4D] Loading Bug Removal/ Door Lock
 
5 Attachment(s)
L4D Loading

This plugin makes it impossible to start the round as long connected players are still loading into the game. As soon all players are in-game the safe room door is locked for a short time to let the infected team find a proper spot. A timer is displayed and unlocks the door when it is done.

This plugin provides functionality to:
  • stop players from rushing out while others are still loading
  • enable the infected team to find proper spots
  • locks safe room door on all campaign chapters 2 to 5
  • freezes survivors on chapter 1 (see ConVar l4d_freezeOn1st)
  • moves afk players to spectators when the countdown is stopped or running (see l4d_afkTime)
  • scrim mode (ready-up instead of timer or a combination; see l4d_scrimMode, l4d_scrimMasters, l4d_scrimType)
  • change campaign after game end instead of return to lobby (see l4d_autoCycleCampaigns)
  • updates the config file when ConVars are changed

Commands
Admin (KICK flag):
  • sm_cdstop - Stops the countdown
  • sm_cdstart - Starts the countdown
  • sm_force - Force round start (cancel countdown/ waiting)
  • setnext - Set the next campaign
  • sm_scrim - Toggle scrim mode
  • sm_await_spawn - Toggle await spawn
Public:
  • callvote Scrim <type> - Displays a scrim mode vote and restarts the campaign (see callvote Scrim help for details on type)
  • callvote Campaign - Displays a next campaign vote
ConVars
  • l4d_loadingVersion - The version of this plugin
  • l4d_freezeOn1st - Freeze survivors on first chapter (0 = no, 1 = freeze survivors until all players have loaded; 2 = use countdown like on the other chapters)
  • l4d_prepare1st - Wait this many seconds after all clients have loaded before starting first round on a map
  • l4d_prepare2nd - Wait this many seconds after all clients have loaded before starting second round on a map
  • l4d_prepareScrim - Wait this many seconds after all clients are ready until going live (first chapter)
  • l4d_afkTime - Wait this many seconds while countdown is stopped or running before moving a client to spectators
  • l4d_timeout - Wait this many seconds after a map starts before giving up on waiting for a client (timeout)
  • l4d_scrim - Activate scrim mode; players have to type !ready or !rdy in chat to unlock the door, use !urdy or !unready to reset ready state (new ready-up on next round)
  • l4d_scrimMasters - How many players have to set ready state on each team to start a round in scrim mode
  • l4d_scrimType - Set the type of scrim match (match = players ready-up on start of match, then each round is started by the default timer; map = players ready-up on each map, second round is started by a timer; round = players ready-up on each round)
  • l4d_infectedSpawn - Wait for infected to be ready to spawn before starting countdown
  • l4d_autoCycleCampaigns - Change to a new campaign after a game is finished (0 = return to lobby; 1 = cycle through campaigns in map folder; 2 = campaign vote on start of chapter five)
  • l4d_gameModeActive - Set the game mode for which the plugin should be activated (same usage as sv_gametypes, i.e. add all game modes where you want it active separated by comma)
  • l4d_displayMode - Set the display mode how the countdown will be displayed (hint = countdown is displayed in hint messages; center = countdown is displayed in the screen center; chat = countdown is displayed in the chat)
By setting the prepare times to 0 the round will be started immediately after all players have loaded into the game.

INSTALLATION
  • Place l4d_loading.smx into addons/sourcemod/plugins

Note: This plugin is probably incompatible with any other plugins that prevent players from rushing out, so you should probably avoid using those other plugins. Support for survival mode or custom maps is not tested at the moment, if you find a bug related to that, please report.

CHANGELOG
  • 1.1.0 - Initial release
  • 2.0.0 - Major update
    • feature: campaign vote or forced loop through those saved on map folder
    • feature: changed ConVars will be saved to config file
    • feature: scrim mode
    • feature: afk detection
    • feature: freezing survivors on the first chapter
    • convar: l4d_freezeOn1st sets the type of freezing survivors on the first chapter
    • convar: l4d_prepareScrim sets time to wait until going live
    • convar: l4d_afkTime sets the time to wait before moving a player to spectators
    • convar: l4d_scrim scrim mode flag
    • convar: l4d_scrimMaster sets the number of players to ready-up
    • convar: l4d_scrimType sets the type of scrim mode
    • convar: l4d_infectedSpawn await infected spawning flag
    • convar: l4d_autoCycleCampaigns sets the mode for forcing a new campaign
    • convar: l4d_gameModeActive sets the game modes for which the plugin should be active
    • convar: l4d_displayMode sets the display mode of the countdown
    • command: force to cancel the timer and force the round to start
    • command: setnext to set the campaign to play after the current game ends
    • command: callvote Scrim <type> to enable/ disable scrim mode
    • command: callvote Campaign to display a next campaign vote
    • bugfix: several bugfixes
  • 2.0.1 - Minor update
    • bugfix: players/ bots kept being frozen randomly
    • bugfix: repopulating the world used wrong values on modded servers

Thraka 05-28-2009 18:13

Re: L4D Loading
 
Very cool! I like it! I don't have as fast of a machine as other and I hate getting into a game and they are outside (because they aren't buddies and just normal pubbers that don't care) getting killed.

Thraka 05-28-2009 18:21

Re: L4D Loading
 
I would change the commands sm_start and sm_stop because it's way too generic. sm_round_begin_start \stop maybe?

I was also looking at your code and the method IsCountDownStoppedOrRunning seems named strangely. Isn't either stopped or running? Do you mean active? Or inactive?

Felycity 05-28-2009 21:38

Re: L4D Loading
 
seems good plugin!
can you add same function for first chapter?

Thraka 05-28-2009 22:35

Re: L4D Loading
 
Yeah, at least lock everyone down until everyone is loaded or X seconds pass, then unlock (just on first chapter) you can set a server to skip the intro btw. This means people move around even quicker than normal.

drow 05-29-2009 05:37

Re: L4D Loading
 
Quote:

Originally Posted by Thraka (Post 836891)
I would change the commands sm_start and sm_stop because it's way too generic. sm_round_begin_start \stop maybe?

I was also looking at your code and the method IsCountDownStoppedOrRunning seems named strangely. Isn't either stopped or running? Do you mean active? Or inactive?

Yes sure can change the naming of the commands and make em less generic, just been after something short mainly for developing. If you had a look at the code you should have seen that there are two other functions related to this one. They either return if the countdown is running (some number), stopped (-1) or one of both. If the countdown is deactivated on round start or finished (i.e. the round started) its value is 0.

Quote:

Originally Posted by Felycity (Post 836999)
seems good plugin!
can you add same function for first chapter?

Quote:

Originally Posted by Thraka (Post 837026)
Yeah, at least lock everyone down until everyone is loaded or X seconds pass, then unlock (just on first chapter) you can set a server to skip the intro btw. This means people move around even quicker than normal.

It would not be a problem to add some freezing of players on the first map. Actually the plugin's current version contains some more stuff already, which just is not tested properly yet. There will be an update containing the new features soon.

Downtown1 05-29-2009 23:16

Re: L4D Loading
 
Code:

                decl String:clientName[128];
                GetClientName(client, clientName, sizeof(clientName));

                Format(clientName, sizeof(clientName), "%s (%s)", clientName, auth);

                PrintToChatAll("Player %s connected", clientName);

Same thing but with 1 line
Code:

                PrintToChatAll("Player %N (%s) connected", client, auth);

Poheart 05-30-2009 00:54

Re: L4D Loading
 
That Great!
Thanks for your nice plugins:)
Installed.

drow 05-30-2009 01:17

Re: L4D Loading
 
Downtown1: That's right, didn't update the old code according to that yet. Would get me rid of some lines.

Thraka 06-01-2009 12:58

Re: L4D Loading
 
I've been using this, it's been great. :)

The center screen chat display is very small for me though (and others that I asked). Is there a way to change the size of that text? (This may be a normal SM config change, I'm not familiar with it)


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

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