|
Junior Member
|
10-23-2017
, 06:49
Re: [REQ] Add amount of hp to boss when player is killed
|
#5
|
I wrote simplified ability plugin based of brutal sniper's one, but in-game it doesn't working at all, again... Any idea why?
(rage_addhp.ff2)
public OnPluginStart2()
{
HookEvent("player_death", event_player_death);
}
public Action:FF2_OnAbility2(index,const String:plugin_name[],const String:ability_name[],action)
{
return Plugin_Continue;
}
public Action:event_player_death(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetEventInt(event, "death_flags") & TF_DEATHFLAG_DEADRINGER)
return Plugin_Continue;
new attacker=GetClientOfUserId(GetEventInt(event, "attacker"));
new client=GetClientOfUserId(GetEventInt(event, "userid"));
new a_index=FF2_GetBossIndex(attacker);
new v_index=FF2_GetBossIndex(client);
if (a_index != -1)
{
if (FF2_HasAbility(a_index,this_plugin_name,"rag e_addhp_to_boss"))
{
FF2_SetBossHealth(attacker, FF2_GetBossHealth(attacker) + 200);
}
}
return Plugin_Continue;
}
(boss' config)
"ability8"
{
"name" "rage_addhp_to_boss"
"plugin_name" "rage_addhp"
}
Last edited by Spooky Iluha; 10-23-2017 at 09:35.
|
|
|
|