-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathability_free_healer_medic_theory-y_ability.sp
60 lines (44 loc) · 1.4 KB
/
ability_free_healer_medic_theory-y_ability.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma semicolon 1
#include <sourcemod>
#include <tf2_stocks>
#include <tf2attributes>
#include <berobot_constants>
#include <berobot>
#define PLUGIN_VERSION "1.0"
#define ROBOT_NAME "Theory-Y"
public Plugin:myinfo =
{
name = "[TF2] Theory-Y vaccinator",
author = "Erofix using the code from: Pelipoika, PC Gamer, Jaster and StormishJustice",
description = "Play as the Giant Medic from MvM",
version = PLUGIN_VERSION,
url = "www.sourcemod.com"
}
public void TF2_OnConditionAdded(int client, TFCond condition)
{
//PrintToChatAll("CONDITION WAS: %i for %N", condition, client);
if (IsRobot(client, ROBOT_NAME)){
int medigun = GetPlayerWeaponSlot(client, TFWeaponSlot_Secondary);
int healtarget = -1;
if(GetEntProp(medigun, Prop_Send, "m_bHealing"))
{
healtarget = GetEntPropEnt(medigun, Prop_Send, "m_hHealingTarget");
//PrintToChatAll("Healtarget was: %N", healtarget);
}
if (IsValidClient(healtarget) && IsPlayerAlive(healtarget))
{
if(condition == TFCond_UberBulletResist){
TF2_AddCondition(healtarget,TFCond_CritCola, 4.0);
TF2_AddCondition(client, TFCond_CritCola, 4.0);
}
if(condition == TFCond_UberBlastResist){
TF2_AddCondition(healtarget,TFCond_RegenBuffed, 4.0);
TF2_AddCondition(client,TFCond_RegenBuffed, 4.0);
}
if(condition == TFCond_UberFireResist){
TF2_AddCondition(healtarget,TFCond_DefenseBuffed, 4.0);
TF2_AddCondition(client,TFCond_DefenseBuffed, 4.0);
}
}
}
}