Raised This Month: $ Target: $400
 0% 

Solved [Request] Frostnade Show Attacker and Victim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 09-24-2020 , 17:18   Re: [Request] Frostnade Show Attacker and Victim
Reply With Quote #1

Quote:
Originally Posted by Supremache View Post
In this function:
From:
PHP Code:

freeze_player
(id,attacker,nadeTeam)
{
    new 
fwdRetVal PLUGIN_CONTINUE;
    
ExecuteForward(fnFwdPlayerFrozenfwdRetValidattacker);
    
    if(
fwdRetVal == PLUGIN_HANDLED || fwdRetVal == PLUGIN_HANDLED_MAIN)
    {
        return 
0;
    }

    if(!
isFrozen[id])
    {
        
pev(id,pev_gravity,oldGravity[id]);

        
// register our forward only when we need it
        
if(!fmFwdPPT)
        {
            
fmFwdPPT register_forward(FM_PlayerPreThink,"fw_playerprethink",0);
        }
    }

    
isFrozen[id] = nadeTeam;
    
    
set_pev(id,pev_velocity,Float:{0.0,0.0,0.0});
    
set_user_chillfreeze_speed(id);
    
    new 
Float:duration get_pcvar_float(pcv_freeze_duration), Float:variance get_pcvar_float(pcv_freeze_variance);
    
duration += random_float(-variance,variance);

    
remove_task(TASK_REMOVE_FREEZE+id);
    
set_task(duration,"task_remove_freeze",TASK_REMOVE_FREEZE+id);
    
    if(!
pev_valid(novaDisplay[id])) create_nova(id);
    
    if(
get_pcvar_num(pcv_icon) == ICON_ISCHILLED)
    {
        
show_icon(idSTATUS_FLASH);
    }
    
    return 
1;

To:
Code:
freeze_player(id,attacker,nadeTeam) {     new fwdRetVal = PLUGIN_CONTINUE;     ExecuteForward(fnFwdPlayerFrozen, fwdRetVal, id, attacker);         if(fwdRetVal == PLUGIN_HANDLED || fwdRetVal == PLUGIN_HANDLED_MAIN)     {         return 0;     }     if(!isFrozen[id])     {         pev(id,pev_gravity,oldGravity[id]);         // register our forward only when we need it         if(!fmFwdPPT)         {             fmFwdPPT = register_forward(FM_PlayerPreThink,"fw_playerprethink",0);         }     }     new szPlayerName[32], szTargetName[32]     get_user_name(attacker, szPlayerName, charsmax(szPlayerName))     get_user_name(id, szTargetName, charsmax(szTargetName))     isFrozen[id] = nadeTeam;         set_pev(id,pev_velocity,Float:{0.0,0.0,0.0});     set_user_chillfreeze_speed(id);         new Float:duration = get_pcvar_float(pcv_freeze_duration), Float:variance = get_pcvar_float(pcv_freeze_variance);     duration += random_float(-variance,variance);         client_print(0, print_chat,"Player %s: freezed %s", szPlayerName, szTargetName);     remove_task(TASK_REMOVE_FREEZE+id);     set_task(duration,"task_remove_freeze",TASK_REMOVE_FREEZE+id);         if(!pev_valid(novaDisplay[id])) create_nova(id);         if(get_pcvar_num(pcv_icon) == ICON_ISCHILLED)     {         show_icon(id, STATUS_FLASH);     }         return 1; }
Thank you!
Snake. is offline
Send a message via Skype™ to Snake.
Reply


Thread Tools
Display Modes

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 23:56.


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