Raised This Month: $12 Target: $400
 3% 

[TF2] Green healing indicator, Ammo pack entity, Extinguish


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZackNAttack
Junior Member
Join Date: Aug 2019
Old 08-18-2019 , 11:18   [TF2] Green healing indicator, Ammo pack entity, Extinguish
Reply With Quote #1

I have three questions:

Is there a way to, with input being an integer, create the green text that appears from touching a health kit?

What is the name for the ammo pack entity dropped when someone dies?

How do I extinguish players?
ZackNAttack is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-18-2019 , 11:26   Re: [TF2] Green healing indicator, Ammo pack entity, Extinguish
Reply With Quote #2

2. I believe it's tf_ammo_pack

3. I believe it's the generic ExtinguishEntity function.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
ZackNAttack
Junior Member
Join Date: Aug 2019
Old 08-18-2019 , 12:06   Re: [TF2] Green healing indicator, Ammo pack entity, Extinguish
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
2. I believe it's tf_ammo_pack.
Does HookEntityOutput("tf_ammo_pack","OnPlayerTouc h",EntityOutput_AmmoPackMedium); not work for detecting on-death ammo packs being touched?

Quote:
Originally Posted by Powerlord View Post
3. I believe it's the generic ExtinguishEntity function
Is there some kind of function to turn client id into entity id or something? For some reason it worked the first time but not afterwards.

Last edited by ZackNAttack; 08-18-2019 at 12:11.
ZackNAttack is offline
ZackNAttack
Junior Member
Join Date: Aug 2019
Old 10-22-2019 , 21:11   Re: [TF2] Green healing indicator, Ammo pack entity, Extinguish
Reply With Quote #4

I found it! Remove the condition TF_COND_BURNING / condition 22
ZackNAttack is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 12-03-2021 , 02:59   Re: [TF2] Green healing indicator, Ammo pack entity, Extinguish
Reply With Quote #5

Quote:
Originally Posted by ZackNAttack View Post
Is there a way to, with input being an integer, create the green text that appears from touching a health kit?
Here's a GiveHealth stock I use that recreates the green health text. If you only need the green text part, check the Event lines.
Unfortunately, recent updates to TF2 have disabled the green text now.
In the past, this stock's green text worked. Sorry for not having found this earlier.

PHP Code:
void GiveHealth(int clientint total_Heal 0bool overheal falsebool event true)
{
    if (
total_Heal <= 0) return;
    
    
int HP GetClientHealth(client);
    
int max_HP GetResourceProperty(client"m_iMaxHealth");
    if (
overheal)
    { 
max_HP max_HP+(max_HP/2); }
    
    
/*if (total_Heal+HP >= max_HP)
    { SetEntityHealth(client, max_HP); }
    else
    { SetEntityHealth(client, total_Heal+HP); }*/
    
if (HP max_HP)
    {
        if (
total_Heal+HP >= max_HP)
        { 
SetEntityHealth(clientmax_HP); }
        else
        { 
SetEntityHealth(clienttotal_Heal+HP); }
    }
    
    if (
event)
    {
        
Event player_healonhit CreateEvent("player_healonhit"true);
        
SetEventInt(player_healonhit"amount"total_Heal);
        
SetEventInt(player_healonhit"entindex"EntRefToEntIndex(client));
        
FireEvent(player_healonhit);
    }
}

int GetResourceProperty(int client, const char[] str)
{
    
int ply_manager GetPlayerResourceEntity();
    if (
RealValidEntity(ply_manager))
    {
        return 
GetEntProp(ply_managerProp_Sendstr_client);
    }
    return -
1;

__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4

Last edited by Shadowysn; 12-03-2021 at 03:01.
Shadowysn is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:27.


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