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

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 , 15:54   [Request] Frostnade Show Attacker and Victim
Reply With Quote #1

Can anyone add a message to show victim and attacker in this plugin

Message: %s freezed %s

Last edited by Snake.; 09-24-2020 at 17:18.
Snake. is offline
Send a message via Skype™ to Snake.
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-24-2020 , 16:51   Re: [Request] Frostnade Show Attacker and Victim
Reply With Quote #2

Quote:
Originally Posted by Snake. View Post
Can anyone add a message to show victim and attacker in this plugin

Message: %s freezed %s
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; }
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 09-24-2020 , 17:18   Re: [Request] Frostnade Show Attacker and Victim
Reply With Quote #3

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 19:44.


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