-
Notifications
You must be signed in to change notification settings - Fork 7
/
ability_free_healer_medic_beskymin_ability.sp
59 lines (46 loc) · 1.4 KB
/
ability_free_healer_medic_beskymin_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
#pragma semicolon 1
#include <sourcemod>
#include <tf2_stocks>
#include <tf2attributes>
#include <berobot_constants>
#include <berobot>
#include <tf_ontakedamage>
#define ROBOT_NAME "Skymin Slash"
#define PLUGIN_VERSION "1.0"
public Plugin:myinfo =
{
name = "[TF2] Skymin slash ability",
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 OnPluginEnd()
{
RemoveRobot(ROBOT_NAME);
}
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
// CreateNative("BeGiantMedic_MakeGiantMedic", Native_SetGiantMedic);
// CreateNative("BeGiantMedic_IsGiantMedic", Native_IsGiantMedic);
return APLRes_Success;
}
public void TF2_OnConditionAdded(int client, TFCond condition)
{
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");
}
if (IsValidClient(healtarget) && IsPlayerAlive(healtarget))
{
if(condition == TFCond_UberBulletResist || condition == TFCond_UberBlastResist || condition == TFCond_UberFireResist){
TF2_AddCondition(client, TFCond_RuneWarlock, 4.0);
TF2_AddCondition(healtarget, TFCond_RuneWarlock, 4.0);
}
}
}
}