ABM: A MultiSlots / SuperVersus Alternative + Left 4 Downtown added.

This commit is contained in:
Kolan Sh 2023-10-06 20:55:08 +03:00
parent e6dbd86da0
commit 7effa917f4
10 changed files with 2176 additions and 0 deletions

View File

@ -0,0 +1,64 @@
"Games" {
"#default" {
"Offsets" {
"OS" { // Thank you Sammy-ROCK!
"windows" "1"
"linux" "0"
}
}
}
// Big thanks to cravenge and Spirit_12 on AlliedModders for being awesome :D
"left4dead2" {
"Signatures" {
"State_Transition" {
"library" "server"
"linux" "@_ZN9CCSPlayer16State_TransitionE13CSPlayerState"
"windows" "\x55\x8B\xEC\x56\x8B\xF1\x8B\x86\x2A\x2A\x2A\x2A\x57\x8B\x7D\x2A\x85\xC0\x74\x2A\x83"
/* 55 8B EC 56 8B F1 8B 86 ? ? ? ? 57 8B 7D ? 85 C0 74 ? 83 */
}
"TakeOverZombieBot" {
"library" "server"
"linux" "@_ZN13CTerrorPlayer17TakeOverZombieBotEPS_"
"windows" "\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\xA1\xD8\x2A\x2A\x2A\x33\xC5\x89\x45\x2A\x53\x8B\x5D\x2A\x80"
/* 55 8B EC 81 EC ? ? ? ? ? D8 ? ? ? 33 C5 89 45 ? 53 8B 5D ? 80 */
}
"RoundRespawn" {
"library" "server"
"linux" "@_ZN13CTerrorPlayer12RoundRespawnEv"
"windows" "\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x75"
/* 56 8B F1 E8 ? ? ? ? E8 ? ? ? ? 84 C0 75 */
}
"SetHumanSpec" {
"library" "server"
"linux" "@_ZN11SurvivorBot17SetHumanSpectatorEP13CTerrorPlayer"
"windows" "\x55\x8B\xEC\x56\x8B\xF1\x83\xBE\x2A\x2A\x2A\x2A\x00\x7E\x07\x32\xC0\x5E\x5D\xC2\x04\x00\x8B\x0D"
/* 55 8B EC 56 8B F1 83 BE ? ? ? ? 00 7E 07 32 C0 5E 5D C2 04 00 8B 0D */
}
//"SetHumanSpec" { // older version
// "library" "server"
// "linux" "@_ZN11SurvivorBot17SetHumanSpectatorEP13CTerrorPlayer"
// "windows" "\x55\x8B\xEC\x56\x8B\xF1\x83\xBE\x44\x43\x00\x00\x00\x7E\x07\x32\xC0\x5E\x5D\xC2\x04"
//}
"TakeOverBot" {
"library" "server"
"linux" "@_ZN13CTerrorPlayer11TakeOverBotEb"
"windows" "\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x33\xC5\x89\x45\xFC\x53\x56\x8D\x85"
/* 55 8B EC 81 EC ? ? ? ? A1 ? ? ? ? 33 C5 89 45 FC 53 56 8D 85 */
}
//"TakeOverBot" { // older version
// "library" "server"
// "linux" "@_ZN13CTerrorPlayer11TakeOverBotEb"
// "windows" "\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x56\x8D\x85"
//}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,85 @@
/**
* vim: set ts=4 :
* =============================================================================
* Left 4 Downtown 2 SourceMod Extension
* Copyright (C) 2010 Michael "ProdigySim" Busby
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#if defined _l4d2director_included
#endinput
#endif
#define _l4d2director_included
/**
* @brief Gets the number of tanks currently in play.
* @remarks This value is tracked by the director, and should be a good
* indicator that a tank is in play
*
* @return current tank count
*/
native L4D2_GetTankCount();
/**
* @brief Gets the campaign scores stored in the Versus Director
* @remarks These are the actual values used for campaign scores--not proxies
*
* @param scores Array to store the campaign scores in
* @noreturn
*/
native L4D2_GetVersusCampaignScores(scores[2]);
/**
* @brief Sets the campaign scores stored in the Versus Director
* @remarks These are the actual values used for campaign scores--not proxies
*
* @param scores Array of campaign scores to set the director's values to.
* @noreturn
*/
native L4D2_SetVersusCampaignScores(const scores[2]);
/**
* @brief Gets the flow percent for tank spawns for both versus rounds.
* @remarks These values are checked against as the survivors move through the
* map. Once they are passed, the tank spawns. Note that this is flow
* as a percent of the map's flow, not flow distance.
*
* @param tankFlows Array to store the Tank Spawn Flow percents in
* @noreturn
*/
native L4D2_GetVersusTankFlowPercent(Float:tankFlows[2]);
/**
* @brief Sets the flow percent for tank spawns for both versus rounds.
* @remarks These values are checked against as the survivors move through the
* map. Once they are passed, the tank spawns. Note that this is flow
* as a percent of the map's flow, not flow distance.
*
* @param tankFlows Array of Tank Spawn Flow percents to store in director
* @noreturn
*/
native L4D2_SetVersusTankFlowPercent(const Float:tankFlows[2]);

View File

@ -0,0 +1,171 @@
/**
* vim: set ts=4 :
* =============================================================================
* Left 4 Downtown 2 SourceMod Extension
* Copyright (C) 2010 Michael "ProdigySim" Busby
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#if defined _l4d2timers_included
#endinput
#endif
#define _l4d2timers_included
enum L4D2CountdownTimer
{
L4D2CT_MobSpawnTimer,
L4D2CT_SmokerSpawnTimer,
L4D2CT_BoomerSpawnTimer,
L4D2CT_HunterSpawnTimer,
L4D2CT_SpitterSpawnTimer,
L4D2CT_JockeySpawnTimer,
L4D2CT_ChargerSpawnTimer,
L4D2CT_VersusStartTimer,
L4D2CT_UpdateMarkersTimer
};
enum L4D2IntervalTimer
{
L4D2IT_SmokerDeathTimer,
L4D2IT_BoomerDeathTimer,
L4D2IT_HunterDeathTimer,
L4D2IT_SpitterDeathTimer,
L4D2IT_JockeyDeathTimer,
L4D2IT_ChargerDeathTimer
};
/**
* @brief Resets a given CountdownTimer (start again with same duration)
* @remarks Equivalent to Start(timer, GetCountdownDuration(timer))
*
* @param timer CountdownTimer to reset
* @noreturn
*/
native L4D2_CTimerReset(L4D2CountdownTimer:timer);
/**
* @brief Starts a given CountdownTimer with a given duration
* @remarks This sets a new duration and sets up the end timestamp
*
* @param timer CountdownTimer to start
* @param duration Duration for the timer to use
* @noreturn
*/
native L4D2_CTimerStart(L4D2CountdownTimer:timer, Float:duration);
/**
* @brief Invalidates a given CountdownTimer (Timer essentially does not run)
* @remarks Sets the timestamp to -1.0f
*
* @param timer CountdownTimer to Invalidate
* @noreturn
*/
native L4D2_CTimerInvalidate(L4D2CountdownTimer:timer);
/**
* @brief Tells if a given CountdownTimer has started
* @remarks Checks to see if the end timestamp is greater than 0.0f
*
* @param timer CountdownTimer to check
* @return true if timer has started, false if timer is not started/invalid.
*/
native bool:L4D2_CTimerHasStarted(L4D2CountdownTimer:timer);
/**
* @brief Tells if a given CountdownTimer is elapsed
* @remarks If a timer is "up," e.g duration has passed since Start(), this returns true;
*
* @param timer CountdownTimer to check
* @return true if timer has elapsed or timer invalid/not started, false otherwise
*/
native bool:L4D2_CTimerIsElapsed(L4D2CountdownTimer:timer);
/**
* @brief Gets elapsed time of a given CountdownTimer, from the timed it was Start()ed
* @remarks Value is (Now() - timestamp) + duration
*
* @param timer CountdownTimer to get elapsed time of
* @return Float amount of time since timer started
*/
native Float:L4D2_CTimerGetElapsedTime(L4D2CountdownTimer:timer);
/**
* @brief Gets remaining time on a given CountdownTimer
* @remarks Value is (timestamp - Now())
*
* @param timer CountdownTimer to get remaining time of
* @return Float amount of time remaining on the timer
*/
native Float:L4D2_CTimerGetRemainingTime(L4D2CountdownTimer:timer);
/**
* @brief Gets the duration of a given CountdownTimer
* @remarks Value is (timestamp > 0.0f ? duration : 0.0f)
*
* @param timer CountdownTimer to get duration of
* @return 0.0 for invalid/not started timers, timer duration otherwise.
*/
native Float:L4D2_CTimerGetCountdownDuration(L4D2CountdownTimer:timer);
/*************************************
IntervalTimer Natives
***********************************/
/**
* @brief Starts a given IntervalTimer
* @remarks Just sets timestamp = Now(), so counting starts from now
*
* @param timer IntervalTimer to start
* @noreturn
*/
native L4D2_ITimerStart(L4D2IntervalTimer:timer);
/**
* @brief Invalidates a given IntervalTimer
* @remarks Just sets timestamp = -1.0f
*
* @param timer IntervalTimer to Invalidate
* @noreturn
*/
native L4D2_ITimerInvalidate(L4D2IntervalTimer:timer);
/**
* @brief Tells whether a given IntervalTimer has started
* @remarks Checks to see if timestamp > 0.0f
*
* @param timer IntervalTimer to check
* @return true if timer is started, false if it is invalid/not started
*/
native bool:L4D2_ITimerHasStarted(L4D2IntervalTimer:timer);
/**
* @brief Gets the elapsed time of a given IntervalTimer
* @remarks Value is Now() - Timestamp
*
* @param timer IntervalTimer to get elapsed time of
* @return Elapsed time if timer started and valid, 99999.9f otherwise
*/
native Float:L4D2_ITimerGetElapsedTime(L4D2IntervalTimer:timer);

View File

@ -0,0 +1,219 @@
/**
* vim: set ts=4 :
* =============================================================================
* Left 4 Downtown 2 SourceMod Extension
* Copyright (C) 2010 Michael "ProdigySim" Busby
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#if defined _l4d2weapons_included
#endinput
#endif
#define _l4d2weapons_included
enum L4D2IntWeaponAttributes
{
L4D2IWA_Damage,
L4D2IWA_Bullets,
L4D2IWA_ClipSize
};
/*
A note regarding Clipsize: Any nonstandard value will NOT be in effect at weapon pickup, which means the client
has to reload once to achieve the modified value. To fix this, add a weapon pickup hook in your plugin (eg "player_use")
and use something like this with a small timer delay of 0.1 seconds or more (dont you love this engine)
new weapon = GetPlayerWeaponSlot(client, 0);
if (weapon == INVALID_ENT_REFERENCE) return;
decl String:class[56];
GetEdictClassname(weapon, class, sizeof(class));
SetEntProp(weapon, Prop_Send, "m_iClip1", L4D2_GetIntWeaponAttribute(class, L4D2IWA_ClipSize));
*/
enum L4D2FloatWeaponAttributes
{
L4D2FWA_MaxPlayerSpeed,
L4D2FWA_SpreadPerShot,
L4D2FWA_MaxSpread,
L4D2FWA_SpreadDecay,
L4D2FWA_MinDuckingSpread,
L4D2FWA_MinStandingSpread,
L4D2FWA_MinInAirSpread,
L4D2FWA_MaxMovementSpread,
L4D2FWA_PenetrationNumLayers,
L4D2FWA_PenetrationPower,
L4D2FWA_PenetrationMaxDist,
L4D2FWA_CharPenetrationMaxDist,
L4D2FWA_Range,
L4D2FWA_RangeModifier,
L4D2FWA_CycleTime
};
enum L4D2BoolMeleeWeaponAttributes
{
L4D2BMWA_Decapitates
};
enum L4D2IntMeleeWeaponAttributes
{
L4D2IMWA_DamageFlags,
L4D2IMWA_RumbleEffect
};
enum L4D2FloatMeleeWeaponAttributes
{
L4D2FMWA_Damage,
L4D2FMWA_RefireDelay,
L4D2FMWA_WeaponIdleTime
};
/**
* @brief Checks for a given weapon string to exist in the WeaponInformationDatabase
* @remarks Throws an error if Database is unavailable
*
* @param weaponName Weapon to check up on
* @return True if weapon is found, false if not
*/
native bool:L4D2_IsValidWeapon(const String:weaponName[]);
/**
* @brief Read an int-typed attribute for a given weapon from the WeaponInformationDatabase
* @remarks Throws an error if the weapon is not found or the attribute is incorrect
*
* @param weaponName Weapon to lookup attribute for
* @param attr Attribute to read from the weapon's info struct
* @return The value read.
*/
native L4D2_GetIntWeaponAttribute(const String:weaponName[], L4D2IntWeaponAttributes:attr);
/**
* @brief Read a float-typed attribute for a given weapon from the WeaponInformationDatabase
* @remarks Throws an error if the weapon is not found or the attribute is incorrect
*
* @param weaponName Weapon to lookup attribute for
* @param attr Attribute to read from the weapon's info struct
* @return The value read.
*/
native Float:L4D2_GetFloatWeaponAttribute(const String:weaponName[], L4D2FloatWeaponAttributes:attr);
/**
* @brief Set an int-typed attribute for a given weapon from the WeaponInformationDatabase to a given value
* @remarks Throws an error if the weapon is not found or the attribute is incorrect
*
* @param weaponName Weapon to lookup attribute for
* @param attr Attribute to alter in the weapon's info struct
* @param value Value to set the attribute to
* @noreturn
*/
native L4D2_SetIntWeaponAttribute(const String:weaponName[], L4D2IntWeaponAttributes:attr, value);
/**
* @brief Set a float-typed attribute for a given weapon from the WeaponInformationDatabase to a given value
* @remarks Throws an error if the weapon is not found or the attribute is incorrect
*
* @param weaponName Weapon to lookup attribute for
* @param attr Attribute to alter in the weapon's info struct
* @param value Value to set the attribute to
* @noreturn
*/
native Float:L4D2_SetFloatWeaponAttribute(const String:weaponName[], L4D2FloatWeaponAttributes:attr, Float:value);
/**
* @brief Retrieve the index for a given melee weapon from the Melee Weapon Database
* @remarks returns -1 if no match is found
*
* @param weaponName Weapon to lookup index id for
* @return The index id
*/
native L4D2_GetMeleeWeaponIndex(const String:weaponName[]);
/**
* @brief Read an int-typed attribute for a given id from the Melee Weapon Database
* @remarks Throws an error if the id is not found or the attribute is incorrect
*
* @param id Melee id to lookup attribute for
* @param attr Attribute to read from the weapon's info struct
* @return The value read.
*/
native L4D2_GetIntMeleeAttribute(id, L4D2IntMeleeWeaponAttributes:attr);
/**
* @brief Read a float-typed attribute for a given id from the Melee Weapon Database
* @remarks Throws an error if the id is not found or the attribute is incorrect
*
* @param id Melee id to lookup attribute for
* @param attr Attribute to read from the weapon's info struct
* @return The value read.
*/
native Float:L4D2_GetFloatMeleeAttribute(id, L4D2FloatMeleeWeaponAttributes:attr);
/**
* @brief Read a bool-typed attribute for a given id from the Melee Weapon Database
* @remarks Throws an error if the id is not found or the attribute is incorrect
*
* @param id Melee id to lookup attribute for
* @param attr Attribute to read from the weapon's info struct
* @return The value read.
*/
native bool:L4D2_GetBoolMeleeAttribute(id, L4D2BoolMeleeWeaponAttributes:attr);
/**
* @brief Set an int-typed attribute for a given id from the Melee Weapon Database to a given value
* @remarks Throws an error if the id is not found or the attribute is incorrect
*
* @param id Melee id to lookup attribute for
* @param attr Attribute to alter in the weapon's info struct
* @param value Value to set the attribute to
* @noreturn
*/
native L4D2_SetIntMeleeAttribute(id, L4D2IntMeleeWeaponAttributes:attr, value);
/**
* @brief Set a float-typed attribute for a given id from the Melee Weapon Database to a given value
* @remarks Throws an error if the id is not found or the attribute is incorrect
*
* @param id Melee id to lookup attribute for
* @param attr Attribute to alter in the weapon's info struct
* @param value Value to set the attribute to
* @noreturn
*/
native Float:L4D2_SetFloatMeleeAttribute(id, L4D2FloatMeleeWeaponAttributes:attr, Float:value);
/**
* @brief Set a bool-typed attribute for a given id from the Melee Weapon Database to a given value
* @remarks Throws an error if the id is not found or the attribute is incorrect
*
* @param id Melee id to lookup attribute for
* @param attr Attribute to alter in the weapon's info struct
* @param value Value to set the attribute to
* @noreturn
*/
native Float:L4D2_SetBoolMeleeAttribute(id, L4D2BoolMeleeWeaponAttributes:attr, bool:value);

View File

@ -0,0 +1,579 @@
/**
* vim: set ts=4 :
* =============================================================================
* Left 4 Downtown SourceMod Extension
* Copyright (C) 2009 Igor "Downtown1" Smirnov.
* =============================================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, AlliedModders LLC gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, AlliedModders LLC grants
* this exception to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
* Version: $Id$
*/
#if defined _l4do_included
#endinput
#endif
#define _l4do_included
#include <l4d2timers>
#include <l4d2weapons>
#include <l4d2director>
/**
* @brief Called whenever ZombieManager::SpawnTank(Vector&,QAngle&) is invoked
* @remarks Not invoked if z_spawn tank is used and it gives a ghosted/dead player tank
*
* @param vector Vector coordinate where tank is spawned
* @param qangle QAngle where tank will be facing
* @return Pl_Handled to block tank from spawning, Pl_Continue otherwise.
*/
forward Action:L4D_OnSpawnTank(const Float:vector[3], const Float:qangle[3]);
/**
* @brief Called whenever ZombieManager::SpawnWitch(Vector&,QAngle&) is invoked
*
* @param vector Vector coordinate where witch is spawned
* @param qangle QAngle where witch will be facing
* @return Pl_Handled to block witch from spawning, Pl_Continue otherwise.
*/
forward Action:L4D_OnSpawnWitch(const Float:vector[3], const Float:qangle[3]);
/**
* @brief Called whenever ZombieManager::SpawnWitchBride(Vector&,QAngle&) is invoked
*
* @param vector Vector coordinate where witch is spawned
* @param qangle QAngle where witch will be facing
* @return Pl_Handled to block witch from spawning, Pl_Continue otherwise.
*/
forward Action:L4D_OnSpawnWitchBride(const Float:vector[3], const Float:qangle[3]);
/**
* @brief Called whenever ZombieManager::SpawnSpecial(ZombieClassType,Vector&,QAngle&) is invoked
* @remarks Only used for bot special spawns (not players)
*
* @param zombieClass Zombie class that will be spawned.
* @param vector Vector coordinate where special will be spawned
* @param qangle QAngle where spcial will be facing
* @return Pl_Handled to block special from spawning,
* Pl_Changed to change the zombie class type to spawn, Pl_Continue otherwise.
*/
forward Action:L4D_OnSpawnSpecial(&zombieClass, const Float:vector[3], const Float:qangle[3]);
/**
* @brief Called whenever CTerrorGameRules::ClearTeamScores(bool) is invoked
* @remarks This resets the map score at the beginning of a map, and by checking
* the campaign scores on a small timer you can see if they were reset as well.
*
* @param newCampaign if true then this is a new campaign, if false a new chapter
* @return Pl_Handled to block scores from being cleared, Pl_Continue otherwise.
*/
forward Action:L4D_OnClearTeamScores(bool:newCampaign);
/**
* @brief Called whenever CTerrorGameRules::SetCampaignScores(int,int) is invoked
* @remarks The campaign scores are updated after the 2nd round is completed
*
* @param scoreA score of logical team A
* @param scoreB score of logical team B
* @return Pl_Handled to block campaign scores from being set, Pl_Continue otherwise.
*/
forward Action:L4D_OnSetCampaignScores(&scoreA, &scoreB);
/**
* @brief Called whenever CDirector::OnFirstSurvivorLeftSafeArea is invoked
* @remarks A versus round is started when survivors leave the safe room, or force started
* after 90 seconds regardless.
*
* @param client the survivor that left the safe area first
*
* @return Pl_Handled to block round from being started, Pl_Continue otherwise.
*/
forward Action:L4D_OnFirstSurvivorLeftSafeArea(client);
/**
* @brief Called whenever CDirector::GetScriptValue(const char*, int) is invoked
* @remarks A script value is map specific
*
* @param key the script's key name
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetScriptValueInt(const String:key[], &retVal);
/**
* @brief Called whenever CDirector::GetScriptValue(const char*, float) is invoked
* @remarks A script value is map specific
*
* @param key the script's key name
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetScriptValueFloat(const String:key[], &Float:retVal);
/**
* @brief Called whenever CDirector::GetScriptValue(const char*, const char*, char*, int) is invoked
* @remarks A script value is map specific
*
* @param key the script's key name
* @param defaultVal default key return, usually empty
* @param retVal returned String
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetScriptValueString(const String:key[], const String:defaultVal[], String:retVal[128]);
/**
* @brief Called whenever CTerrorPlayer::OnEnterGhostState(CTerrorPlayer*) is invoked
* @remarks This happens when a player enters ghost mode (or in finales auto-materialized)
*
* @param client the client that has entered ghost mode
*/
forward L4D_OnEnterGhostState(client);
/**
* @brief Called whenever CDirector::TryOfferingTankBot is invoked
* @remarks Is used for displaying the "X gets Tank" window and transferring Tank control
*
* @return Pl_Handled to block window from showing and to keep Tank Bot, Pl_Continue otherwise
*/
forward Action:L4D_OnTryOfferingTankBot(tank_index, &bool:enterStasis);
/**
* @brief Called whenever CDirector::OnMobRushStart(void) is invoked
* @remarks called on random hordes, mini- and finale hordes, and boomer hordes, causes Zombies to attack
* Not called on "z_spawn mob", hook the console command and check arguments to catch plugin mobs
* This function is used to reset the Director's natural horde timer
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D_OnMobRushStart();
/**
* @brief Called whenever ZombieManager::SpawnITMob(int) is invoked
* @remarks called on boomer hordes, increases Zombie Spawn Queue
*
* @param amount Amount of Zombies to add to Queue
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D_OnSpawnITMob(&amount);
/**
* @brief Called whenever ZombieManager::SpawnMob(int) is invoked
* @remarks called on natural hordes & z_spawn mob, increases Zombie Spawn
* Queue, triggers player OnMobSpawned (vocalizations), sets horde
* direction, and plays horde music.
*
* @param amount Amount of Zombies to add to Queue
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D_OnSpawnMob(&amount);
/**
* @brief Called whenever CTerrorPlayer::OnShovedBySurvivor(CTerrorPlayer, Vector&) is invoked
* @remarks L4D2 only uses this on Special Infected
*
* @param client the client that did the shoving
* @param victim the client that was shoved (CAUTION: retrieved from function pointer, dont meddle with it)
* @param vector Vector Angle of Shoveforce
*
* @return Pl_Handled to block melee effect (staggering), Pl_Continue otherwise.
*/
forward Action:L4D_OnShovedBySurvivor(client, victim, const Float:vector[3]);
/**
* @brief Called whenever CTerrorPlayer::GetCrouchTopSpeed() is invoked
*
* @param target the client that its being called on (not changible)
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetCrouchTopSpeed(target, &Float:retVal);
/**
* @brief Called whenever CTerrorPlayer::GetRunTopSpeed() is invoked
*
* @param target the client that its being called on (not changible)
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetRunTopSpeed(target, &Float:retVal);
/**
* @brief Called whenever CTerrorPlayer::GetWalkTopSpeed() is invoked
*
* @param target the client that its being called on (not changible)
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetWalkTopSpeed(target, &Float:retVal);
/**
* @brief Called whenever CTerrorGameRules::HasConfigurableDifficultySetting() is invoked
* @remarks used to deny/allow difficulty changes in different game modes
*
* @param retVal what to override the return value with. 1 to allow difficulty configuration, 0 to deny.
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnHasConfigurableDifficulty(&retVal);
/**
* @brief Called whenever CTerrorGameRules::GetSurvivorSet(void) is invoked
*
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnGetSurvivorSet(&retVal);
/**
* @brief Called whenever CTerrorGameRules::FastGetSurvivorSet(void) is invoked
*
* @param retVal what to override the return value with
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D_OnFastGetSurvivorSet(&retVal);
/**
* @brief Called whenever CDirectorVersusMode::GetMissionVersusBossSpawning() is invoked
* @remarks Passed values are from the map's Mission Keyvalues. If those keyvalues don't exist, they are from cvar and other globals
*
* @param spawn_pos_min Minimum spawn position (percent of flow distance) for bosses
* @param spawn_pos_max Maximum spawn position (perfect of flow distance) for bosses
* @param tank_chance Chance for a tank to spawn on this map
* @param witch_chance Chance for a witch to spawn on this map
*
* @return Pl_Handled to block reading map data, Pl_Changed to use overwritten values from plugin, Pl_Continue to continue to read from mission data.
*/
forward Action:L4D_OnGetMissionVSBossSpawning(&Float:spawn_pos_min, &Float:spawn_pos_max, &Float:tank_chance, &Float:witch_chance);
/**
* @brief Called whenever CThrow::ActivateAbility(void) is invoked
* @remarks Called when a tank throws a rock. Blocking this call will
* keep the tank from throwing a rock.
*
* @param ability ability_throw entity index
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D_OnCThrowActivate(ability);
/**
* @brief Called whenever InfectedShoved::OnShoved(Infected *, CBaseEntity *) is invoked
* @remarks Called when common Infected are about to get shoved
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D_OnInfectedShoved(infected, entity);
/**
* @brief Called whenever CTerrorMeleeWeapon::StartMeleeSwing(CTerrorPlayer *, bool) is invoked
* @remarks Called when a player uses his melee Weapons primary attack. This is before the game
* reads the melee weapon data (model etc) and decides if he CAN attack at all.
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D_OnStartMeleeSwing(client, bool:boolean);
/**
* @brief Called whenever CDirectorScriptedEventManager::SendInRescueVehicle(void) is invoked
* @remarks Called when the last Finale stage is reached and the Rescue Means becomes 'available'.
* Take note this forward WILL fire upon using the native of the same function.
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D2_OnSendInRescueVehicle();
/**
* @brief Called whenever CDirectorScriptedEventManager::ChangeFinaleStage is invoked
*
* @param FinaleStageType integer value
* @remarks some values for FinaleStageType: 1 - Finale Started; 6 - Rescue Vehicle Ready; 7 - Zombie Hordes; 8 - Tank; 10 - Combat Respite (nothing spawns)
* @remarks SendInRescueVehicle does not depend on Finale Stage being 6, that only signals endless Hordes/Tanks
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D2_OnChangeFinaleStage(&finaleType, const String:arg[]);
/**
* @brief Called whenever CDirectorVersusMode::EndVersusModeRound(bool) is invoked
*
* @param countSurvivors True if the survival multiplier count needs to be nonzero. I guess.
* @remarks Not sure what bool does exactly yet. Just monitor it. If true, survivors will be counted for multiplier. If false, survival multiplier will be set to 0.
* @remarks A lot of Score calculations happen on this function, and the round-end scoreboard comes up doing this. Don't block unless you're sure you can reproduce this logic.
*
* @return Pl_Handled to block, Pl_Continue otherwise
*/
forward Action:L4D2_OnEndVersusModeRound(bool:countSurvivors);
/**
* @brief Called when CBaseAnimating::SelectWeightedSequence(int Activity) is invoked with tank attack activity
* @remarks Called whenever a tank uses his primary (punch) or secondary (throw) attack
*
* @param client the client that is playing as tank
* @param sequence current selected sequence for attack, option to override the return value with it
* @remarks sequences(punches): 40(uppercut), 43(right hook), 45(left hook), 46 and 47 (pounding the ground)
* @remarks sequences(throws): 48(undercut), 49(1handed overhand), 50(throw from the hip), 51(2handed overhand)
*
* @return Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D2_OnSelectTankAttack(client, &sequence);
/**
* @brief Called when CTerrorPlayer::OnRevived(void) is invoked
* @remarks Called post-revive so all data values are post-revive status.
*
* @param client the client that has been revived
*
* @noreturn Pl_Handled to override return value, Pl_Continue otherwise.
*/
forward Action:L4D2_OnRevived(client);
/**
* @brief Get the current campaign scores stored in the Director
* @remarks The campaign scores are updated after L4D_OnSetCampaignScores
*
* @deprecated This will set the scores to -1 for both sides on L4D2,
* this function is no longer supported.
*
* @param scoreA score of logical team A
* @param scoreB score of logical team B
* @return 1 always
*/
#pragma deprecated Use GetTeamScore and OnClearTeamScores instead
native L4D_GetCampaignScores(&scoreA, &scoreB);
/**
* @brief Get the team scores for the current map
* @remarks The campaign scores are not set until the end of round 2,
* use L4D_GetCampaignScores to get them earlier.
*
* @deprecated This function can be called through SDKTools using CTerrorGameRules,
* and so you should switch off to using SDKTools instead of this native.
*
* @param logical_team 0 for A, 1 for B
* @param campaign_score true to get campaign score instead of map score
* @return the logical team's map score
* or -1 if the team hasn't played the round yet,
* or the team's campaign score if campaign_score = true
*/
native L4D_GetTeamScore(logical_team, campaign_score=false);
/**
* @brief Restarts the setup timer (when in scavenge mode)
* @remarks If game has already started, the setup timer will show,
* but it still won't go back into setup.
*/
native L4D_ScavengeBeginRoundSetupTime();
/**
* @brief Restarts the round, switching the map if necessary
* @remarks Set the map to the current map to restart the round
*
* @param map the mapname it should go to after the round restarts
* @return 1 always
*/
native L4D_RestartScenarioFromVote(const String:map[]);
/**
* @brief Removes lobby reservation from a server
* @remarks Sets the reservation cookie to 0,
* it is safe to call this even if it's unreserved.
*/
native L4D_LobbyUnreserve();
/**
* @brief Checks if the server is currently reserved for a lobby
* @remarks Server is automatically unreserved if it hibernates or
* if all players leave.
*
* @deprecated This will always return false on L4D2 or on Linux.
*
* @return true if reserved, false if not reserved
*/
#pragma deprecated This will always return false on L4D2 or on Linux.
native bool:L4D_LobbyIsReserved();
/**
* @brief Gets the max versus completion score for the map
* @remarks Requires GameRules to be initialized--map must be loaded
* Seems to be updated before OnMapStart
*
*
* @return The map's max completion distance (map distance score)
*/
native L4D_GetVersusMaxCompletionScore();
/**
* @brief Sets the max versus completion score for the map
* @remarks Requires GameRules to be initialized--map must be loaded
* Seems to be updated before OnMapStart and checked on round_start
*
* @param score The versus max completion score to set for the round
*/
native L4D_SetVersusMaxCompletionScore(score);
/**
* @brief Tells if the Mission (map) is the final map of the campaign
*
* @return true if the map is the last map of the campaign (finale)
*/
native bool:L4D_IsMissionFinalMap();
/**
* @brief Resets the natural mob (horde) timer
* @remarks Requires the Director to be available--map must be started
*
* @noreturn
*/
native L4D_ResetMobTimer();
/**
* @brief Notifies the CGameRulesProxy that the game state has been changed
* @remarks Use this function before changing networked members of GameRules,
* like with L4D_SetVersusMaxCompletionScore()
*
* @noreturn
*/
native L4D_NotifyNetworkStateChanged();
/**
* @brief Trigger's a target player's stagger behavior
* @remarks Works on any CTerrorPlayer--survivor or infected.
*
* @param target Player to stagger
* @param source_ent Source of the stagger (another player, etc)
* @param source_vector Source location of the stagger. If NULL_VECTOR, origins of source_ent is used.
* @noreturn
*/
native L4D_StaggerPlayer(target, source_ent, Float:source_vector[3]);
/**
* @brief Get the time remaining before the next director horde.
* @remarks This timer is used for scripted event hordes and natural timed hordes
*
* @return Time remaining before next director horde
*/
#pragma deprecated Use L4D2_CTimerGetRemainingTime(L4D2CT_MobSpawnTimer)
native Float:L4D_GetMobSpawnTimerRemaining();
/**
* @brief Get the duration the horde timer was set to after the last horde
* @remarks This timer is used for scripted event hordes and natural timed hordes
*
* @return Total time from last horde to next horde.
*/
#pragma deprecated Use L4D2_CTimerGetCountdownDuration(L4D2CT_MobSpawnTimer)
native Float:L4D_GetMobSpawnTimerDuration();
/**
* @brief Get the remaining spawn time for an SI
* @remarks This is meant for Special infected in ghost mode in versus.
*
* @return Time (seconds) until the SI will spawn.
*/
native Float:L4D_GetPlayerSpawnTime(player);
/**
* @brief Calls CDirectorScriptedEventManager::SendInRescueVehicle(void)
*
* @remarks will fire the forward of the same function
*
* @noreturn
*/
native L4D2_SendInRescueVehicle();
/**
* @brief Calls CDirectorScriptedEventManager::ChangeFinaleStage(CDirectorScriptedEventManager::FinaleStageType,char const*)
*
* @param FinaleStageType integer value
* @remarks some values for FinaleStageType: 1 - Finale Started; 6 - Rescue Vehicle Ready; 7 - Zombie Hordes; 8 - Tank; 10 - Combat Respite (nothing spawns)
* @remarks
* @remarks will fire the forward of the same function
*
* @noreturn
*/
native L4D2_ChangeFinaleStage(finaleType, const String:arg[]);
/**
* @brief Calls ZombieManager::SpawnTank(Vector&,QAngle&)
*
* @param vector Vector coordinate where the tank will be spawned
* @param qangle QAngle where the tank will be facing
* @return Entity index of the spawned tank
*/
native L4D2_SpawnTank(const Float:vector[3], const Float:qangle[3]);
/**
* @brief Calls ZombieManager::SpawnSpecial(ZombieClassType,Vector&,QAngle&)
* @remarks Only used for bot special spawns (not players)
*
* @param vector Vector coordinate where the SI will be spawned
* @param qangle QAngle where the SI will be facing
* @return Entity index of the spawned SI
*/
native L4D2_SpawnSpecial(zombieClass, const Float:vector[3], const Float:qangle[3]);
/**
* @brief Calls ZombieManager::SpawnWitch(Vector&,QAngle&)
*
* @param vector Vector coordinate where the witch will be spawned
* @param qangle QAngle where the witch will be facing
* @return Entity index of the spawned witch
*/
native L4D2_SpawnWitch(const Float:vector[3], const Float:qangle[3]);
/**
* @brief Calls ZombieManager::SpawnWitchBride(Vector&,QAngle&)
*
* @param vector Vector coordinate where the witch bride will be spawned
* @param qangle QAngle where the witch bride will be facing
* @return Entity index of the spawned witch bride
*/
native L4D2_SpawnWitchBride(const Float:vector[3], const Float:qangle[3]);
/*
Makes the extension required by the plugins, undefine REQUIRE_EXTENSIONS
if you want to use it optionally before including this .inc file
*/
public Extension:__ext_left4downtown =
{
name = "Left 4 Downtown",
file = "left4downtown.ext",
#if defined AUTOLOAD_EXTENSIONS
autoload = 1,
#else
autoload = 0,
#endif
#if defined REQUIRE_EXTENSIONS
required = 1,
#else
required = 0,
#endif
};

View File

@ -58,7 +58,37 @@ sm_cvar l4d_multislots_kickafk 0
sv_gametypes scavenge,coop,versus,survival,realism,teamversus,teamscavenge,mutation1,mutation2,mutation3,mutation4,mutation5,mutation6,mutation7,mutation8,mutation9,mutation10,mutation11,mutation12,mutation13,mutation14,mutation15,mutation16,mutation17,mutation18,mutation19,mutation20,chargertraining,tankassault,tankbrawl,gungame,uncommonground,uncommongroundsv
// Left 4 Downtown 2: https://forums.alliedmods.net/showthread.php?t=134032
l4d_maxplayers 32
sm_cvar l4d_maxplayers 32
// ABM: A MultiSlots / SuperVersus Alternative
// https://forums.alliedmods.net/showthread.php?p=2477820
// https://gitlab.com/vbgunz/ABM
abm_autohard 1
abm_automodel 1
abm_consumable adrenaline
abm_extraplayers 0
abm_healitem ""
abm_identityfix 1
abm_joinmenu 1
abm_keepdead 0
abm_loglevel 0
abm_minplayers 4
abm_offertakeover 1
abm_primaryweapon shotgun_chrome
abm_secondaryweapon baseball_bat
abm_spawninterval 36
abm_stripkick 0
abm_tankchunkhp 2500
abm_teamlimit 16
abm_throwable ""
abm_unlocksi 0
abm_zoey 5
#abm_respawndelay 1.0
// -------------------------------------------------------------------
//--> Download at http://forums.alliedmods.net/showthread.php?t=91132
//l4d_maxplayers 32
//sm_cvar l4d_maxplayers 32