Raised This Month: $ Target: $400
 0% 

fm_set_user_frozen()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2013 , 08:36   Re: fm_set_user_frozen()
Reply With Quote #2

Try this :

PHP Code:
public OnCBasePlayer_TakeDamage_PostidiInflictoriAttackerFloat:flDamagebitsDamageType // return int
{
    if( 
pev(idpev_flags) & FL_FROZEN )
    {
        
set_pev(idpev_punchangle, {0.0,0.0,0.0})
    }
}

set_user_frozen(idbool:bFrozen)
{
    if( 
is_user_alive(id) )
    {
        new 
flags pev(idpev_flags);

        if( !!(
flags FL_FROZEN) != bFrozen )
        {
            
set_pev(idpev_flagsflags FL_FROZEN)
        }
    }

You may have to store velocity before freeze and restore it after freeze if player can have lot of HP, velocity is added and added each time player is taking damage.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-15-2013 at 08:39.
ConnorMcLeod is offline
 



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 21:42.


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