Plugins

This is a list of plugins that I have posted on the SourcMod Forums.

Mod ? Name Category
Left 4 Dead
New
[L4D2] Melee Mode v1.6.3 *Update* Gameplay
Left 4 Dead
Approved
[L4D2] Explosive Ammo Enable v1.1 General Purpose
Left 4 Dead
New
[L4D2] Zed Time v1.4 Fun Stuff
Left 4 Dead
Approved
[L4D2] Coffee Ammo v1.2 General Purpose
Left 4 Dead
Approved
[L4D2] Points System v1.6.7 Fun Stuff
Any Mod
New
[ANY] Chat Logger 2.0 Colorful RTF Logging Available Now! Server Management
Left 4 Dead
Approved
[L4D & L4D2] Survivor Crawl Pounce Fix Gameplay
Left 4 Dead
New
[L4D & L4D2] MultiWitches v1.3 Gameplay
Left 4 Dead
New
[L4D2] Time Controller Gameplay
Left 4 Dead
New
[L4D & L4D2] Crawl Balancer Gameplay
Left 4 Dead
Approved
[L4D2] SG552 Reload Fix Gameplay
Left 4 Dead
New
[L4D2] Vote Manager 3 Server Management

Below you will be able to find a list of personal plugins I have created but have not released on SourceMod's forums. Hover your mouse over the name of the plugin for a description. If an unreleased plugin below has any dependancies a readme is included in the downloaded file describing what the requirements are for that plugin.

Mod Name Category Download
Left 4 Dead
[L4D2] Anti-drop v1.0 Gameplay Download
Left 4 Dead
[L4D2] Laser Fix v1.2 Gameplay Download


To Top

Libraries

These are libraries I have written either as plugins or include files for SourceMod

L4D2 Stocks

This an include library that includes some handy stocks for L4D2, I might add a plugin library for sdkcalls later.
Documentation:

#if defined _l4d2_stocks_included
 #endinput
#endif
#define _l4d2_stocks_included

#include <sdktools>

enum L4D2ClassType
{
	L4D2Class_Smoker = 1,
	L4D2Class_Boomer,
	L4D2Class_Hunter,
	L4D2Class_Spitter,
	L4D2Class_Jockey,
	L4D2Class_Charger,
	L4D2Class_Unknown1,
	L4D2Class_Tank,
	L4D2Class_Unknown2
};

enum L4D2Team
{
	L4D2Team_Unassigned = 0,
	L4D2Team_Spectator = 1,
	L4D2Team_Survivor = 2,
	L4D2Team_Infected = 3	
};	

#define L4D2_UPGRADEFLAG_NONE 			0	
#define L4D2_UPGRADEFLAG_INCENDIARY 	(1 << 0)
#define L4D2_UPGRADEFLAG_EXPLOSIVE 		(1 << 1)
#define L4D2_UPGRADEFLAG_LASER			(1 << 2)


/**
 * Gets a Clients current class.
 *
 * @param client		Player's index.
 * @return				Current L4D2ClassType of player.
 * @error				Invalid client index.
 */
stock L4D2ClassType:L4D2_GetPlayerClass(client)
{
	return L4D2ClassType:GetEntProp(client, Prop_Send, "m_zombieClass");
}

/**
 * Gets a weapon's current upgrade bit
 *
 * @param entity		weapon index.
 * @return				Current weapon upgrade bit flags.
 * @error				Invalid weapon.
 */
stock L4D2_GetWeaponUpgradeBits(entity)
{
	return GetEntProp(entity, Prop_Send, "m_upgradeBitVec");
}

/**
 * Sets a weapon's current upgrade bit
 *
 * @param entity		weapon index.
 * @noreturn
 * @error				Invalid weapon.
 */
stock L4D2_SetWeaponUpgradeBits(entity, flags)
{
	SetEntProp(entity, Prop_Send, "m_upgradeBitVec", flags);
}

/**
 * Gets a weapon's loaded upgrade ammo
 *
 * @param entity		weapon index.
 * @return				Currently loaded upgrade ammo in weapon
 * @error				Invalid weapon.
 */
stock L4D2_GetLoadedUpgradeAmmo(entity)
{
	return GetEntProp(entity, Prop_Send, "m_nUpgradedPrimaryAmmoLoaded", 1);
}

/**
 * Sets a weapon's loaded upgrade ammo.
 *
 * @param entity		weapon index.
 * @noreturn
 * @error				Invalid weapon.
 */
stock L4D2_SetLoadedUpgradeAmmo(entity, amount)
{
	SetEntProp(entity, Prop_Send, "m_nUpgradedPrimaryAmmoLoaded", amount, 1);
}	

/**
 * Creates a survivor bot for a player to use.
 *
 * @param autoteleport	automatically teleport to first client found on survivor team
 * @return				Client index if kick is false else none
 * @error				Unable to create a fake client
 */
stock L4D2_CreateSurvivor(bool:autoteleport=true, bool:kick=true)
{
	new client = CreateFakeClient("Bot");
	if(client > 0)
	{
		ChangeClientTeam(client, _:L4D2Team_Survivor);
		if(autoteleport)
		{
			for(new i=1;i<=MaxClients;i++)
			{
				if(IsClientInGame(i) && GetClientTeam(i) == _:L4D2Team_Survivor && IsPlayerAlive(i))
				{
					decl Float:pos[3], Float:ang[3];
					GetClientAbsOrigin(i, pos);
					GetClientAbsAngles(i, ang);
					TeleportEntity(client, pos, ang, NULL_VECTOR);
					break;
				}
			}
		}
		if(kick)
		{
			KickClient(client, "Bot Created!");
			return -1;
		}	
		else return client;
	}
	else
	{
		ThrowError("Failed to create a fake client!");
	}	
	return -1;
}
Download(Right Click > Save As)

To Top

A website by Gustavo Vargas
Register a .tk
Valid XHTML 1.0 Valid CSS3
Llama