Author
|
|
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
|
Plugin ID:
|
6631
|
Plugin Version:
|
1.17
|
Plugin Category:
|
General Purpose
|
Plugin Game:
|
Left 4 Dead
|
Plugin Dependencies:
|
|
Servers with this Plugin:
|
|
| |
Plugin Description:
|
Vote for game difficulty
|
|
|
07-05-2019
, 04:28
[L4D1 & L4D2] Vote difficulty + (no black screen)
|
#1
|
Description: This plugin replaces annoing black screen vote for difficulty by translucent menu with ability to execute per-difficulty configs.
Features: - no black screen.
- vote announcement
- flexible configuration of access rights
- ability to execute your own config files per each difficulty
- ability to reset convars by executing your own default config file before difficulty is applied
- all actions are logged (who vote - ip/country/nick/SteamId, who tried to vote witout success, what difficulty ...)
- ability to setup 2 additional difficulty levels "Hard +" and "Expert +" with their own config files (see ConVars).
Permissions:- by default, vote can be started by everybody (adjustable) if immunity and player count checks passed.
- ability to set minimum time to allow repeat the vote.
- ability to set minimum players count to allow starting the vote.
- ability to block specific user by name (mask) or SteamId from using the vote functionality.
Vote block file:- data/votedifficulty_vote_block.txt
Logfile location:- logs/vote_difficulty.log
Settings (ConVars):can be found in: cfg/sourcemod/sm_votedifficulty.cfg
PHP Code:
// Minimum delay (in sec.) allowed between votes
sm_votedifficulty_delay "60"
// How long (in sec.) does the vote last
sm_votedifficulty_timeout "10"
// Delay (in sec.) between announce and vote menu appearing
sm_votedifficulty_announcedelay "2.0"
// Minimum players present in game to allow starting vote
sm_votedifficulty_minplayers "1"
// Admin flag required to start the vote (leave empty to allow for everybody)
sm_votedifficulty_accessflag ""
// Use logging? (1 - Yes / 0 - No)
sm_votedifficulty_log "1"
// Add new difficulty 'Master +' ? (1 - Yes / 0 - No)
sm_votedifficulty_use_master_plus "0"
// Add new difficulty 'Expert+' ? (1 - Yes / 0 - No)
sm_votedifficulty_use_expert_plus "0"
// Use separate configs per each default difficulties ? (1 - Yes / 0 - No)
sm_votedifficulty_use_config_per_dif "1"
// Do we need to set default difficulty when the server get restarted? (1 - Yes, 0 - No)
sm_votedifficulty_default_set "0"
// Default difficulty to use when the server get restarted (you must remove z_difficulty ConVar from server.cfg)
sm_votedifficulty_default_difficulty "Easy"
Commands:
PHP Code:
// Try to start vote for difficluty
sm_vd
// Allow admin to veto current vote (ADMFLAG_BAN is required)
sm_veto
// Allow admin to bypass current vote (ADMFLAG_BAN is required)
sm_votepass
Requirements: - GeoIP extension (included in SourceMod).
If you enabled "Hard+" and "Expert+" difficulties, you need create own config files for them (so they get any sense):- сfg/server_hard+.cfg
- сfg/server_expert+.cfg
Also, you have ability to execute separate cfg for each default difficulty:- cfg/server_easy.cfg
- cfg/server_normal.cfg
- cfg/server_hard.cfg
- cfg/server_expert.cfg
Also, this default config is automatically executed before set any new difficulty:* all empty cfg files are included in archive's attachment in "cfg/sourcemod" folder (just in case, for skeleton)
Note: When you vote for "Hard+", only server_hard+.cfg is executed (not server_hard.cfg), same for impossible (expert).
Natives, Forwards, IPC:
PHP Code:
// ConVar, allowing to set a hook on, to understand current extended game difficulty name
// Possible values (read only):
// Easy
// Normal
// Hard
// Hard+
// Impossible
// Impossible+
z_difficulty_ex "<default value>" (read only!)
Languages: - Russian
- English
Installation: - unpack attached archive in "game root folder/game name" as is.
- (optional) create desired configs within per-difficulty config files in cfg/sourcemod folder.
TODO: - Support for listen servers [Need help]
FAQ:Q: How to preserve voted difficulty for the next map?
A: Remove "z_difficulty" ConVar from your cfg/server.cfg file.
References- [L4D1 & L4D2] Votekick (no black screen)
- [L4D1 & L4D2] Vote difficulty (no black screen)
- [L4D1 & L4D2] Votemute (no black screen)
- [L4D1 & L4D2] Map changer with rating system (no black screen)
DonateDonates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon (Paypal)
- BitCoin
- Ю.Money
P.S.: - Project and updates discontinued. Don't ask.
__________________
Last edited by Dragokas; 03-03-2023 at 07:20.
|
|
|
|