Tf2 Randomizer Plugin

tf2 randomizer plugin
#pragma semicolon 1
#include
#include
#include
#include

#define PLUGIN_VERSION “beta 2”

public Plugin:myinfo = {
name = “Custom Weapons: Lykrast Attributes”,
author = “Lykrast”,
tf2 randomizer plugin check more tf2 randomizer plugin
description = “Custom attributes.”,
version = PLUGIN_VERSION,
};

/* *** Attributes In This Plugin ***
-> “jarate on hit”
“”
Weapons applies Jarate on hit for the specified duration
Jarate is applied before the damage is dealt, so the first shot is not a mini crit
-> “mad milk on hit”
tf2 randomizer plugin tf2 randomizer plugin
“”
Weapons applies Mad Milk on hit for the specified duration
Mad Milk is applied before the damage is dealt, so the first shot does not heal
-> “defense on hit”
“”
Weapons applies a defense buff on wearer on hit for the specified duration
-> “speed on hit”
“”
Weapons applies a speed buff on wearer on hit for the specified duration
-> “speed on kill”
tf2 randomizer plugin tf2 randomizer plugin
“”
Weapons applies a speed buff on wearer on kill for the specified duration
-> “crit while low”
“”
When the wearer’s health is below the specified value, the weapon is crit boosted
-> “glow on hit”
“”
Weapons makes the target visible through walls for the specified duration
-> “execute”
“”
tf2 randomizer plugin best of tf2 randomizer plugin
Hitting a target with this or less health less will be an instant kill
-> “crit a cola on draw”
“”
When drawing this weapon, applies Crit-a-Cola on wearer for the specified duration
-> “reload on kill”
“”
On a kill, the clip is set to the defined value
-> “cloak with charge”
“”
Only work with Sniper rifles
tf2 randomizer plugin check more tf2 randomizer plugin
When the charge meters exceed this percentage (50 = 50%), the user is cloaked
-> “can climb wall”
Only really work for melee weapons
Hitting a wall will propel the user upward
-> “z velocity on hit”
“”
On hit, apply specified vertical velocity to the target
Does not work below 300
-> “z velocity on hit user”
“”
tf2 randomizer plugin tf2 randomizer plugin
On hit, apply specified vertical velocity to the user
Does not work below 300
-> “teleport on kill”
On kill, the user is teleported to the target
-> “damage change airborne”

While airborne, damage is multiplied by this amound
-> “crit vs airborne”
100% critical hits against airborne targets
-> “heal on draw”
tf2 randomizer plugin tf2 randomizer plugin

Scales the push force applied by damage
-> “heal on sheath”

Scales the push force applied by damage
-> “disorientate on hit”
On hit, the target’s eye angle is changed, disorienting it
-> “push force increased”

Multiplies the knockback inflicted by the weapon by this amount
tf2 randomizer plugin check more tf2 randomizer plugin
-> “cloak require full”
Only works on watches
Can’t activate cloak before the meter is full
-> “cloak remove status”
Only works on watches
On cloak, removes Afterburn, Bleeding, Jarate and Mad Milk
-> “cloak capped on decloak”

Only works on watches
On decloak, if your cloak is about the value (50 = 50%), it is reduced to the value
tf2 randomizer plugin informational tf2 randomizer plugin
-> “medi gun mini crits defense ubercharge”
Only works on mediguns
UberCharge grants mini crits and a defense buff
Override the default UberCharge
-> “medi gun kritz ubercharge”
Only works on mediguns
UberCharge grants crits in addition to its normal benefits
-> “uber on assist”

Only works on mediguns
tf2 randomizer plugin tf2 randomizer plugin
On assist, the user gains UberCharge (0.5 = 50%)
-> “backnacker heal”

A percent of damage dealt through bleeding and crits is healed (0.5 = 50%)
This can overheal without limit
-> “fires spells”

This weapon fires Spells, the value deciding which one.
Set TF2 attribute override projectile type to -1 on the weapon if you want to use this.
1 Fireball
tf2 randomizer plugin check more tf2 randomizer plugin
2 Ball O’ Lightning
3 Pumpkin MIRV (not working)
4 Pumpkin MIRV (single)
5 Ball O’ Bats
6 Meteor Storm
7 Teleport
8 Summon MONOCULUS
9 Summon Skeletons (not working)
10 Summon Skeleton (single)
*/
tf2 randomizer plugin best of tf2 randomizer plugin

