Raised This Month: $51 Target: $400
 12% 

L4D2 how to reset B+W


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Austinbots
Member
Join Date: Jan 2010
Old 04-18-2014 , 04:44   L4D2 how to reset B+W
Reply With Quote #1

[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:timerany:client)
{
    if(
IsClientInGame(client))
    {
        if(
GetClientHealth(client) < 50)
        {
            
// set their permanent health to 50,
            
SetEntProp(clientProp_Send"m_iHealth"50)
 
            
// reset the players' incap count,
            
SetEntProp(clientProp_Send"m_currentReviveCount"0)    
            
            
// turn off isGoingToDie 
            
SetEntProp(clientProp_Send"m_isGoingToDie"0)
           
            
// reset temp health.
            
SetEntPropFloat(clientProp_Send"m_healthBufferTime"GetGameTime())
            
SetEntPropFloat(clientProp_Send"m_healthBuffer"0.0)            

            
// turn off B+W how???

        
}
    }


Last edited by Austinbots; 04-18-2014 at 06:05.
Austinbots is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode