i just need when player use medkit give him 50hp main heath this is original
PHP Code:
ReviveClientWithKid(client)
{
new propincapcounter = FindSendPropInfo("CTerrorPlayer", "m_currentReviveCount");
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, 0, 1);
new Handle:revivehealth = FindConVar("first_aid_heal_percent");
new temphpoffset = FindSendPropOffs("CTerrorPlayer","m_healthBuffer");
SetEntDataFloat(client, temphpoffset, GetConVarFloat(revivehealth)*100.0, true);
SetEntityHealth(client, 1);
}
and this one is edited
PHP Code:
ReviveClientWithKid(client)
{
new propincapcounter = FindSendPropInfo("CTerrorPlayer", "m_currentReviveCount");
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, 0, 1);
new Handle:revivehealth = FindConVar("first_aid_heal_percent");
new temphpoffset = FindSendPropOffs("CTerrorPlayer","m_healthBuffer");
SetEntDataFloat(client, mainhpoffset, GetConVarFloat(revivehealth)*100.0, true);
SetEntityHealth(client, 1);
}
what is the main health value ? "temphpoffset" "mainhpoffset"
sorce code is also attached tnx to "Pan Xiaohai" for plugin