// Here’s where we store attribute values, which are received when the attribute is applied.
// There’s one for each of the 2048 (+1) edict slots, which will sometimes be weapons.
// For example, when “crit damage multiplier” “0.6” is set on a weapon, we want
// CritDamage[thatweaponindex] to be set to 0.6, so we know to multiply the crit damage by 0.6x.
// There’s also HasAttribute[2049], for a super-marginal performance boost. Don’t touch it.
new bool:HasAttribute[2049];
new Float:JarateOnHit[2049] = {0.0, …};
new Float:MadMilkOnHit[2049] = {0.0, …};
new Float:DefenseOnHit[2049] = {0.0, …};
tf2 randomizer plugin best of tf2 randomizer plugin
new Float:SpeedOnHit[2049] = {0.0, …};
new Float:SpeedOnKill[2049] = {0.0, …};
new CritWhileLow[2049] = {0, …};
new Float:GlowOnHit[2049] = {0.0, …};
new Execute[2049] = {0, …};
new Float:CritaColaOnDraw[2049] = {0.0, …};
new ReloadOnKill[2049] = {0, …};
new CloakWithCharge[2049] = {0, …};
new bool:CanClimbWall[2049];
new Float:UpVelocityOnHit[2049] = {0.0, …};
tf2 randomizer plugin informational tf2 randomizer plugin
new Float:UpVelocityOnHitUser[2049] = {0.0, …};
new bool:TeleportOnKill[2049];
new Float:DamageChangeAirborne[2049] = {1.0, …};
new bool:CritVsAirborne[2049];
new HealOnDraw[2049] = {0, …};
new HealOnSheath[2049] = {0, …};
new bool:DisorientateOnHit[2049];
new Float:PushForceIncreased[2049] = {1.0, …};
new bool:CloakRequireFull[2049];
new bool:CloakRemoveStatus[2049];
tf2 randomizer plugin informational tf2 randomizer plugin
new Float:CloakCappedOnDecloak[2049] = {100.0, …};
new bool:MediGunMiniCritsDefenseUber[2049];
new bool:MediGunKritzUber[2049];
new Float:UberOnAssist[2049] = {0.0, …};
new Float:BacknackerHeal[2049] = {0.0, …};
new FiresSpells[2049] = {0, …};

// Here’s a great spot to place “secondary” variables used by attributes, such as
// “ReduxHypeBonusDraining[2049]” (custom-attributes.sp) or client variables,
// like the one seen below, which shows the next time we can play a “click” noise.
tf2 randomizer plugin tf2 randomizer plugin
new Float:GlowTimer[MAXPLAYERS+1];
new LastWeaponHurtWith[MAXPLAYERS + 1];
new Sheath[MAXPLAYERS + 1];
new bool:CanCloak[MAXPLAYERS + 1];

public OnPluginStart()
{
HookEvent(“player_death”, Event_Death);

// We’ll set weapons’ ammo counts every ten times a second if they have infinite ammo.
tf2 randomizer plugin informational tf2 randomizer plugin
CreateTimer(0.1, Timer_TenTimesASecond, _, TIMER_REPEAT);

// Since we’re hooking damage (seen below), we need to hook the below hooks on players who were
// already in the game when the plugin loaded, if any.
for (new i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i)) continue;
OnClientPutInServer(i);
}
}
tf2 randomizer plugin informational tf2 randomizer plugin

// Usually, you'll want to hook damage done to players, using SDK Hooks.
// You'll need to do so in OnPluginStart (taken care of above) and in OnClientPutInServer.
public OnClientPutInServer(client)
{
GlowTimer[client]=0.0;
LastWeaponHurtWith[client] = 0;
Sheath[client] = 0;
CanCloak[client] = true;
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
tf2 randomizer plugin tf2 randomizer plugin
SDKHook(client, SDKHook_OnTakeDamagePost, OnTakeDamagePost);
SDKHook(client, SDKHook_TraceAttack, OnTraceAttack);
SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
}

