[L4D2] Advanced Deathmatch
Description:
This plugin will introduce the Deathmatch (All vs All) gameplay into Left 4 dead 2. There are a few other plugins that do the same as this one, but dont get confused, here is a list of features:
Features:
-
Weapon Manager: You will be able to configure every single weapon and its damage towards other survivors. It's possible to add special abilities for each weapon, such as instant incapacitation, vomit after hit, create one explosion, etc. The plugin will also delete idle weapons after they are dropped.
Pipe bombs will make survivors Fling (Tank punched animation) if they are too close and survive (Pipe bombs are really powerfull). Also, vomit jars will bile enemy survivors. Defibrillator will allow extra speed when a survivors equips it and uses it (+attack). Pills will refill a survivor's weapon upon usage.
-
Boost System: There are some selectable boost for each survivors that are available. These boost can only be selected 1 per live, and they will be stored on the database (If available).
-
Customisation: You can customise the Map Cycle for the game, block and play music and sounds for the survivors, mod all weapons damage and ammo and you can even edit the respawn locations of every map.
-
Reward System: Certain events will be rewarded with special abilities, such as spawning tanks, witches, hordes, special infected, explosive gnomes, planting bombs, vomiting everybody and more. The system works with reward points which are highly customisable.
-
Logic Manager: There are a few protections and timers that will be watching the gameplay. This logic manager controls the respawn timing, the scripts files, the safeguards timers to prevent the end of the map, map changer, etc.
-
Achievements:Custom achievements when you complete certain events, for example, killing somebody else within a huge distance. On the next plugin update you will be able to customise all achievements as you want.
-
Database and SQL support: The plugin is able to connect to any given database and store all the player's settings and gameplay stats. There will be also a web-site interface o nthe future.
-
More and more: There are more features on the plugin that weren't described and are awaiting you to test them out. Give it a try!
-Auto Respawn: Survivors will auto respawn after they die.
NOTE: This plugin requires a SQL (or MySQL) database to store the settings and stats of every player. However, it is not required to make the plugin work, so you can run it without a functional database.
Dependencies
-This plugin requires
Stripper:Source for map obstacles.
-This plugin requires
SDK Hooks Extension for weapon enhancer
Cvars:
A config file will be generated at cfg/sourcemod folder.
Code:
// This file was auto-generated by SourceMod (v1.3.4)
// ConVars for plugin "l4d2_deathmatch.smx"
// Should the plugin execute a survival script if available?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_allow_survival_relay "1"
// Should the plugin spawn a bunch of weapons on the center of the map?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_allow_weapon_arsenal "1"
// Enable automatic startup. If disabled, and admin will have to type !deathmatch to start the game
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_auto "1"
// Allow Extra Damage boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_extradamage "1"
// Allow Extra Health boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_extrahealth "1"
// Allow Extra Speed boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_extraspeed "1"
// Allow Fast Combat boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_fastcombat "1"
// Allow God Mode boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_god "1"
// Allow Insta Melee Kills boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_instamelee "1"
// Allow Insta Respawn boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_instaspawn "1"
// Allow Meidc boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_medic "1"
// Allow Fire Immunity boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_nofire "1"
// Allow No Grenade Launcher Inca boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_noincap "1"
// Allow Spawn Spitter On Death boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_spitter "1"
// Allow Stalker boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_stalker "1"
// Allow Upgrade boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_upgrade "1"
// Allow Vomit On Death boost?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_boostsystem_allow_vomit "1"
// Additional Damage for 'Extra Damage' boost (DEF: 10dmg + (10dmg * 2.0) = 30 dmg)
// -
// Default: "2"
l4d2_deathmatch_boostsystem_amount_damage "2"
// Minimum amount of health to allow Fast Combar boost (DEF: 30HP)
// -
// Default: "30"
l4d2_deathmatch_boostsystem_amount_fastcombat "30"
// How long should the God Mode boost last (DEF: 8 seconds)
// -
// Default: "8"
l4d2_deathmatch_boostsystem_amount_god "8"
// Additional health for 'Extra Health' boost (DEF: 100+90 = 190)
// -
// Default: "90"
l4d2_deathmatch_boostsystem_amount_health "90"
// Additional Speed for 'Extra Speed' boost(DEF: 1.0+0.4 = 1.4)
// -
// Default: "0.4"
l4d2_deathmatch_boostsystem_amount_speed "0.4"
// How long should the Stalker boost last (DEF: 8 seconds)
// -
// Default: "8"
l4d2_deathmatch_boostsystem_amount_stalker "8"
// Should Defibrilators increase players speed?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_defib_extra_speed "1"
// How long should the deathmatch game last? (In Seconds)
// -
// Default: "512"
l4d2_deathmatch_duration "512"
// How long should the warm up or waiting mode last before starting deathmatch? (In Seconds)
// -
// Default: "90"
l4d2_deathmatch_duration_waiting "90"
// Enable the Deathmatch Game (This won't uninstall it completely)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_enable "1"
// Duration of the explosion's fire trace
// -
// Default: "15"
l4d2_deathmatch_explosion_duration "15"
// Power of the reward explosion
// -
// Default: "2000"
l4d2_deathmatch_explosion_power "2000"
// Radius of the reward explosion
// -
// Default: "500"
l4d2_deathmatch_explosion_radius "500"
// Should the plugin force players to fall if they are hanging?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_nohang "1"
// Should Pain Pills refill a players weapon?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_pills_refill "1"
// Should Pipe Boms be stronger?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_pipebomb_stronger "1"
// Allow random map when the game is over
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_random_map "0"
// Interval between death and respawn
// -
// Default: "5"
l4d2_deathmatch_respawn_interval "5"
// How many points do the Bomb (Get down!) reward cost?
// -
// Default: "15"
l4d2_deathmatch_rewardsystem_cost_bomb "15"
// How many points do the Gnome (Take it please) reward cost?
// -
// Default: "30"
l4d2_deathmatch_rewardsystem_cost_gnome "30"
// How many points do the Grenade Launcher (Who rules now?) reward cost?
// -
// Default: "45"
l4d2_deathmatch_rewardsystem_cost_luancher "45"
// How many points do the SI Pack (I love pets) reward cost?
// -
// Default: "35"
l4d2_deathmatch_rewardsystem_cost_pack "35"
// How many points do the Panic Event (Here they come!) reward cost?
// -
// Default: "18"
l4d2_deathmatch_rewardsystem_cost_panic "18"
// How many points do the Tank (We have to fight THAT?) reward cost?
// -
// Default: "45"
l4d2_deathmatch_rewardsystem_cost_tank "45"
// How many points do the Vomit All (Dont wear a white suit) reward cost?
// -
// Default: "25"
l4d2_deathmatch_rewardsystem_cost_vomit "25"
// How many points do the Witch (My ex-wife!) reward cost?
// -
// Default: "20"
l4d2_deathmatch_rewardsystem_cost_witch "20"
// Minimum distance to get the 'DISTANCE REAPER' achievement, points, score and announcement
// -
// Default: "1000"
l4d2_deathmatch_rewardsystem_distance "1000"
// How long should the okayer last to get the 'ENDURANCE FIGHTER' achievement, points, score and announcement
// -
// Default: "90"
l4d2_deathmatch_rewardsystem_endurance "90"
// How many points do the player get if he kills a Bot Player?
// -
// Default: "0"
l4d2_deathmatch_rewardsystem_points_botkill "0"
// How many points do the player get if he kills a player with fire? (Note: This will also be added to the points he gets by killing a single player)
// -
// Default: "2"
l4d2_deathmatch_rewardsystem_points_burningkill "2"
// How many points do the player get if he kills another player within a huge distance? (Note: This will also be added to the points he gets by killing a single player)
// -
// Default: "7"
l4d2_deathmatch_rewardsystem_points_distancekill "7"
// How many points do the player get if he last a long time
// -
// Default: "15"
l4d2_deathmatch_rewardsystem_points_endurance "15"
// How many points do the player get if he kills another player right after he respawned? (Note: This will also be added to the points he gets by killing a single player)
// -
// Default: "5"
l4d2_deathmatch_rewardsystem_points_fastkill "5"
// How many points do the player get if he kills a Human Player?
// -
// Default: "1"
l4d2_deathmatch_rewardsystem_points_humankill "1"
// How many points do the player get if he incapacitates a player with a grenade launcher?
// -
// Default: "0"
l4d2_deathmatch_rewardsystem_points_launcher "0"
// How many points do the player get if he makes another player to hang from the ledge?
// -
// Default: "10"
l4d2_deathmatch_rewardsystem_points_ledgehang "10"
// How many points do the player get if he kills a Linked Special Infected (Reward SI)?
// -
// Default: "2"
l4d2_deathmatch_rewardsystem_points_linked_special "2"
// How many points do the player get if he kills a Linked Tank (Reward Tank)?
// -
// Default: "20"
l4d2_deathmatch_rewardsystem_points_linked_tank "20"
// How many points do the player get if he kills a Linked Witch(Reward Witch)?
// -
// Default: "7"
l4d2_deathmatch_rewardsystem_points_linked_witch "7"
// How many points do the player get if he kills a Linked Witch(Reward Witch) with a single shot?
// -
// Default: "15"
l4d2_deathmatch_rewardsystem_points_linked_witch_single "15"
// How many points do the player get if he kills a specific amount of players on one live
// -
// Default: "10"
l4d2_deathmatch_rewardsystem_points_rowkill "10"
// How many points do the player get if he kills a player with a single melee shot? (Note: This will also be added to the points he gets by killing a single player)
// -
// Default: "0"
l4d2_deathmatch_rewardsystem_points_singlehit "0"
// How many points do the player get if he kills another player on Invisible State (Note: This will also be added to the points he gets by killing a single player)
// -
// Default: "5"
l4d2_deathmatch_rewardsystem_points_stalkerkill "5"
// How many points do the player get if he kills a player with his Tank? (Note: This will also be added to the points he gets by killing a single player)
// -
// Default: "1"
l4d2_deathmatch_rewardsystem_points_tankkill "1"
// How many points do the player get if he kills a Normal Tank
// -
// Default: "3"
l4d2_deathmatch_rewardsystem_points_unlinked_tank "3"
// How many points do the player get if he kills a Normal Witch?
// -
// Default: "2"
l4d2_deathmatch_rewardsystem_points_unlinked_witch "2"
// How many consecutive player kills are considered as a 'Row Kill'
// -
// Default: "4"
l4d2_deathmatch_rewardsystem_rowkills "4"
// Score for killing a bot
// -
// Default: "1"
l4d2_deathmatch_scoresystem_points_botkill "1"
// Score for burning an enemy (Score added to the base killing score)
// -
// Default: "1"
l4d2_deathmatch_scoresystem_points_burning "1"
// Score for lasting alot alive
// -
// Default: "45"
l4d2_deathmatch_scoresystem_points_endurance "45"
// Score for killing an enemy right after he spawned (Score added to the base killing score)
// -
// Default: "5"
l4d2_deathmatch_scoresystem_points_fasttrigger "5"
// Score for forcing an enemy to hang from the ledge
// -
// Default: "15"
l4d2_deathmatch_scoresystem_points_hang "15"
// Score for killing a human
// -
// Default: "8"
l4d2_deathmatch_scoresystem_points_humankill "8"
// Score for killing an emeny with a single shot (Score added to the base killing score)
// -
// Default: "2"
l4d2_deathmatch_scoresystem_points_instakill "2"
// Score for incapacitating an enemy
// -
// Default: "1"
l4d2_deathmatch_scoresystem_points_launcher "1"
// Show score stats on death?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_scoresystem_showmenu_death "1"
// Show score stats on Deathmatch round end?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_scoresystem_showmenu_roundend "1"
// Should Vomit (Puke) bottles blind enemies?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_vomitjar_blind_enemies "1"
// Give primary weapon for respawning players
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_weaponmanager_primary "1"
// Give secondary weapon for respawning players
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_weaponmanager_secondary "1"
// Maximum time of a droped weapon to timeout (After this amount of time, the weapon gets removed)
// -
// Default: "30"
l4d2_deathmatch_weaponmanager_timeout "30"
// Should the plugin remove death bodies after a while? (Prevents Lag)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_wipe_bodies "1"
// How long should the plugin wait before removing a death bodie? (In Seconds)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_deathmatch_wipe_bodies_timeout "1"
Commands:
Code:
Player Commands
-sm_score : View the current global score
-sm_reward : Show up the reward menu
-sm_boost : Show up the boost menu
-sm_respawn : Force respawn
-sm_settings : Configure settings [Needs SQL]
-sm_mystats : Show up the player stats
-sm_ranking : Show up the global ranking (top 10)
Admin Commands
-sm_deathmatch : Force the deathmatch game to start. May cause gameplay troubles
-sm_deathmatch0 : Force the deathmatch game to end: May cause gameplay troubles
-sm_rewardon : Force 999 reward points
Debug Commands
-sm_debugpanel : Debug info.
-sm_randommap: Tests the random map loop.
-sm_techtest_pos: Retrieves a random position.
-sm_techtest_cent: Retrieves the center coordinates.
-sm_techtest_nextmap: Retrieves the next map on the map cycle.
-sm_myname: Retrieves your name from the database, if value is '' then it wasn't stored.
Installation:
You can always download the l4d2_deathmatch.zip file which contains everything you need.
Plugin Installation:
-Install the whole package (.zip) in your Left 4 dead 2 folder (containing left4dead2 and left4dead2_dlc folders)
SQL Installation
Create a table on any database containing this:
Code:
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `players`;
CREATE TABLE `players` (
`steamid` varchar(255) character set utf8 collate utf8_bin NOT NULL,
`name` tinyblob NOT NULL,
`score` int(11) NOT NULL default '0',
`kills` int(11) NOT NULL default '0',
`deaths` int(11) NOT NULL default '0',
`longtimealive` int(11) NOT NULL default '0',
`rewardused` int(11) NOT NULL default '0',
`settings_music` int(11) NOT NULL default '1',
`settings_notify` int(11) NOT NULL default '1',
`settings_character` int(11) NOT NULL default '1',
`settings_boost` int(11) NOT NULL default '-1',
`settings_shield` int(11) NOT NULL default '-1',
`settings_menus` int(11) NOT NULL default '1',
`settings_weapon`int(11) NOT NULL default '0',
`award_distance` int(11) NOT NULL default '0',
`award_burn` int(11) NOT NULL default '0',
`award_incapdealer` int(11) NOT NULL default '0',
`award_petcaller` int(11) NOT NULL default '0',
`award_endurance` int(11) NOT NULL default '0',
`award_oneshot` int(11) NOT NULL default '0',
`award_guard` int(11) NOT NULL default '0',
`award_widow` int(11) NOT NULL default '0',
`award_fall` int(11) NOT NULL default '0',
`award_ftrigger` int(11) NOT NULL default '0',
`award_firstdm` int(11) NOT NULL default '0',
`award_iwin` int(11) NOT NULL default '0',
PRIMARY KEY (`steamid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Then go to sourcemod/configs/databases.cfg and the following lines:
Code:
"deathmatch"
{
"driver" "mysql"
"host" "localhost"
"database" "deathmatch"
"user" "root"
"pass" ""
}
And edit them at your will.
Director Scripts Installation
The package contains a few director scripts that can be edited with any Text editor such as NotePad. Deathmatch_Idle is executed when the deathmatch has not started yet. Deathmatch_Run is executed when the deathmatch game has started, and finally Deathmatch_Finale is executed on a finale map to avoid calling the rescue vehicle.
Stripper files
Stripper files are include to avoid survivors to go trought certain restricted areas of a map.
Configure
-You can configure all the convars at cfg/sourcemod/l4d2_deathmatch.cfg
-The file cfg/deathmatch.cfg acts like server.cfg, but is only executed when the plugin is loaded.
-You can edit various director settings at scripts/vscripts. Look for the one you need.
-You can edit all the plugin data, located at addons/sourcemod/data/deathmatch, such as Map Cycle, Weapons damage, Respawn and data map coordinates, etc.
*A detailed description must be on each file, but if there is none, you shouldn't edit the file or you can ask for it here.
Uninstall
-Move the global_filters (stripper) to the disabled folder, and the map files (stripper/maps) to disabled too.
-Remove the .smx file
Known Bugs:
-There is one spam log bug that i couldn't manage to get fixed. Ill do my best to clean it out. -Fixing 50%
-Bug on the ranking panel. Only scores are being shown - Fixed
-Bug on c5m5_bridge where the map would end if all survivors reached the helicopter - 0%
Notes:
-The addon (deathmatch.vpk) is to allow the infected gameplay without changing the game mode to versus.
-One file named deathmatch.cfg is executed on every map start. Edit the game mode to enable or disable infected gameplay.
Credits:
I took some code from another plugins, so here's is the list.
-
AtomicStriker for the
[L4D2] Respawn Command and the
[L4D2] Bile The World plugins. Sorry for taking the code, hope you don't mind
.
-
V10 for his
[L4D2] Upgrade packs BUG FIX plugin
More people i could have forgotten. Please let me know if you find your code inside!
Changelog:
Code:
1.0.1a
-Fixed headshot detection.
-Fixed song precache.
1.0.1
-Added KeyValues file for better customisation.
-Added a protection to avoid ending the map if all survivors are death.
-Fixed !ranking command and the Insta Melee Kills boost.
-Added a protection for gascans and propanetanks to avoid exploding them before the match starts.
-Added and enhanced the director_scripts.
-Enhanced Player_Hurt function.
-Added more functions that were possibly forgotten. (Most of the job done here was code improvement).
1.0
-Initial Release