[Edit]
I figured this out.
This turns off B+W
// turn off bIsOnThirdStrike - this resets B+W
SetEntProp(client, Prop_Send, "m_bIsOnThirdStrike", 0);
I wrote a plug to bump health up to 50% if less then 50% when you spawn in the safe room.
It works and it resets temp health and incap counts and IsGoingToDie.
The last thing to figure out is how to reset B+W.
Right now if you arrive at the safe room B+W when you spawn you will have 50% health
but still be B+W.
How do I reset B+W on the player?
Thanks!
PHP Code:
public Action:Timer_PlayerSpawn(Handle:timer, any:client)
{
if(IsClientInGame(client))
{
if(GetClientHealth(client) < 50)
{
// set their permanent health to 50,
SetEntProp(client, Prop_Send, "m_iHealth", 50)
// reset the players' incap count,
SetEntProp(client, Prop_Send, "m_currentReviveCount", 0)
// turn off isGoingToDie
SetEntProp(client, Prop_Send, "m_isGoingToDie", 0)
// reset temp health.
SetEntPropFloat(client, Prop_Send, "m_healthBufferTime", GetGameTime())
SetEntPropFloat(client, Prop_Send, "m_healthBuffer", 0.0)
// turn off B+W how???
}
}
}