// This is called whenever a custom attribute is added, so first…
public Action:CustomWeaponsTF_OnAddAttribute(weapon, client, const String:attrib[], const String:plugin[], const String:value[])
{
// Filter out other plugins. If "plugin" is not "basic-attributes", then ignore this attribute.
if (!StrEqual(plugin, "lykrast-attributes")) return Plugin_Continue;
tf2 randomizer plugin informational tf2 randomizer plugin

// "action" here is what we'll return to the base Custom Weapons plugin when we're done.
// It defaults to "Plugin_Continue" which means the attribute wasn't recognized. So let's check if we
// know what attribute this is…
new Action:action;

// Compare the attribute's name against each of our own.
// In this case, if it's "aim punch multiplier"…
if (StrEqual(attrib, "jarate on hit"))
{
tf2 randomizer plugin informational tf2 randomizer plugin
// …then get the number from the "value" string, and remember that.
JarateOnHit[weapon] = StringToFloat(value);

// We recognize the attribute and are ready to make it work!
action = Plugin_Handled;
}
else if (StrEqual(attrib, "mad milk on hit"))
{
MadMilkOnHit[weapon] = StringToFloat(value);
action = Plugin_Handled;
tf2 randomizer plugin tf2 randomizer plugin
}
else if (StrEqual(attrib, "defense on hit"))
{
DefenseOnHit[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "speed on hit"))
{
SpeedOnHit[weapon] = StringToFloat(value);
action = Plugin_Handled;
tf2 randomizer plugin informational tf2 randomizer plugin
}
else if (StrEqual(attrib, "speed on kill"))
{
SpeedOnKill[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "crit while low"))
{
CritWhileLow[weapon] = StringToInt(value);
action = Plugin_Handled;
tf2 randomizer plugin check more tf2 randomizer plugin
}
else if (StrEqual(attrib, "glow on hit"))
{
GlowOnHit[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "execute"))
{
Execute[weapon] = StringToInt(value);
action = Plugin_Handled;
tf2 randomizer plugin informational tf2 randomizer plugin
}
else if (StrEqual(attrib, "crit a cola on draw"))
{
CritaColaOnDraw[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "reload on kill"))
{
ReloadOnKill[weapon] = StringToInt(value);
action = Plugin_Handled;
tf2 randomizer plugin informational tf2 randomizer plugin
}
else if (StrEqual(attrib, "cloak with charge"))
{
CloakWithCharge[weapon] = StringToInt(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "can climb wall"))
{
// Some attributes are simply on/off, so we don't need to check the "value" string.
CanClimbWall[weapon] = true;
tf2 randomizer plugin best of tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "z velocity on hit"))
{
UpVelocityOnHit[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "z velocity on hit user"))
{
UpVelocityOnHitUser[weapon] = StringToFloat(value);
tf2 randomizer plugin check more tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "teleport on kill"))
{
TeleportOnKill[weapon] = true;
action = Plugin_Handled;
}
else if (StrEqual(attrib, "damage change airborne"))
{
DamageChangeAirborne[weapon] = StringToFloat(value);
tf2 randomizer plugin check more tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "crit vs airborne"))
{
CritVsAirborne[weapon] = true;
action = Plugin_Handled;
}
else if (StrEqual(attrib, "heal on draw"))
{
HealOnDraw[weapon] = StringToInt(value);
tf2 randomizer plugin tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "heal on sheath"))
{
HealOnSheath[weapon] = StringToInt(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "disorientate on hit"))
{
DisorientateOnHit[weapon] = true;
tf2 randomizer plugin tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "push force increased"))
{
PushForceIncreased[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "cloak require full"))
{
CloakRequireFull[weapon] = true;
tf2 randomizer plugin best of tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "cloak remove status"))
{
CloakRemoveStatus[weapon] = true;
action = Plugin_Handled;
}
else if (StrEqual(attrib, "cloak capped on decloak"))
{
CloakCappedOnDecloak[weapon] = StringToFloat(value);
tf2 randomizer plugin tf2 randomizer plugin
action = Plugin_Handled;
}
else if (StrEqual(attrib, "medi gun mini crits defense ubercharge"))
{
MediGunMiniCritsDefenseUber[weapon] = true;
TF2Attrib_SetByName(weapon, "medigun charge is crit boost", -1.0);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "medi gun kritz ubercharge"))
{
tf2 randomizer plugin best of tf2 randomizer plugin
MediGunKritzUber[weapon] = true;
action = Plugin_Handled;
}
else if (StrEqual(attrib, "uber on assist"))
{
UberOnAssist[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "backnacker heal"))
{
tf2 randomizer plugin tf2 randomizer plugin
BacknackerHeal[weapon] = StringToFloat(value);
action = Plugin_Handled;
}
else if (StrEqual(attrib, "fires spells"))
{
FiresSpells[weapon] = StringToInt(value);
action = Plugin_Handled;
}

