View Single Post
Author Message
Jestery
BANNED
Join Date: Aug 2022
Location: Usa
Old 10-12-2023 , 23:30   [L4D2] I need support with this plugin
Reply With Quote #1

I'm using [L4D & L4D2] Self Help - created by panxiaohai

There's a function here allowing players to revive teammates when both are downed, but it ignores the incap count, so basically the one got helped could stand up limitlessly (no B&W state). Can you improve this one so the function could be counted as normal revive, these are the lines:

PHP Code:
HelpOther(clienthelper)
{
    new 
propincapcounter FindSendPropInfo("CTerrorPlayer""m_currentReviveCount");
    new 
count GetEntData(clientpropincapcounter1);

        
count++;
        if(
count>2)count=2;
            
        new 
userflags GetUserFlagBits(client);
        
SetUserFlagBits(clientADMFLAG_ROOT);
        new 
iflags=GetCommandFlags("give");
        
SetCommandFlags("give"iflags & ~FCVAR_CHEAT);
        
FakeClientCommand(client,"give health");
        
SetCommandFlags("give"iflags);
        
SetUserFlagBits(clientuserflags);
            
        
SetEntData(clientpropincapcountercount1);
            
        new 
Handle:revivehealth FindConVar("pain_pills_health_value");  
     
        new 
temphpoffset FindSendPropOffs("CTerrorPlayer","m_healthBuffer");
        
SetEntDataFloat(clienttemphpoffsetGetConVarFloat(revivehealth), true);
        
SetEntityHealth(client1);
         
PrintToChatAll("\x04%N\x03 helped\x04 %N \x03 when incapacitated"helperclient); 
THANK YOU SM ~~~

Last edited by Jestery; 10-12-2023 at 23:30.
Jestery is offline
Send a message via ICQ to Jestery Send a message via AIM to Jestery Send a message via Yahoo to Jestery Send a message via Skype™ to Jestery