Then try this:
PHP 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);
}
}
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(id, STATUS_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(rgb, angles); // 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)
}