// If the weapon isn't already marked as custom (as far as this plugin is concerned)
tf2 randomizer plugin informational tf2 randomizer plugin
// then mark it as custom, but ONLY if we've set "action" to Plugin_Handled.
if (!HasAttribute[weapon]) HasAttribute[weapon] = bool:action;

// Let Custom Weapons know that we're going to make the attribute work (Plugin_Handled)
// or let it print a warning (Plugin_Continue).
return action;
}
// ^ Remember, this is called once for every custom attribute (attempted to be) applied!

// Now, let's start making those attributes work.
tf2 randomizer plugin check more tf2 randomizer plugin
// Every time a player takes damage, we'll check if the weapon that the attacker used
// has one of our attributes.
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3])
{
if (attacker MaxClients) return Plugin_Continue; // Attacker isn’t valid, so the weapon won’t be either.
if (damage <= 0) return Plugin_Continue;
if (weapon == -1) return Plugin_Continue; // Weapon is invalid, so it won't be custom.
LastWeaponHurtWith[attacker] = weapon;
if (!HasAttribute[weapon]) return Plugin_Continue; // Weapon is valid, but doesn't have one of our attributes. We don't care!

tf2 randomizer plugin best of tf2 randomizer plugin
// If we've gotten this far, we might need to take "action" c:
// But, seriously, we might. Our "action" will be set to Plugin_Changed if we
// change anything about this damage.
new Action:action;

// Does this weapon have the "aim punch multiplier" attribute? 1.0 is the default for this attribute, so let's compare against that.
// Also, make sure the victim is a player.
if (Execute[weapon] != 0 && GetClientHealth(victim) 0 && victim <= MaxClients)
{
// It does, and this is a crit, so multiply the damage by the variable we just checked.
tf2 randomizer plugin informational tf2 randomizer plugin
damage += GetClientHealth(victim) * 2;

// We changed the damage, so we need to return Plugin_Changed below…
action = Plugin_Changed;
}

if (DamageChangeAirborne[weapon] != 1.0)
{
new Float:fVelocity[3];
GetEntPropVector(attacker, Prop_Data, "m_vecVelocity", fVelocity);
tf2 randomizer plugin informational tf2 randomizer plugin
if (fVelocity[2] != 0.0)
{
damage *= DamageChangeAirborne[weapon];
action = Plugin_Changed;
}
}

if (CritVsAirborne[weapon])
{
new Float:fVelocity[3];
tf2 randomizer plugin check more tf2 randomizer plugin
GetEntPropVector(victim, Prop_Data, "m_vecVelocity", fVelocity);
if (fVelocity[2] != 0.0)
{
damagetype |= DMG_CRIT;
action = Plugin_Changed;
}
}

if (PushForceIncreased[weapon] != 1.0) //Borrowed from AW2
{
tf2 randomizer plugin tf2 randomizer plugin
decl Float:vAng[3], Float:vVelocity[3];
GetClientEyeAngles(attacker, vAng);
vAng[0] = -40.0;
AnglesToVelocity(vAng, vVelocity, 200.0 * PushForceIncreased[weapon]);

TeleportEntity(victim, NULL_VECTOR, NULL_VECTOR, vVelocity);
action = Plugin_Changed;
}

// Return Plugin_Continue if the damage wasn't changed, or Plugin_Changed if it was. Done!
tf2 randomizer plugin tf2 randomizer plugin
return action;
}

