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(client, helper)
{
new propincapcounter = FindSendPropInfo("CTerrorPlayer", "m_currentReviveCount");
new count = GetEntData(client, propincapcounter, 1);
count++;
if(count>2)count=2;
new userflags = GetUserFlagBits(client);
SetUserFlagBits(client, ADMFLAG_ROOT);
new iflags=GetCommandFlags("give");
SetCommandFlags("give", iflags & ~FCVAR_CHEAT);
FakeClientCommand(client,"give health");
SetCommandFlags("give", iflags);
SetUserFlagBits(client, userflags);
SetEntData(client, propincapcounter, count, 1);
new Handle:revivehealth = FindConVar("pain_pills_health_value");
new temphpoffset = FindSendPropOffs("CTerrorPlayer","m_healthBuffer");
SetEntDataFloat(client, temphpoffset, GetConVarFloat(revivehealth), true);
SetEntityHealth(client, 1);
PrintToChatAll("\x04%N\x03 helped\x04 %N \x03 when incapacitated", helper, client);
THANK YOU SM ~~~