AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   VSH / Freak Fortress (https://forums.alliedmods.net/forumdisplay.php?f=154)
-   -   [REQ] Add amount of hp to boss when player is killed (https://forums.alliedmods.net/showthread.php?t=301721)

Spooky Iluha 10-02-2017 11:59

[REQ] Add amount of hp to boss when player is killed
 
This ability plugin would be great for one on my bosses. Can you please create one?

If there is an ability plugin like that, I would really appreciate to get a link.

p0008874 10-07-2017 01:11

Re: [REQ] Add amount of hp to boss when player is killed
 
Like painis cupcake from other vsh server?
idk.

Spooky Iluha 10-08-2017 00:30

Re: [REQ] Add amount of hp to boss when player is killed
 
idk, if he has the ability to regenerate hp by killing players, then yes

Wliu 10-21-2017 19:23

Re: [REQ] Add amount of hp to boss when player is killed
 
Should be a pretty simple plugin: hook OnPlayerDeath and if the player was killed by the boss call FF2_SetBossHealth(boss, FF2_GetBossHealth(boss) + health_of_killed_player).

Spooky Iluha 10-23-2017 06:49

Re: [REQ] Add amount of hp to boss when player is killed
 
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"
}

Wliu 10-24-2017 14:49

Re: [REQ] Add amount of hp to boss when player is killed
 
FF2_GetBossHealth requires a boss index (a_index), not a client index.


All times are GMT -4. The time now is 02:58.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.