// We also check AFTER the damage was applied, which you should honestly try to do if your attribute
// is not going to change anything about the damage itself.
// This way, other plugins (and attributes!) can change the damage's information, and you will know.
public OnTakeDamagePost(victim, attacker, inflictor, Float:damage, damagetype, weapon, const Float:damageForce[3], const Float:damagePosition[3])
{
if (attacker MaxClients) return;
if (weapon == -1) return;
tf2 randomizer plugin check more tf2 randomizer plugin
if (!HasAttribute[weapon]) return;
if (victim MaxClients) return;
if (damage 40.0) fSpin = 40.0;

tf2 randomizer plugin tf2 randomizer plugin
GetClientEyeAngles(victim, vEyeAngles);
vEyeAngles[0] += GetRandomFloat(-1.0, 1.0) * fSpin * 0.6;
vEyeAngles[1] += GetRandomFloat(-1.0, 1.0) * fSpin * 0.6;
TeleportEntity(victim, NULL_VECTOR, vEyeAngles, NULL_VECTOR);
}
}

// In addition to the above damage hooks, we also have TraceAttack, which is done before either of them,
// and also can detect most hits on teammates! Unfortunately, though, it doesn’t have as much information as OnTakeDamage.
// Still, it can be really useful. We’ll use it here for “speed boost on hit teammate”.
tf2 randomizer plugin check more tf2 randomizer plugin
public Action:OnTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, hitgroup)
{
if (attacker MaxClients) return Plugin_Continue;
new weapon = GetEntPropEnt(attacker, Prop_Send, “m_hActiveWeapon”); // We have to get the weapon manually, sadly; this also means that
if (weapon == -1) return Plugin_Continue; // attributes that use this can only be applied to “hitscan” weapons.
if (!HasAttribute[weapon]) return Plugin_Continue;
return Plugin_Continue;
}

// Here’s another great thing to track; TF2_CalcIsAttackCritical.
tf2 randomizer plugin best of tf2 randomizer plugin
// It’s a simple forward (no hooking needed) that fires whenever a client uses a weapon. Very handy!
public Action:TF2_CalcIsAttackCritical(client, weapon, String:weaponname[], &bool:result)
{
if (!HasAttribute[weapon]) return Plugin_Continue;

if (CanClimbWall[weapon]) //Borrowed from Randomizer
{
SickleClimbWalls(client);
}

tf2 randomizer plugin check more tf2 randomizer plugin
if (FiresSpells[weapon]) //Borrowed from a plugin
{
new Float:vAngles[3]; // original
new Float:vPosition[3]; // original
GetClientEyeAngles(client, vAngles);
GetClientEyePosition(client, vPosition);
new String:strEntname[45] = “”;
switch(FiresSpells[weapon])
{
case 1: strEntname = “tf_projectile_spellfireball”;
tf2 randomizer plugin check more tf2 randomizer plugin
case 2: strEntname = “tf_projectile_lightningorb”;
case 3: strEntname = “tf_projectile_spellmirv”;
case 4: strEntname = “tf_projectile_spellpumpkin”;
case 5: strEntname = “tf_projectile_spellbats”;
case 6: strEntname = “tf_projectile_spellmeteorshower”;
case 7: strEntname = “tf_projectile_spelltransposeteleport”;
case 8: strEntname = “tf_projectile_spellspawnboss”;
case 9: strEntname = “tf_projectile_spellspawnhorde”;
case 10: strEntname = “tf_projectile_spellspawnzombie”;
}
tf2 randomizer plugin best of tf2 randomizer plugin
new team = GetClientTeam(client);
new spell = CreateEntityByName(strEntname);

decl Float:vVelocity[3];
decl Float:vBuffer[3];

GetAngleVectors(vAngles, vBuffer, NULL_VECTOR, NULL_VECTOR);

vVelocity[0] = vBuffer[0]*1100.0; //Speed of a tf2 rocket.
vVelocity[1] = vBuffer[1]*1100.0;
tf2 randomizer plugin informational tf2 randomizer plugin
vVelocity[2] = vBuffer[2]*1100.0;

SetEntPropEnt(spell, Prop_Send, “m_hOwnerEntity”, client);
SetEntProp(spell, Prop_Send, “m_bCritical”, (GetRandomInt(0, 100) = 30.0 && fNormal[0] <= 330.0) return;
if (fNormal[0] = 100.0) return;

new Float:fVelocity[3];
GetEntPropVector(client, Prop_Data, “m_vecVelocity”, fVelocity);
fVelocity[2] = 600.0;
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, fVelocity);
ClientCommand(client, “playgamesound “%s””, “player\taunt_clip_spin.wav”);
}
tf2 randomizer plugin best of tf2 randomizer plugin

// Here’s another one, OnPlayerRunCmd. It’s called once every frame for every single player.
// You can use it to change around what the client is pressing (like fire/alt-fire) and do other
// precise actions. But it’s once every frame (66 times/second), so avoid using expensive things like
// comparing strings or TF2_IsPlayerInCondition!
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:ang[3], &weapon2)
{
new weapon = GetEntPropEnt(client, Prop_Send, “m_hActiveWeapon”);
if (weapon 2048) return Plugin_Continue;
if (!HasAttribute[weapon]) return Plugin_Continue;
tf2 randomizer plugin check more tf2 randomizer plugin

new Action:action;
return action;
}

