Skip to content

Commit

Permalink
diamondback, crossbow cop ability,
Browse files Browse the repository at this point in the history
  • Loading branch information
higps committed Feb 23, 2024
1 parent e097356 commit 0e00b3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions ability_free_healer_medic_drcrossbowcop_ability.sp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#define PLUGIN_VERSION "1.0"
#define ROBOT_NAME "Dr. Crossbow Cop"

bool g_isSetup = true;
public Plugin:myinfo =
{
name = "[TF2] Dr. Crossbow Cop Ability",
Expand All @@ -23,6 +23,7 @@ public OnPluginStart()
HookEvent("player_spawn", Event_PlayerSpawn);
HookEvent("post_inventory_application", Event_PlayerSpawn);
HookEvent("crossbow_heal", Event_Crossbow_Heal, EventHookMode_Post);
HookEvent("teamplay_setup_finished", Event_teamplay_setup_finished, EventHookMode_Post);
}


Expand All @@ -38,7 +39,7 @@ public Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadc
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if (IsRobot(client, ROBOT_NAME))
{
g_healcount = 0;
g_healcount = !g_isSetup ? 0 : g_Heal_Bolts_Hits_Needed;
}

return Plugin_Continue;
Expand Down Expand Up @@ -139,6 +140,13 @@ public bool IsKritzed(int client){
}
}


public Action Event_teamplay_setup_finished(Event event, const char[] name, bool dontBroadcast)
{
g_isSetup = false;
return Plugin_Continue;
}

public Action Event_Crossbow_Heal(Event event, const char[] name, bool dontBroadcast)
{
int healer = GetClientOfUserId(GetEventInt(event, "healer"));
Expand Down
2 changes: 1 addition & 1 deletion berobot_dmg_handler.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ public Action Event_post_inventory_application(Event event, const char[] name, b
if(isLibertyLauncher(Weapon1))
{
stat1 = 1.3;
Format(chat_display, sizeof(chat_display), "%s{orange}\nLiberty Launcher: -%0.0f%%%% {teamcolor}faster move speed",chat_display, MoreIsMore(stat1));
Format(chat_display, sizeof(chat_display), "%s\n{Teamcolor}Mantreads from Liberty Launcher: {orange}+%0.0f%%%% faster move speed",chat_display, MoreIsMore(stat1));
TF2Attrib_SetByName(SoldierShoes, "move speed bonus", stat1);
}
}
Expand Down
1 change: 1 addition & 0 deletions cfg/robots/free_engineer_barricade.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"quality" "6"
"level" "1"
"slot" "0"
"warpaint_id" "417"
"attributes"
{
"fire rate bonus" "0.8"
Expand Down

0 comments on commit 0e00b3b

Please sign in to comment.