View Single Post
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