View Single Post
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 06-19-2018 , 12:21   Re: [L4D2] Survivor healed
Reply With Quote #12

Quote:
Originally Posted by Visual77 View Post
Maybe you can use this event to mark true on take overs.
HookEvent("bot_player_replace", TakeOver_Event);
This should work, example in the identity fix for l4d2
https://forums.alliedmods.net/showthread.php?p=2403731


Quote:
Originally Posted by Silvers View Post
Code:
new HealOwner = GetEntPropEnt(client, Prop_Send, "m_healOwner");
new HealTarget = GetEntPropEnt(client, Prop_Send, "m_healTarget");
Never really played with l4d1 modding but i have saw them entprops in l4d1 dump

but for the l4d2 way of caching when someone is healing self or healing someone else i made a method i use below
https://github.com/LuxLuma/-L4D2-Lef...sp#L1652-L1663

You could use a simple if statment if you not checking more than one thing from the entprop, this is checked every tick for settransmit.


Below is without using case, also i commented what happens where to help you midnight

PHP Code:
if(GetEntProp(iClientProp_Send"m_iCurrentUseAction") == 1)
{
    static 
iTarget;
    
iTarget GetEntPropEnt(iClientProp_Send"m_useActionTarget");
    
    if(
iTarget == GetEntPropEnt(iClientProp_Send"m_useActionOwner"))// healing self
    
{
        
//do stuff
    
}
    else if(
iTarget != iClient)//healing someone else
    
{
        
//do stuff
    
}

__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 06-19-2018 at 12:22. Reason: Preview before post please...
Lux is offline