Raised This Month: $ Target: $400
 0% 

[REQ] Frostnova edit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 05-05-2015 , 08:20   Re: [REQ] Frostnova edit
Reply With Quote #1

Then try this:
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)
                
drop_to_floor(id)
    }
    
    if(
get_pcvar_num(pcv_icon) == ICON_ISCHILLED)
    {
        
show_icon(idSTATUS_FLASH);
    }
    
    return 
1;

anyway,for me work this:

PHP Code:
// make a frost nova at a player's feet 
create_nova(id

    new 
nova engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target")); 

    
engfunc(EngFunc_SetSize,nova,Float:{-8.0,-8.0,-4.0},Float:{8.0,8.0,4.0}); 
    
engfunc(EngFunc_SetModel,nova,MODEL_FROZEN); 

    
// random orientation 
    
new Float:angles[3]; 
    
angles[1] = random_float(0.0,360.0); 
    
set_pev(nova,pev_angles,angles); 

    
// put it at their feet 
    
new Float:novaOrigin[3]; 
    
pev(id,pev_origin,novaOrigin); 
    
engfunc(EngFunc_SetOrigin,nova,novaOrigin); 

    
// make it translucent 
    
new rgb[3]; 
    
get_rgb_colors(isFrozen[id], rgb); 
    
IVecFVec(rgbangles); // let's just use angles 

    
set_pev(nova,pev_rendercolor,angles); // see above 
    
set_pev(nova,pev_rendermode,kRenderTransAlpha); 
    
set_pev(nova,pev_renderfx,kRenderFxGlowShell); 
    
set_pev(nova,pev_renderamt,128.0); 

    
novaDisplay[id] = nova
    
drop_to_floor(nova


Last edited by Krtola; 05-05-2015 at 08:26.
Krtola is offline
Send a message via Skype™ to Krtola
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 20:11.


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