Prevents players from exiting the safe-room until all players have connected and are ready. All features can be disabled so that its only function is providing forwards usable by other plugins.
Installation Instructions
Place readyup_ns.smx into your /plugins/ folder.
Place readyup.cfg , structures.cfg , and maplist.cfg in your /configs/readyup/ folder.
Structures placed in the structures.cfg file can be deleted or added to the map, and there are a few other configuration options outlined in the config file.
Edit the readyup.cfg to set the behaviour of the readyup plugin; you can set this plugin so that it doesn't do any game play modifications and only fires its forwards/natives.
Finally, edit maplist.cfg and add any non-vanilla campaigns using the format provided; readyup uses the first and last maps in a campaign to determine the state of the campaign.
Modules
Ready Up is comprised of a core plugin; Ready Up, as well as several optional modules.
Modules use the functions defined by the core plugin to extend its functionality.
Modules can require other modules, or simply work stand-alone, provided the core plugin still exists.
The design is in place to allow server owners to pick and choose what features they want.
Module Development
Module development is made easy with Ready Up, with the core plugin doing most of the leg work for you. If you're looking to create a module, the easiest way to get started is to take a look at how I've developed the current modules. With Ready Up, you can register custom commands, so that server owners can define the command string itself in a config file, without ever needing to edit the source code. For a full list of the custom functions, check out the .../include/readyup.inc file.
Description
This plugin is designed to prevent survivor players from leaving the safe-room prior to all clients loading into the game. Its actual features can be disabled so that the plugin only provides the unique forwards which can be used by other plugins. After all clients have loaded, an optional "ready up" phase begins.
Ready Up v3.x uses gametype-specific configs to load variables, making it even more flexible for servers that run multiple gametypes. The list of variables in the core plugin are listed below. This is a direct excerpt from the /configs/readyup/versus.cfg. If you wish to add configs for other gametypes, simply place as many configs in the folder as gametypes you wish to support. If I wanted to add coop for example, I would create /configs/readyup/coop.cfg.
Configs:
Configs for Ready up and its modules are found in the .../configs/readyup/ directory. A config is not generated in the .../cfg/sourcemod/ directory.
For Developers: I've constructed the archive exactly as needed for development purposes. Simply extract it and place the appropriate sourcemod development files into the /scripting/ and /scripting/include/ folders.
The following are the calls available in the readyup.inc
Spoiler
/*
* Called when the first client fully loads into the game.
* @noreturn
*/
forward ReadyUp_FirstClientLoaded();
/*
* Called when the saferoom door is OBLITERATED.
* @noreturn
*/
forward ReadyUp_SaferoomDoorDestroyed();
/*
* Called when the first client spawns, whether it's human or bot.
* @noreturn
*/
forward ReadyUp_FirstClientSpawn();
/*
* Called when all of the currently connected clients have fully loaded into the game.
* @noreturn
*/
forward ReadyUp_AllClientsLoaded();
/*
* Called when the Ready Up Period officially starts.
* @noreturn
*/
forward ReadyUp_ReadyUpStart();
/*
* Called when the Ready Up Period officially ends.
* @noreturn
*/
forward ReadyUp_ReadyUpEnd();
/*
* Called when the round ends. Does not fire in a failed mission in coop mode, instead see ReadyUp_CoopMapFailed.
*
* @param gamemode The gamemode type (0) Error (1) Coop (2) Versus (3) Survival
* @noreturn
*/
forward ReadyUp_RoundIsOver(int gamemode);
/*
* Called when the start of map saferoom door opens for the first time.
* @noreturn
*/
forward ReadyUp_CheckpointDoorStartOpened();
/*
* Called when the map transitions in coop gamemodes.
* @noreturn
*/
forward ReadyUp_CoopMapEnd();
/*
* Called when the finale of a campaign is completed.
* @noreturn
*/
forward ReadyUp_CampaignComplete();
/*
* Called when the round ends in coop due to a mission failure.
*
* @param gamemode The gamemode type (0) Error (1) Coop (2) Versus (3) Survival
* @noreturn
*/
forward ReadyUp_CoopMapFailed(int gamemode);
/*
* Called when the start of map Saferoom door is first locked.
* @noreturn
*/
forward ReadyUp_SaferoomLocked();
/*
* Called when a client fully loads into the game. This fires after OnClientPostAdminCheck
* and the load screen is no longer present for the user.
*
* @param client The userid of the player who has fully loaded.
* @noreturn
*/
forward ReadyUp_IsClientLoaded(int client);
/*
* Called when a ParsedConfig request has completed.
*
* @param key An adt_array holding all of the keys from a config file.
* @param value An adt_array holding all of the values from a config file.
* @noreturn
*/
forward ReadyUp_LoadFromConfig(Handle key, Handle value);
/*
* Called when a ParsedConfig request has completed.
*
* @param key An adt_array holding all of the keys from a config file.
* @param value An adt_array holding all of the values from a config file.
* @param section An adt_array holding the current section of the config being parsed.
* @noreturn
*/
forward ReadyUp_LoadFromConfigEx(Handle key, Handle value, Handle section, char[] configname, int KeyCount);
/*
* Called when ReadyUp_ParseConfig() fails to parse.
*
* @param config path of config that could not be parsed.
* @param error the error message explaining why the file failed to parse.
* @noreturn
*/
forward ReadyUp_ParseConfigFailed(char[] config, char[] error);
/*
* Called when a client uses one of the commands in the Ready Up Commands Library.
*
* @param client The userid of the player who used the command.
* @param command The string command the player used.
* @noreturn
*/
forward ReadyUp_Command(int client, char[] command);
/*
* Called when a plugin or player requests the commands in the Ready Up Commands Library.
*
* @param client The userid of the player who used the command.
* @param commands An adt_array holding all of the commands.
* @param descriptions An adt_array holding all of the commands descriptions.
* @param flags An adt_array holding all of the commands flags required.
* @noreturn
*/
forward ReadyUp_ListCommands(int client, Handle commands, Handle descriptions, Handle flags);
/*
* Called when a player actually disconnects from the server.
*
* @param client The userid of the player who disconnected.
* @noreturn
*/
forward ReadyUp_TrueDisconnect(int client);
/*
* Called when Ready Up is notified of a slot change by a module.
*
* @noreturn
*/
forward ReadyUp_SlotChangeNotice();
/*
* Called when Ready Up is notified of any player being denied entry into the server.
*
* @noreturn
*/
forward ReadyUp_FwdEntryDenied();
/*
* Called when Ready Up is sent a request for the header string.
*
* @param header The header string as defined in the readyup config.
* @noreturn
*/
forward ReadyUp_FwdGetHeader(const char[] header);
/*
* Called when Ready Up is notified of any player being allowed entry into the server.
*
* @param client The userid of the client who was allowed to enter the server.
* @noreturn
*/
forward ReadyUp_FwdEntryAllowed(int client);
/*
* Called when Ready Up is notified of any player being assigned to a team.
*
* @param client The userid of the client who was assigned to a team.
* @param team The team the client was assigned to.
* @noreturn
*/
forward ReadyUp_FwdTeamAssigned(int client, int team);
/*
* Called when a module asks Ready Up to send information to another module.
*
* @param nameConfig The name of the config of the target module.
* @param nameCommand The name of the command to send to the target module.
* @param value The value of the command to send to the target module.
* @noreturn
*/
forward ReadyUp_FwdCallModule(char[] nameConfig, char[] nameCommand, int value);
/*
* Called when a player connects to the server, this sets the minimum survivors that should exist.
*
*/
forward ReadyUp_SetSurvivorMinimum(int iMin);
/*
* Called when a plugin creates a companion.
*
*/
forward ReadyUp_CreateCompanion(int client, char[] CompanionName);
/*
* Called when a client joins a team.
*
* @param client The userid of the client who joined a team.
* @noreturn
*/
forward ReadyUp_FwdChangeTeam(int client, int team);
/*
* Called when friendly fire values are transferred across modules.
*
* @noreturn
*/
forward ReadyUp_FwdFriendlyFire(int client, int victim, int amount, int victimamount, int isfire, int bonusDamage);
/*
* Called on ReadyUp_NtvIsEmptyOnDisconnect().
*
* @noreturn
*/
forward ReadyUp_IsEmptyOnDisconnect();
/*
* Called when a module calls ReadyUp_NtvGetMapList from Ready Up requesting the maplist.cfg rotation information.
*
* @noreturn
*/
forward ReadyUp_FwdGetMapList(Handle MapList1, Handle MapList2, Handle MapListIdentifier, Handle MapListDescription);
/*
* Called when a module calls ReadyUp_NtvGetCampaignName from Ready Up requesting the current campaign name.
*
* @param description The name of the current campaign in rotation.
* @noreturn
*/
forward ReadyUp_FwdGetCampaignName(const char[] mapname);
/*
* Called when a plugin invokes a change to the maximum infected count.
*
* @param count The maximum infected count.
* @noreturn
*/
forward ReadyUp_SetInfectedBotLimit(int infectedCount);
/*
*
* Called when a group user request is sent
*
* @param client The client id
* @param groupStatus The status of membership (1 - member, 0 no member)
*/
forward ReadyUp_GroupMemberStatus(int client, int groupStatus);
/*
*
* For stat tracking plugins (receiving info)
*
* @param client The client id
* @param type The type of statistic to receive.
* @param amount The amount to add to the specified statistic type.
*/
forward ReadyUp_FwdStatistics(int client, int type, int amount);
/*
*
* When a survivor player enters the end of map checkpoint.
*
* @param client The client id
*/
forward ReadyUp_SurvivorEnteredCheckpoint(int client);
/*
*
* For stat tracking plugins (sending info)
*
* @param client The client id
* @param type The type of statistic to send out.
* @param amount The amount to add to the specified statistic type.
*/
native ReadyUp_NtvStatistics(int client, int type, int amount);
/*
* Call to request a users group status.
*
* @param client The client id
* @param groupStatus The clients group status
*/
native ReadyUp_NtvGroupMemberStatus(int client, int groupStatus);
/*
* Called when SKYRPG solo survivor handicap is locked into place.
*
* @param handicaplevel The handicap level of the player.
* @noreturn;
*/
native ReadyUp_NtvHandicapChanged(int handicaplevel);
/*
*
* 1 if it's the finale map
* 0 if it's the first map
* -1 if it's any map in between
*
*/
forward ReadyUp_GetCampaignStatus(int mapposition);
/*
*
* Called when a plugin needs to create a new companion for a survivor.
*
*/
native ReadyUp_NtvCreateCompanion(int client, char[] CompanionName);
/*
* Called when Ready Up is notified when a client controls a survivor.
*
* @param client The userid of the client who is now controlling the survivor.
* @noreturn
*/
native ReadyUp_FwdSurvivorControl(int client);
/*
* Called when a plugin requests to find out whether or not it's the last map of a given campaign.
*
* @noreturn
*/
native ReadyUp_NtvIsCampaignFinale();
/*
* Called to determine if any other configs are currently being processed.
* This is a test forward to see if it corrects the errors printed to log.
* @return 1 if currently processing, 0 if not processing.
*/
native ReadyUp_NtvConfigProcessing();
/*
* Called when friendly fire values are transferred across modules.
*
* @noreturn
*/
native ReadyUp_NtvFriendlyFire(int client, int victim, int amount, int victimamount, int isfire, int bonusDamage);
/*
* Checks whether or not the teams are flipped.
* @return True if the teams are flipped, false if they are not.
*/
native bool:ReadyUp_IsTeamsFlipped();
/*
* Lets readyup know the round failed due to a restartvote of some sort.
* @noreturn
*/
native ReadyUp_RoundRestartedByVote();
/*
* Attempts to parse the specified file path.
*
* @param config The name of the config. .../configs/readyup/ is the base path.
* @noreturn
*/
native ReadyUp_ParseConfig(char[] config);
/*
* Returns the current gamemode. (0) Error (1) Coop (2) Versus (3) Survival
* @noreturn
*/
native ReadyUp_GetGameMode();
/*
* Attempts to register a command in the Ready Up Commands Library.
*
* @param command The command string to register.
* @param description The command description.
* @param flags The flags required to use the command.
* @return True if successful, otherwise false.
*/
native ReadyUp_RegisterCommand(char[] command, char[] description, int flags);
/*
* Attempts to unregister a command in the Ready Up Commands Library.
*
* @param command The command string to unregister.
* @return True if successful, otherwise false.
*/
native ReadyUp_RemoveCommand(char[] command);
/*
* Calls the ReadyUp_ListCommands forward.
*
* @param client The userid of the player who used the command.
* @noreturn
*/
native ReadyUp_GetCommands(int client);
/*
* Called when a module notifies Ready Up of a slot change.
*
* @noreturn
*/
native ReadyUp_SlotChangeSuccess();
/*
* Calls the ReadyUp_FwdGetHeader forward when a module requests the header string.
*
* @noreturn
*/
native ReadyUp_NtvGetHeader();
/*
* Calls the ReadyUp_FwdEntryDenied forward when a module notifies Ready Up of a player being denied entry to the server.
*
* @noreturn
*/
native ReadyUp_NtvEntryDenied();
/*
* Calls the ReadyUp_FwdEntryAllowed forward when a module notifies Ready Up of a player being allowed entry to the server.
*
* @param client The userid of the player who was allowed entry.
* @noreturn
*/
native ReadyUp_NtvEntryAllowed(int client);
/*
* Calls the ReadyUp_FwdTeamAssigned forward when a module notifies Ready Up of a player being assigned to a team.
*
* @param client The userid of the client who was assigned to a team.
* @param team The team the client was assigned to.
* @noreturn
*/
native ReadyUp_NtvTeamAssigned(int client, int team);
/*
* Calls the ReadyUp_FwdChangeTeam forward when a module REQUESTS that a players team change.
* Any module using the assigned forward can manage teams, such as the playerplus module.
*
* @param client The userid of the client who wants to change teams.
* @param team The team the client wants to change to.
* @noreturn
*/
native ReadyUp_NtvChangeTeam(int client, int team);
/*
* Calls the ReadyUp_FwdSurvivorControl forward when a module notifies Ready Up when a client controls a survivor.
*
* @param client The userid of the client who is now controlling the survivor.
* @noreturn
*/
native ReadyUp_NtvSurvivorControl(int client);
/*
* Calls the ReadyUp_FwdCallModule forward when a module asks Ready Up to send information to another module.
*
* @param nameConfig The name of the config of the target module.
* @param nameCommand The name of the command to send to the target module.
* @param value The value of the command to send to the target module.
* @noreturn
*/
native ReadyUp_NtvCallModule(char[] nameConfig, char[] nameCommand, int value);
/*
* Calls the ReadyUp_FwdGetMapList forward which sends the maplist.cfg rotation to any modules that use the information.
*
* @noreturn
*/
native ReadyUp_NtvGetMapList();
/*
* Calls the ReadyUp_FwdGetCampaignName forward which sends the current campaign name to any modules that use the information.
*
* @noreturn
*/
native ReadyUp_NtvGetCampaignName();
__________________
if you want it, you can do it, you can have it
Last edited by Skyy; 07-06-2024 at 11:41.
Reason: update to new syntax
Inside the zip folder, there is only logs/scripting/translations - and inside of scripting is a "compiled" folder. Do I upload the compiled folder "as is"... or simply remove the .smx plugin and upload that into the plugins folder?
EDIT: I went ahead and extracted the .smx from the compiled folder and uploaded that separately into the plugins folder. Showing as loaded/working in sm plugins list.
Is someone able to let me know what's wrong with my settings? This is my config file below, yet even when everyone is in "ready" mode - nobody can move and rdyup does not end.
Quote:
// This file was auto-generated by SourceMod (v1.4.5-dev)
// ConVars for plugin "readyup.smx"
// The time to wait after ready up ends to force the checkpoint door to open.
// -
// Default: "20.0"
readyup_checkpointdoor_forceopen "60.0"
// If 0.0, all players must have loaded for ready up to start, otherwise forces ready up after this many seconds, even if all players are not fully loaded.
// -
// Default: "60.0"
readyup_connect_timeout "60.0"
// If enabled, infected players will be frozen during the ready up period.
// -
// Default: "0"
readyup_freeze_infected "0"
// If enabled, players are frozen during ready up. If not, the door is locked until ready up ends. Players are always frozen on the first map of a campaign.
// -
// Default: "0"
readyup_freeze_players "0"
// If 0.0, all players MUST ready up to start, otherwise starts when all players have loaded, after this many seconds.
// -
// Default: "60.0"
readyup_freeze_time "0.0"
// If enabled, the hud will be hidden and the ready up period will last its entire time frame.
// -
// Default: "0"
readyup_hidehud "0"
// If enabled, alltalk will be enabled after a round ends and before ready up begins.
// -
// Default: "1"
readyup_intermission_alltalk "1"
// If enabled, the players still loading will be displayed in the menu panel, otherwise a hint text will display the number remaining.
// -
// Default: "0"
readyup_loadingplayers_menudisplay "0"
// If enabled, the round will start as soon as all clients have loaded, or the connection timeout (if applicable) is called.
// -
// Default: "0"
readyup_norup "0"
// If enabled, alltalk will be enabled after a round ends and until ready up ends. Overrides intermission alltalk if enabled.
// -
// Default: "0"
readyup_pregame_alltalk "0"
// If set to 0, there will not be a ready up period before the second round begins.
// -
// Default: "1"
readyup_ready_halftime "1"
// If enabled, players cannot use the spectate command.
// -
// Default: "1"
readyup_spectator_disabled "1"
// The time in seconds before the plugin forces spectators to be ready if they are not. Overridden if all non spectators ready up.
// -
// Default: "10"
readyup_spectatorready_force "20"
// If enabled, players can share their throwables with another player by shoving another survivor.
// -
// Default: "1"
readyup_throwables "0"
However, I've written one that I feel is superior to it; it's the Locked End Of Map Saferoom module. It's included in the zip file and titled rum_antirush. If you have any problems let me know.
v2.6
- optimized code
- logs folder now creates and plugin shoots an error if it doesn't exists and fails to create the folder.
- changed how safe room door protection is handled.
Skyy, do you have any plans to separate the preparation time for regular campaign and survival mode? When paired with fort spawner, this plugins's cooldown time for survival is a bit inadequate in that I have to set the same amount of time in survival as in campaign.
For building servers, it might be more appropriate to set a separate, customizable time cvar for survival maps (i.e. 5 minutes before round starts).
I had never coded this in as an option, since I used my team manager plugin in conjunction with it, which then handled which config was loaded based on game type. However, if you're in a position where you would be unable to use team manager, I can always add in a cvar split for survival modes. (The perks to team manager having different configs completely for each game type that you list in its config file is you can completely change the value of all cvars, as in survival, you may want a continuous timer for ready up period where players cannot ready up and must wait the entire period, as forcing the ready up screen would make it difficult to build.)