public TF2_OnConditionAdded(client, TFCond:cond)
{
if (client MaxClients) return;

if (cond == TFCond_Cloaked)
tf2 randomizer plugin check more tf2 randomizer plugin
{
new invis = GetPlayerWeaponSlot(client, 4);
if (invis > -1)
{
if (HasAttribute[invis])
{
if (CloakRequireFull[invis] && GetEntPropFloat(client, Prop_Send, “m_flCloakMeter”) < 100.0)
{
TF2_RemoveCondition(client, TFCond_Cloaked);
CanCloak[client] = false;
tf2 randomizer plugin informational tf2 randomizer plugin
}

if (CloakRemoveStatus[invis] && CanCloak[client])
{
if(TF2_IsPlayerInCondition(client, TFCond_OnFire))
TF2_RemoveCondition(client, TFCond_OnFire);

if(TF2_IsPlayerInCondition(client, TFCond_Bleeding))
TF2_RemoveCondition(client, TFCond_Bleeding);

tf2 randomizer plugin tf2 randomizer plugin
if(TF2_IsPlayerInCondition(client, TFCond_Jarated))
TF2_RemoveCondition(client, TFCond_Jarated);

if(TF2_IsPlayerInCondition(client, TFCond_Milked))
TF2_RemoveCondition(client, TFCond_Milked);
}
}
}
}
}
tf2 randomizer plugin tf2 randomizer plugin

public TF2_OnConditionRemoved(client, TFCond:cond)
{
if (client MaxClients) return;

if (cond == TFCond_Cloaked)
{
new invis = GetPlayerWeaponSlot(client, 4);
if (invis > -1)
{
tf2 randomizer plugin tf2 randomizer plugin
if (CloakCappedOnDecloak[invis] != 100.0 && CanCloak[client])
{
if (GetEntPropFloat(client, Prop_Send, “m_flCloakMeter”) > CloakCappedOnDecloak[invis])
SetEntPropFloat(client, Prop_Send, “m_flCloakMeter”, CloakCappedOnDecloak[invis]);
}
}

if (!CanCloak[client])
CanCloak[client] = true;
}
tf2 randomizer plugin informational tf2 randomizer plugin
}

public Action:Event_Death(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, “userid”));
new attacker = GetClientOfUserId(GetEventInt(event, “attacker”));
new assister = GetClientOfUserId(GetEventInt(event, “assister”));
new bool:feign = bool:(GetEventInt(event, “death_flags”) & TF_DEATHFLAG_DEADRINGER);
GlowTimer[victim]=0.0;
Sheath[victim] = 0;
tf2 randomizer plugin check more tf2 randomizer plugin
SetEntProp(victim, Prop_Send, “m_bGlowEnabled”, 0);
if (attacker)
{
new weapon = LastWeaponHurtWith[attacker];
if (HasAttribute[weapon])
{
if (SpeedOnKill[weapon] != 0.0 && victim > 0 && victim <= MaxClients && !feign)
TF2_AddCondition(attacker, TFCond_SpeedBuffAlly, SpeedOnKill[weapon]);

if (ReloadOnKill[weapon] != 0 && !feign)
tf2 randomizer plugin check more tf2 randomizer plugin
{
new ammoType = GetEntProp(weapon, Prop_Send, "m_iPrimaryAmmoType");
new reloaded = ReloadOnKill[weapon] – GetEntProp(weapon, Prop_Data, "m_iClip1");
if(ammoType != -1)
{
if (GetEntProp(attacker, Prop_Data, "m_iAmmo", _, ammoType) 0)
{
if (HasAttribute[medigun])
{
if (UberOnAssist[medigun] && !feign)
{
tf2 randomizer plugin best of tf2 randomizer plugin
new Float:level = GetEntPropFloat(medigun, Prop_Send, “m_flChargeLevel”) + UberOnAssist[medigun];
if (level 1.0) level = 1.0;
SetEntPropFloat(medigun, Prop_Send, “m_flChargeLevel”, level);
}
}
}
}
}

tf2 randomizer plugin check more tf2 randomizer plugin
public Action:OnWeaponSwitch(client, weapon)
{
if (!IsValidEntity(weapon)) return Plugin_Continue;

if (Sheath[client] != 0)
{
new health = GetClientHealth(client);
health += Sheath[client];
if (health <= 0)
health = 1;
tf2 randomizer plugin tf2 randomizer plugin
SetEntityHealth(client, health);
new Handle:healevent = CreateEvent("player_healonhit", true);
SetEventInt(healevent, "entindex", client);
SetEventInt(healevent, "amount", Sheath[client]);
FireEvent(healevent);
Sheath[client] = 0;
}

if (!HasAttribute[weapon]) return Plugin_Continue;

tf2 randomizer plugin informational tf2 randomizer plugin
if (CritaColaOnDraw[weapon] != 0.0)
TF2_AddCondition(client, TFCond_CritCola, CritaColaOnDraw[weapon]);

if (HealOnDraw[weapon] != 0)
{
new health = GetClientHealth(client);
health += HealOnDraw[weapon];
SetEntityHealth(client, health);
new Handle:healevent = CreateEvent("player_healonhit", true);
SetEventInt(healevent, "entindex", client);
tf2 randomizer plugin informational tf2 randomizer plugin
SetEventInt(healevent, "amount", HealOnDraw[weapon]);
FireEvent(healevent);
}

if (HealOnSheath[weapon] != 0)
Sheath[client] = HealOnSheath[weapon];

return Plugin_Continue;
}

tf2 randomizer plugin tf2 randomizer plugin
// If you need to check things like strings or conditions, a repeating-0.1-second timer like this one
// is a much better choice. Though, really, you should try to keep things out of OnGameFrame/OnPlayerRunCmd
// as often as possible. Even if the below "infinite ammo" was being set 66 times a second instead of 10 times,
// client prediction still makes it look like 10 times per second.
public Action:Timer_TenTimesASecond(Handle:timer)
{
for (new client = 1; client <= MaxClients; client++)
{
if (!IsClientInGame(client)) continue;
if (!IsPlayerAlive(client)) continue;
tf2 randomizer plugin check more tf2 randomizer plugin
SetClientGlow(client, -0.1);
new wep = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
if (wep == -1) continue;
if (!HasAttribute[wep]) continue;

if (CritWhileLow[wep] != 0 && GetClientHealth(client) (CloakWithCharge[wep] * 1.5))
TF2_AddCondition(client, TFCond_StealthedUserBuffFade, 0.12);
tf2 randomizer plugin best of tf2 randomizer plugin

if (MediGunMiniCritsDefenseUber[wep])
{
if (GetEntProp(wep, Prop_Send, “m_bChargeRelease”))
{
TF2_AddCondition(client, TFCond_Buffed, 0.12);
TF2_AddCondition(client, TFCond_DefenseBuffed, 0.12);
new patient = GetMediGunPatient(client);
if (patient > -1 && patient -1 && patient <= MaxClients)
{
if (IsPlayerAlive(patient))
{
TF2_AddCondition(patient, TFCond_HalloweenCritCandy, 0.12);
tf2 randomizer plugin check more tf2 randomizer plugin
}
}
}
}
}
}

SetClientGlow(client, Float:time1, Float:time2=-1.0)
{
if(client MaxClients)
tf2 randomizer plugin informational tf2 randomizer plugin
{
return;
}

GlowTimer[client]+=time1;
if(time2>=0)
{
GlowTimer[client]=time2;
}

tf2 randomizer plugin tf2 randomizer plugin
if(GlowTimer[client]<=0.0)
{
GlowTimer[client]=0.0;
SetEntProp(client, Prop_Send, "m_bGlowEnabled", 0);
}
else
{
SetEntProp(client, Prop_Send, "m_bGlowEnabled", 1);
}
}
tf2 randomizer plugin informational tf2 randomizer plugin

stock AnglesToVelocity(Float:fAngle[3], Float:fVelocity[3], Float:fSpeed = 1.0)
{
fVelocity[0] = Cosine(DegToRad(fAngle[1]));
fVelocity[1] = Sine(DegToRad(fAngle[1]));
fVelocity[2] = Sine(DegToRad(fAngle[0])) * -1.0;

NormalizeVector(fVelocity, fVelocity);

ScaleVector(fVelocity, fSpeed);
tf2 randomizer plugin tf2 randomizer plugin
}

stock GetMediGunPatient(client)
{
new wep = GetPlayerWeaponSlot(client, 1);
if (wep == -1 || wep != GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon")) return -1;
new String:class[15];
GetEdictClassname(wep, class, sizeof(class));
if (StrContains(class, "tf_weapon_med", false)) return -1;
return GetEntProp(wep, Prop_Send, "m_bHealing") ? GetEntPropEnt(wep, Prop_Send, "m_hHealingTarget") : -1;
tf2 randomizer plugin tf2 randomizer plugin
}

public bool:TraceRayDontHitSelf(entity, mask, any:data)
{
return (entity != data);
}

// Once a weapon entity has been "destroyed", it's been unequipped.
// Unfortunately, that also means that we need to reset all of its variables.
// If you don't, really bad things will happen to the next weapon that occupies that entity slot,
tf2 randomizer plugin best of tf2 randomizer plugin
// custom or not!
public OnEntityDestroyed(Ent)
{
if (Ent 2048) return;
HasAttribute[Ent] = false;
JarateOnHit[Ent] = 0.0;
MadMilkOnHit[Ent] = 0.0;
DefenseOnHit[Ent] = 0.0;
SpeedOnHit[Ent] = 0.0;
SpeedOnKill[Ent] = 0.0;
tf2 randomizer plugin informational tf2 randomizer plugin
CritWhileLow[Ent] = 0;
GlowOnHit[Ent] = 0.0;
Execute[Ent] = 0;
CritaColaOnDraw[Ent] = 0.0;
ReloadOnKill[Ent] = 0;
CloakWithCharge[Ent] = 0;
CanClimbWall[Ent] = false;
UpVelocityOnHit[Ent] = 0.0;
UpVelocityOnHitUser[Ent] = 0.0;
TeleportOnKill[Ent] = false;
tf2 randomizer plugin informational tf2 randomizer plugin
DamageChangeAirborne[Ent] = 1.0;
CritVsAirborne[Ent] = false;
HealOnDraw[Ent] = 0;
HealOnSheath[Ent] = 0;
DisorientateOnHit[Ent] = false;
PushForceIncreased[Ent] = 1.0;
CloakRequireFull[Ent] = false;
CloakRemoveStatus[Ent] = false;
CloakCappedOnDecloak[Ent] = 100.0;
MediGunMiniCritsDefenseUber[Ent] = false;
tf2 randomizer plugin tf2 randomizer plugin
MediGunKritzUber[Ent] = false;
UberOnAssist[Ent] = 0.0;
BacknackerHeal[Ent] = 0.0;
FiresSpells[Ent] = 0;
}
tf2 randomizer plugin

Medical Terminology Complete 3rd Edition Pdf Download

Udipi Cafe