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

[ZP] class zombie: Revenant Ice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
K4rim
Senior Member
Join Date: Oct 2013
Location: Malaysia
Old 12-24-2013 , 03:59   [ZP] class zombie: Revenant Ice
Reply With Quote #1

Can someone fix this class please!
PHP Code:
/*================================================================================
    
    ---------------------------------------
    -*- [ZP] Class Zombie: Revenant Ice -*-
    ---------------------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <cstrike>
#include <xs>

new const ball_name[] = "paralize_ball"
new const ball_model[] = "models/w_hiddentail2.mdl"
new const ball_soundtouch[] = { "warcraft3/frostnova.wav" }

new const 
zclass_name[] = { "Revenant Ice Zombie" // name
new const zclass_info[] = { "Let zamorozochny ball" // description
new const zclass_model[] = { "revenant_ice" // model
new const zclass_clawmodel[] = { "v_revenant_ice.mdl" // claw model
const zclass_health 2000 // health
const zclass_speed 245 // speed
const Float:zclass_gravity 0.7 // gravity
const Float:zclass_knockback 1.0 // knockback
new const v_zombie_bomb_model[64] = "revenant_ice"

new g_CurWeapon[33], g_bombmodelwpn[64]

#define OFFSET_MODELINDEX 491
#define OFFSET_LINUX 5 

new indexdefaultindex

new g_zclassparalize
new cvar_paralizedelay cvar_paralizevelocity  cvar_paralizeballhealth cvar_paralizeballparalizetime
new sTrail g_touchs[512] , g_can[33] , g_paralizen[33]

new const 
WeaponNames[][] =
{
        
"""weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
        
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
        
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
        
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
        
"weapon_ak47""weapon_knife""weapon_p90"
}

public 
plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Revenant Ice""1.0""=), LARS-BLOODLIKER")

    
cvar_paralizedelay register_cvar("zp_classparalize_delay","15")
    
cvar_paralizevelocity register_cvar("zp_classparalizeball_velocity","1300")
    
cvar_paralizeballhealth register_cvar("zp_classparalizeball_health","5")
    
cvar_paralizeballparalizetime register_cvar "zp_classparalizeball_paralizetime""7.0" )

    
register_touch(ball_name"worldspawn",        "touchWorld")
    
register_touch(ball_name"func_wall",            "touchWorld")
    
register_touch(ball_name"func_door",            "touchWorld")
    
register_touch(ball_name"func_door_rotating""touchWorld")
    
register_touch(ball_name"func_wall_toggle",    "touchWorld")
    
register_touch(ball_name"func_breakable",    "touchWorld")
    
register_touch(ball_name"player",            "touchPlayer")
    
register_think(ball_name,"ball_think")

    
register_clcmd("drop","paralize_cmd")
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_forward(FM_PlayerPreThink"fw_PreThink")

    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")

    
register_event("CurWeapon""Event_CurrentWeapon""be""1=1")
    
    for(new 
1sizeof WeaponNamesi++)
    if(
WeaponNames[i][0]) RegisterHam(Ham_Item_DeployWeaponNames[i], "fw_Weapon_Deploy_Post"1)

    
RegisterHam(Ham_Player_Duck"player""Player_Duck"1)
}

public 
plugin_precache()
{
    
precache_model(ball_model)
    
sTrail precache_model("sprites/laserbeam.spr")

    
g_zclassparalize zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    

    
formatex(g_bombmodelwpncharsmax(g_bombmodelwpn), "models/zombie_plague/v_bomb_%s.mdl"v_zombie_bomb_model)
    
engfunc(EngFunc_PrecacheModelg_bombmodelwpn)

    
index precache_model("models/player/revenant_ice/revenant_ice.mdl")
        
defaultindex precache_model("models/player.mdl")
}

public 
paralize_cmdid )
{
    if( !
is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclassparalize || zp_get_user_nemesis(id) )
        return 
PLUGIN_CONTINUE;

    if(
g_can[id]) 
    {
        
client_print(id,print_center,"Recover in %d seconds",g_can[id])
        return 
PLUGIN_HANDLED;
    }

    static 
Float:origin[3], Float:angles[3], Float:v_forward[3], Float:v_right[3], Float:v_up[3], Float:gun_position[3], Float:player_origin[3], Float:player_view_offset[3];
    static 
Float:OriginX[3]
    
pev(idpev_v_angleangles);
    
pev(idpev_originOriginX);
    
engfunc(EngFunc_MakeVectorsangles);

    
global_get(glb_v_forwardv_forward);
    
global_get(glb_v_rightv_right);
    
global_get(glb_v_upv_up);

    
//m_pPlayer->GetGunPosition( ) = pev->origin + pev->view_ofs
    
pev(idpev_originplayer_origin);
    
pev(idpev_view_ofsplayer_view_offset);
    
xs_vec_add(player_originplayer_view_offsetgun_position);

    
xs_vec_mul_scalar(v_forward13.0v_forward);
    
xs_vec_mul_scalar(v_right0.0v_right);
    
xs_vec_mul_scalar(v_up5.0v_up);

    
xs_vec_add(gun_positionv_forwardorigin);
    
xs_vec_add(originv_rightorigin);
    
xs_vec_add(originv_uporigin);

    new 
Float:StartOrigin[3]
            
    
StartOrigin[0] = origin[0];
    
StartOrigin[1] = origin[1];
    
StartOrigin[2] = origin[2];


    new 
Float:fVelocity[3] , Float:flOrigin[3] , Float:flAngle[3]
    
pev(id,pev_origin,flOrigin)
    
pev(id,pev_angles,flAngle)

    new 
ball create_entity("info_target")
    
    if (!
ball) return PLUGIN_HANDLED

    g_touchs
[ball] = 0

    entity_set_string
(ballEV_SZ_classnameball_name)
    
    
entity_set_model(ballball_model)
    
    
entity_set_origin(ballStartOrigin)
    
    
entity_set_vector(ballEV_VEC_anglesflAngle)
    
    new 
Float:MinBox[3] = {-1.0, -1.0, -1.0}
    new 
Float:MaxBox[3] = {1.01.01.0}
    
entity_set_vector(ballEV_VEC_minsMinBox)
    
entity_set_vector(ballEV_VEC_maxsMaxBox)
    
    
entity_set_int(ballEV_INT_solidSOLID_SLIDEBOX)
    
    
entity_set_int(ballEV_INT_movetypeMOVETYPE_BOUNCEMISSILE)
    
    
entity_set_edict(ballEV_ENT_ownerid)
    
    
entity_set_int(ballEV_INT_effectsEF_BRIGHTLIGHT)
    
    
VelocityByAim(idget_pcvar_num(cvar_paralizevelocity ), fVelocity)
    
entity_set_vector(ball EV_VEC_velocityfVelocity)

    
fm_set_rendering(ballkRenderFxGlowShell,255255255kRenderNormal16)
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMFOLLOW// Temporary entity ID
    
write_short(ball// Entity
    
write_short(sTrail// Sprite index
    
write_byte(10// Life
    
write_byte(3// Line width
    
write_byte(100// Red
    
write_byte(255// Green
    
write_byte(255// Blue
    
write_byte(255// Alpha
    
message_end() 

    
UTIL_PlayPlayerAnimation(id,10)
    
UTIL_PlayWeaponAnimation(id,8)

    
g_can[id] = get_pcvar_num(cvar_paralizedelay)
    
set_task(1.0,"ability_zero",id)

    
entity_set_float(ballEV_FL_health get_pcvar_float(cvar_paralizeballhealth))

    
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1
    
    return 
PLUGIN_HANDLED;
}

public 
touchWorld(ballworld) {

    
emit_sound(ballCHAN_WEAPONball_soundtouch1.0ATTN_NORM0PITCH_NORM)
    
g_touchs[ball] += 1
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball)
    
    return 
PLUGIN_HANDLED
}

public 
touchPlayer(ballplayer) {
    
client_print(0,print_chat,"You are trapped in %d",player)
    
remove_task(player)
    
paralize(player)
    
//set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",player)
    
    
return PLUGIN_HANDLED
}

public 
event_round_start()
{
    new 
iEnt FM_NULLENT;
    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname"ball_name)) > )
    {
        
engfunc(EngFunc_RemoveEntity,iEnt)
    }    

    for(new 
i;i<=32;i++)
    {
        if(
g_paralizen[i]) fm_set_rendering(i)
        
g_can[i] = 0
        g_paralizen
[i] = 0
        remove_task
(i)
    }
}

public 
ball_think(ball)
{
    if(!
is_valid_ent(ball))
        return;

    new 
Float:oldangles[3],Float:angles[3]
    
pev(ball,pev_angles,oldangles)
    
angles[0] = oldangles[0] + random_float(20.0,100.0)
    
angles[1] = oldangles[1] + random_float(10.0,80.0)
    
angles[2] = oldangles[2] + random_float(10.0,80.0)
    
set_pev(ball,pev_angles,angles)

    new 
Float:Velocity[3]
    
pev(ball,pev_velocity,Velocity)

    if(
Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0remove_entity(ball)

    
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1

}

public 
paralize(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return;

    
g_paralizen[id] = 1
    fm_set_rendering
(idkRenderFxGlowShell,100255255kRenderNormal16)
    
set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",id)
}

public 
unparalize_player(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return;

    
g_paralizen[id] = 0
    fm_set_rendering
(id)
}

public 
remove_values(id)
{
    
remove_task(id)
    
g_can[id] = 0
}

public 
ability_zero(id
{
    
g_can[id] -= 1
    
if(!g_can[id]) client_print(id,print_center,"Ability is active!")
    if(
g_can[id]) set_task(1.0,"ability_zero",id)
}

public 
fw_PreThink(id)
{
    if( !
is_user_alive(id) || zp_get_user_zombie(id) || !g_paralizen[id])
        return 
PLUGIN_CONTINUE;

    
set_pevidpev_buttonpev(id,pev_button) & ~IN_ATTACK );

    
set_pev(idpev_maxspeed0.0)        

    new 
Float:vel[3]
    
set_pev(id,pev_velocity,vel)

    return 
PLUGIN_HANDLED
}

public 
zp_user_humanized_post(id)
{
    
fm_set_user_model_index(iddefaultindex)

     
remove_values(id)
}
public 
fw_PlayerKilled(idattackershouldgibremove_values(id)
public 
client_connect(id)  remove_values(id)

public 
zp_user_infected_post(id
{
    
set_wpnmodel(id)
    if((
zp_get_user_zombie_class(id) == g_zclassparalize) && (zp_get_user_zombie(id)))
    {
        
fm_set_user_model_index(idindex)
    }
    
remove_values(id)
}

public 
zp_user_infected_pre(id

        if(!(
get_user_flags(id) & ADMIN_LEVEL_H)) 
    { 
            if(
zp_get_user_next_class(id) == g_zclassparalize
        { 
                    
zp_set_user_zombie_class(id0
                
client_print(idprint_chat"This class is only for VIPs")
                 
client_print(idprint_chat"Admin cost $100 a month")
            }     
        }     


stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    static 
Float:color[3]
    
color[0] = float(r)
    
color[1] = float(g)
    
color[2] = float(b)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))
}

stock UTIL_PlayWeaponAnimation(const Player, const Sequence)
{
    
set_pev(Playerpev_weaponanimSequence)
    
    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM, .player Player)
    
write_byte(Sequence)
    
write_byte(pev(Playerpev_body))
    
message_end()
}

stock UTIL_PlayPlayerAnimation(const id, const Sequence Float:frame 1.0 Float:framerate 1.0)
{
    
entity_set_int(idEV_INT_sequenceSequence)
    
entity_set_int(idEV_INT_gaitsequence1)
    
entity_set_float(idEV_FL_frameframe)
    
entity_set_float(idEV_FL_framerateframerate)
}

stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speedFloat:new_velocity[3])
{
    
new_velocity[0] = origin2[0] - origin1[0]
    
new_velocity[1] = origin2[1] - origin1[1]
    
new_velocity[2] = origin2[2] - origin1[2]
    new 
Float:num floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
    
new_velocity[0] *= num
    new_velocity
[1] *= num
    new_velocity
[2] *= num
       
    
return 1


stock fm_cs_set_user_deaths(idvalue)
{
    
set_pdata_int(id444value5)
}

stock fm_cs_get_user_team(id)
{
    return 
get_pdata_int(id1145);
}

public 
Event_CurrentWeapon(idg_CurWeapon[id] = read_data(2)

public 
fw_Weapon_Deploy_Post(weapon_ent)
{
    static 
idid get_pdata_cbase(weapon_ent414)

    static 
weaponidweaponid cs_get_weapon_id(weapon_ent)

    
g_CurWeapon[id] = weaponid
    
    replace_weapon_models
(idweaponid)
}

public 
Player_Duck(id)
{
    if(
zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
    {
           static 
buttonducking
           button 
pev(idpev_button)
        
ducking pev(idpev_flags) & (FL_DUCKING FL_ONGROUND) == (FL_DUCKING FL_ONGROUND)

           if(
button IN_DUCK || ducking)
        {
            
set_pev(idpev_view_ofs, {0.00.020.0})   
           }
    }
}

set_wpnmodel(id)
{
    if(!
is_user_alive(id)) return

    new 
wpn get_user_weapon(id)

    if(
wpn == CSW_HEGRENADE || wpn == CSW_FLASHBANG || wpn == CSW_SMOKEGRENADE)
    {
            
set_pev(idpev_viewmodel2g_bombmodelwpn)
    }
}

replace_weapon_models(idweaponid)
{
    if(
zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
    {
        switch(
weaponid)
        {
            case 
CSW_HEGRENADE:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
            case 
CSW_SMOKEGRENADE:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
            case 
CSW_FLASHBANG:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
        }
    }
}

stock fm_set_user_model_index(idvalue)
{
    
set_pdata_int(idOFFSET_MODELINDEXvalueOFFSET_LINUX)

Quote:
L 12/24/2013 - 00:40:18: Start of error session.
L 12/24/2013 - 00:40:18: Info (map "zm_dust2x2") (file "addons/amxmodx/logs/error_20131224.log")
L 12/24/2013 - 00:40:18: [ENGINE] Invalid entity 213
L 12/24/2013 - 00:40:18: [AMXX] Displaying debug trace (plugin "zp50_class_zombie_revenant_ice.amxx", version "1.0")
L 12/24/2013 - 00:40:18: [AMXX] Run time error 10: native error (native "entity_set_float")
L 12/24/2013 - 00:40:18: [AMXX] [0] zp50_class_zombie_revenant_ice.sma::ball_thin k (line 254)
K4rim is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 12-24-2013 , 16:24   Re: [ZP] class zombie: Revenant Ice
Reply With Quote #2

Try...

Replace

PHP Code:
public ball_think(ball)
{
    if(!
is_valid_ent(ball))
        return;
    
    new 
Float:oldangles[3],Float:angles[3]
    
pev(ball,pev_angles,oldangles)
    
angles[0] = oldangles[0] + random_float(20.0,100.0)
    
angles[1] = oldangles[1] + random_float(10.0,80.0)
    
angles[2] = oldangles[2] + random_float(10.0,80.0)
    
set_pev(ball,pev_angles,angles)
    
    new 
Float:Velocity[3]
    
pev(ball,pev_velocity,Velocity)
    
    if(
Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0remove_entity(ball)
    
    
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1


with

PHP Code:
public ball_think(ball)
{
    if(!
is_valid_ent(ball))
        return;
    
    new 
Float:oldangles[3],Float:angles[3]
    
pev(ball,pev_angles,oldangles)
    
angles[0] = oldangles[0] + random_float(20.0,100.0)
    
angles[1] = oldangles[1] + random_float(10.0,80.0)
    
angles[2] = oldangles[2] + random_float(10.0,80.0)
    
set_pev(ball,pev_angles,angles)
    
    new 
Float:Velocity[3]
    
pev(ball,pev_velocity,Velocity)
    
    if(
Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0)
    {
        
remove_entity(ball)
        return
    }
    
    
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1


WaLkMaN is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 12-25-2013 , 00:39   Re: [ZP] class zombie: Revenant Ice
Reply With Quote #3

If u return from here
PHP Code:
if(Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0)
    {
        
remove_entity(ball)
        return
    } 
This :-
PHP Code:
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1
Wont be called

==========================>

Try this
PHP Code:
/*================================================================================
    
    ---------------------------------------
    -*- [ZP] Class Zombie: Revenant Ice -*-
    ---------------------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <cstrike>
#include <xs>

new const ball_name[] = "paralize_ball"
new const ball_model[] = "models/w_hiddentail2.mdl"
new const ball_soundtouch[] = { "warcraft3/frostnova.wav" }

new const 
zclass_name[] = { "Revenant Ice Zombie" // name
new const zclass_info[] = { "Let zamorozochny ball" // description
new const zclass_model[] = { "revenant_ice" // model
new const zclass_clawmodel[] = { "v_revenant_ice.mdl" // claw model
const zclass_health 2000 // health
const zclass_speed 245 // speed
const Float:zclass_gravity 0.7 // gravity
const Float:zclass_knockback 1.0 // knockback
new const v_zombie_bomb_model[64] = "revenant_ice"

new g_CurWeapon[33], g_bombmodelwpn[64]

#define OFFSET_MODELINDEX 491
#define OFFSET_LINUX 5 

new indexdefaultindex

new g_zclassparalize
new cvar_paralizedelay cvar_paralizevelocity  cvar_paralizeballhealth cvar_paralizeballparalizetime
new sTrail g_touchs[512] , g_can[33] , g_paralizen[33]

new const 
WeaponNames[][] =
{
        
"""weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
        
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
        
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
        
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
        
"weapon_ak47""weapon_knife""weapon_p90"
}

public 
plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Revenant Ice""1.0""=), LARS-BLOODLIKER")

    
cvar_paralizedelay register_cvar("zp_classparalize_delay","15")
    
cvar_paralizevelocity register_cvar("zp_classparalizeball_velocity","1300")
    
cvar_paralizeballhealth register_cvar("zp_classparalizeball_health","5")
    
cvar_paralizeballparalizetime register_cvar "zp_classparalizeball_paralizetime""7.0" )

    
register_touch(ball_name"worldspawn",        "touchWorld")
    
register_touch(ball_name"func_wall",            "touchWorld")
    
register_touch(ball_name"func_door",            "touchWorld")
    
register_touch(ball_name"func_door_rotating""touchWorld")
    
register_touch(ball_name"func_wall_toggle",    "touchWorld")
    
register_touch(ball_name"func_breakable",    "touchWorld")
    
register_touch(ball_name"player",            "touchPlayer")
    
register_think(ball_name,"ball_think")

    
register_clcmd("drop","paralize_cmd")
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_forward(FM_PlayerPreThink"fw_PreThink")

    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")

    
register_event("CurWeapon""Event_CurrentWeapon""be""1=1")
    
    for(new 
1sizeof WeaponNamesi++)
    if(
WeaponNames[i][0]) RegisterHam(Ham_Item_DeployWeaponNames[i], "fw_Weapon_Deploy_Post"1)

    
RegisterHam(Ham_Player_Duck"player""Player_Duck"1)
}

public 
plugin_precache()
{
    
precache_model(ball_model)
    
sTrail precache_model("sprites/laserbeam.spr")

    
g_zclassparalize zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    

    
formatex(g_bombmodelwpncharsmax(g_bombmodelwpn), "models/zombie_plague/v_bomb_%s.mdl"v_zombie_bomb_model)
    
engfunc(EngFunc_PrecacheModelg_bombmodelwpn)

    
index precache_model("models/player/revenant_ice/revenant_ice.mdl")
        
defaultindex precache_model("models/player.mdl")
}

public 
paralize_cmdid )
{
    if( !
is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclassparalize || zp_get_user_nemesis(id) )
        return 
PLUGIN_CONTINUE;

    if(
g_can[id]) 
    {
        
client_print(id,print_center,"Recover in %d seconds",g_can[id])
        return 
PLUGIN_HANDLED;
    }

    static 
Float:origin[3], Float:angles[3], Float:v_forward[3], Float:v_right[3], Float:v_up[3], Float:gun_position[3], Float:player_origin[3], Float:player_view_offset[3];
    static 
Float:OriginX[3]
    
pev(idpev_v_angleangles);
    
pev(idpev_originOriginX);
    
engfunc(EngFunc_MakeVectorsangles);

    
global_get(glb_v_forwardv_forward);
    
global_get(glb_v_rightv_right);
    
global_get(glb_v_upv_up);

    
//m_pPlayer->GetGunPosition( ) = pev->origin + pev->view_ofs
    
pev(idpev_originplayer_origin);
    
pev(idpev_view_ofsplayer_view_offset);
    
xs_vec_add(player_originplayer_view_offsetgun_position);

    
xs_vec_mul_scalar(v_forward13.0v_forward);
    
xs_vec_mul_scalar(v_right0.0v_right);
    
xs_vec_mul_scalar(v_up5.0v_up);

    
xs_vec_add(gun_positionv_forwardorigin);
    
xs_vec_add(originv_rightorigin);
    
xs_vec_add(originv_uporigin);

    new 
Float:StartOrigin[3]
            
    
StartOrigin[0] = origin[0];
    
StartOrigin[1] = origin[1];
    
StartOrigin[2] = origin[2];


    new 
Float:fVelocity[3] , Float:flOrigin[3] , Float:flAngle[3]
    
pev(id,pev_origin,flOrigin)
    
pev(id,pev_angles,flAngle)

    new 
ball create_entity("info_target")
    
    if (!
ball) return PLUGIN_HANDLED

    g_touchs
[ball] = 0

    entity_set_string
(ballEV_SZ_classnameball_name)
    
    
entity_set_model(ballball_model)
    
    
entity_set_origin(ballStartOrigin)
    
    
entity_set_vector(ballEV_VEC_anglesflAngle)
    
    new 
Float:MinBox[3] = {-1.0, -1.0, -1.0}
    new 
Float:MaxBox[3] = {1.01.01.0}
    
entity_set_vector(ballEV_VEC_minsMinBox)
    
entity_set_vector(ballEV_VEC_maxsMaxBox)
    
    
entity_set_int(ballEV_INT_solidSOLID_SLIDEBOX)
    
    
entity_set_int(ballEV_INT_movetypeMOVETYPE_BOUNCEMISSILE)
    
    
entity_set_edict(ballEV_ENT_ownerid)
    
    
entity_set_int(ballEV_INT_effectsEF_BRIGHTLIGHT)
    
    
VelocityByAim(idget_pcvar_num(cvar_paralizevelocity ), fVelocity)
    
entity_set_vector(ball EV_VEC_velocityfVelocity)

    
fm_set_rendering(ballkRenderFxGlowShell,255255255kRenderNormal16)
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMFOLLOW// Temporary entity ID
    
write_short(ball// Entity
    
write_short(sTrail// Sprite index
    
write_byte(10// Life
    
write_byte(3// Line width
    
write_byte(100// Red
    
write_byte(255// Green
    
write_byte(255// Blue
    
write_byte(255// Alpha
    
message_end() 

    
UTIL_PlayPlayerAnimation(id,10)
    
UTIL_PlayWeaponAnimation(id,8)

    
g_can[id] = get_pcvar_num(cvar_paralizedelay)
    
set_task(1.0,"ability_zero",id)

    
entity_set_float(ballEV_FL_health get_pcvar_float(cvar_paralizeballhealth))

    
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1
    
    return 
PLUGIN_HANDLED;
}

public 
touchWorld(ballworld) {

    
emit_sound(ballCHAN_WEAPONball_soundtouch1.0ATTN_NORM0PITCH_NORM)
    
g_touchs[ball] += 1
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball)
    
    return 
PLUGIN_HANDLED
}

public 
touchPlayer(ballplayer) {
    
client_print(0,print_chat,"You are trapped in %d",player)
    
remove_task(player)
    
paralize(player)
    
//set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",player)
    
    
return PLUGIN_HANDLED
}

public 
event_round_start()
{
    new 
iEnt FM_NULLENT;
    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname"ball_name)) > )
    {
        
engfunc(EngFunc_RemoveEntity,iEnt)
    }    

    for(new 
i;i<=32;i++)
    {
        if(
g_paralizen[i]) fm_set_rendering(i)
        
g_can[i] = 0
        g_paralizen
[i] = 0
        remove_task
(i)
    }
}

public 
ball_think(ball)
{
    if(!
is_valid_ent(ball))
        return;

    new 
Float:oldangles[3],Float:angles[3]
    
pev(ball,pev_angles,oldangles)
    
angles[0] = oldangles[0] + random_float(20.0,100.0)
    
angles[1] = oldangles[1] + random_float(10.0,80.0)
    
angles[2] = oldangles[2] + random_float(10.0,80.0)
    
set_pev(ball,pev_angles,angles)

    new 
Float:Velocity[3]
    
pev(ball,pev_velocity,Velocity)

    if(
Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0remove_entity(ball)
       
    if(
is_valid_ent(ball)) entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1

}

public 
paralize(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return;

    
g_paralizen[id] = 1
    fm_set_rendering
(idkRenderFxGlowShell,100255255kRenderNormal16)
    
set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",id)
}

public 
unparalize_player(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return;

    
g_paralizen[id] = 0
    fm_set_rendering
(id)
}

public 
remove_values(id)
{
    
remove_task(id)
    
g_can[id] = 0
}

public 
ability_zero(id
{
    
g_can[id] -= 1
    
if(!g_can[id]) client_print(id,print_center,"Ability is active!")
    if(
g_can[id]) set_task(1.0,"ability_zero",id)
}

public 
fw_PreThink(id)
{
    if( !
is_user_alive(id) || zp_get_user_zombie(id) || !g_paralizen[id])
        return 
PLUGIN_CONTINUE;

    
set_pevidpev_buttonpev(id,pev_button) & ~IN_ATTACK );

    
set_pev(idpev_maxspeed0.0)        

    new 
Float:vel[3]
    
set_pev(id,pev_velocity,vel)

    return 
PLUGIN_HANDLED
}

public 
zp_user_humanized_post(id)
{
    
fm_set_user_model_index(iddefaultindex)

     
remove_values(id)
}
public 
fw_PlayerKilled(idattackershouldgibremove_values(id)
public 
client_connect(id)  remove_values(id)

public 
zp_user_infected_post(id
{
    
set_wpnmodel(id)
    if((
zp_get_user_zombie_class(id) == g_zclassparalize) && (zp_get_user_zombie(id)))
    {
        
fm_set_user_model_index(idindex)
    }
    
remove_values(id)
}

public 
zp_user_infected_pre(id

        if(!(
get_user_flags(id) & ADMIN_LEVEL_H)) 
    { 
            if(
zp_get_user_next_class(id) == g_zclassparalize
        { 
                    
zp_set_user_zombie_class(id0
                
client_print(idprint_chat"This class is only for VIPs")
                 
client_print(idprint_chat"Admin cost $100 a month")
            }     
        }     


stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    static 
Float:color[3]
    
color[0] = float(r)
    
color[1] = float(g)
    
color[2] = float(b)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))
}

stock UTIL_PlayWeaponAnimation(const Player, const Sequence)
{
    
set_pev(Playerpev_weaponanimSequence)
    
    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM, .player Player)
    
write_byte(Sequence)
    
write_byte(pev(Playerpev_body))
    
message_end()
}

stock UTIL_PlayPlayerAnimation(const id, const Sequence Float:frame 1.0 Float:framerate 1.0)
{
    
entity_set_int(idEV_INT_sequenceSequence)
    
entity_set_int(idEV_INT_gaitsequence1)
    
entity_set_float(idEV_FL_frameframe)
    
entity_set_float(idEV_FL_framerateframerate)
}

stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speedFloat:new_velocity[3])
{
    
new_velocity[0] = origin2[0] - origin1[0]
    
new_velocity[1] = origin2[1] - origin1[1]
    
new_velocity[2] = origin2[2] - origin1[2]
    new 
Float:num floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
    
new_velocity[0] *= num
    new_velocity
[1] *= num
    new_velocity
[2] *= num
       
    
return 1


stock fm_cs_set_user_deaths(idvalue)
{
    
set_pdata_int(id444value5)
}

stock fm_cs_get_user_team(id)
{
    return 
get_pdata_int(id1145);
}

public 
Event_CurrentWeapon(idg_CurWeapon[id] = read_data(2)

public 
fw_Weapon_Deploy_Post(weapon_ent)
{
    static 
idid get_pdata_cbase(weapon_ent414)

    static 
weaponidweaponid cs_get_weapon_id(weapon_ent)

    
g_CurWeapon[id] = weaponid
    
    replace_weapon_models
(idweaponid)
}

public 
Player_Duck(id)
{
    if(
zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
    {
           static 
buttonducking
           button 
pev(idpev_button)
        
ducking pev(idpev_flags) & (FL_DUCKING FL_ONGROUND) == (FL_DUCKING FL_ONGROUND)

           if(
button IN_DUCK || ducking)
        {
            
set_pev(idpev_view_ofs, {0.00.020.0})   
           }
    }
}

set_wpnmodel(id)
{
    if(!
is_user_alive(id)) return

    new 
wpn get_user_weapon(id)

    if(
wpn == CSW_HEGRENADE || wpn == CSW_FLASHBANG || wpn == CSW_SMOKEGRENADE)
    {
            
set_pev(idpev_viewmodel2g_bombmodelwpn)
    }
}

replace_weapon_models(idweaponid)
{
    if(
zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
    {
        switch(
weaponid)
        {
            case 
CSW_HEGRENADE:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
            case 
CSW_SMOKEGRENADE:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
            case 
CSW_FLASHBANG:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
        }
    }
}

stock fm_set_user_model_index(idvalue)
{
    
set_pdata_int(idOFFSET_MODELINDEXvalueOFFSET_LINUX)

__________________
You will find everything u need :-
Catastrophe is offline
Old 12-25-2013, 04:10
WaLkMaN
This message has been deleted by WaLkMaN.
K4rim
Senior Member
Join Date: Oct 2013
Location: Malaysia
Old 12-25-2013 , 07:18   Re: [ZP] class zombie: Revenant Ice
Reply With Quote #4

Thank you bro!! @Catastrophe and @WaLkMaN,all your fix work fine
K4rim is offline
oussama90
Junior Member
Join Date: Mar 2018
Old 03-28-2018 , 16:58   Re: [ZP] class zombie: Revenant Ice
Reply With Quote #5

Quote:
Originally Posted by Catastrophe View Post
If u return from here
PHP Code:
if(Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0)
    {
        
remove_entity(ball)
        return
    } 
This :-
PHP Code:
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1
Wont be called

==========================>

Try this
PHP Code:
/*================================================================================
    
    ---------------------------------------
    -*- [ZP] Class Zombie: Revenant Ice -*-
    ---------------------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <cstrike>
#include <xs>

new const ball_name[] = "paralize_ball"
new const ball_model[] = "models/w_hiddentail2.mdl"
new const ball_soundtouch[] = { "warcraft3/frostnova.wav" }

new const 
zclass_name[] = { "Revenant Ice Zombie" // name
new const zclass_info[] = { "Let zamorozochny ball" // description
new const zclass_model[] = { "revenant_ice" // model
new const zclass_clawmodel[] = { "v_revenant_ice.mdl" // claw model
const zclass_health 2000 // health
const zclass_speed 245 // speed
const Float:zclass_gravity 0.7 // gravity
const Float:zclass_knockback 1.0 // knockback
new const v_zombie_bomb_model[64] = "revenant_ice"

new g_CurWeapon[33], g_bombmodelwpn[64]

#define OFFSET_MODELINDEX 491
#define OFFSET_LINUX 5 

new indexdefaultindex

new g_zclassparalize
new cvar_paralizedelay cvar_paralizevelocity  cvar_paralizeballhealth cvar_paralizeballparalizetime
new sTrail g_touchs[512] , g_can[33] , g_paralizen[33]

new const 
WeaponNames[][] =
{
        
"""weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
        
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
        
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
        
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
        
"weapon_ak47""weapon_knife""weapon_p90"
}

public 
plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Revenant Ice""1.0""=), LARS-BLOODLIKER")

    
cvar_paralizedelay register_cvar("zp_classparalize_delay","15")
    
cvar_paralizevelocity register_cvar("zp_classparalizeball_velocity","1300")
    
cvar_paralizeballhealth register_cvar("zp_classparalizeball_health","5")
    
cvar_paralizeballparalizetime register_cvar "zp_classparalizeball_paralizetime""7.0" )

    
register_touch(ball_name"worldspawn",        "touchWorld")
    
register_touch(ball_name"func_wall",            "touchWorld")
    
register_touch(ball_name"func_door",            "touchWorld")
    
register_touch(ball_name"func_door_rotating""touchWorld")
    
register_touch(ball_name"func_wall_toggle",    "touchWorld")
    
register_touch(ball_name"func_breakable",    "touchWorld")
    
register_touch(ball_name"player",            "touchPlayer")
    
register_think(ball_name,"ball_think")

    
register_clcmd("drop","paralize_cmd")
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_forward(FM_PlayerPreThink"fw_PreThink")

    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")

    
register_event("CurWeapon""Event_CurrentWeapon""be""1=1")
    
    for(new 
1sizeof WeaponNamesi++)
    if(
WeaponNames[i][0]) RegisterHam(Ham_Item_DeployWeaponNames[i], "fw_Weapon_Deploy_Post"1)

    
RegisterHam(Ham_Player_Duck"player""Player_Duck"1)
}

public 
plugin_precache()
{
    
precache_model(ball_model)
    
sTrail precache_model("sprites/laserbeam.spr")

    
g_zclassparalize zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    

    
formatex(g_bombmodelwpncharsmax(g_bombmodelwpn), "models/zombie_plague/v_bomb_%s.mdl"v_zombie_bomb_model)
    
engfunc(EngFunc_PrecacheModelg_bombmodelwpn)

    
index precache_model("models/player/revenant_ice/revenant_ice.mdl")
        
defaultindex precache_model("models/player.mdl")
}

public 
paralize_cmdid )
{
    if( !
is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclassparalize || zp_get_user_nemesis(id) )
        return 
PLUGIN_CONTINUE;

    if(
g_can[id]) 
    {
        
client_print(id,print_center,"Recover in %d seconds",g_can[id])
        return 
PLUGIN_HANDLED;
    }

    static 
Float:origin[3], Float:angles[3], Float:v_forward[3], Float:v_right[3], Float:v_up[3], Float:gun_position[3], Float:player_origin[3], Float:player_view_offset[3];
    static 
Float:OriginX[3]
    
pev(idpev_v_angleangles);
    
pev(idpev_originOriginX);
    
engfunc(EngFunc_MakeVectorsangles);

    
global_get(glb_v_forwardv_forward);
    
global_get(glb_v_rightv_right);
    
global_get(glb_v_upv_up);

    
//m_pPlayer->GetGunPosition( ) = pev->origin + pev->view_ofs
    
pev(idpev_originplayer_origin);
    
pev(idpev_view_ofsplayer_view_offset);
    
xs_vec_add(player_originplayer_view_offsetgun_position);

    
xs_vec_mul_scalar(v_forward13.0v_forward);
    
xs_vec_mul_scalar(v_right0.0v_right);
    
xs_vec_mul_scalar(v_up5.0v_up);

    
xs_vec_add(gun_positionv_forwardorigin);
    
xs_vec_add(originv_rightorigin);
    
xs_vec_add(originv_uporigin);

    new 
Float:StartOrigin[3]
            
    
StartOrigin[0] = origin[0];
    
StartOrigin[1] = origin[1];
    
StartOrigin[2] = origin[2];


    new 
Float:fVelocity[3] , Float:flOrigin[3] , Float:flAngle[3]
    
pev(id,pev_origin,flOrigin)
    
pev(id,pev_angles,flAngle)

    new 
ball create_entity("info_target")
    
    if (!
ball) return PLUGIN_HANDLED

    g_touchs
[ball] = 0

    entity_set_string
(ballEV_SZ_classnameball_name)
    
    
entity_set_model(ballball_model)
    
    
entity_set_origin(ballStartOrigin)
    
    
entity_set_vector(ballEV_VEC_anglesflAngle)
    
    new 
Float:MinBox[3] = {-1.0, -1.0, -1.0}
    new 
Float:MaxBox[3] = {1.01.01.0}
    
entity_set_vector(ballEV_VEC_minsMinBox)
    
entity_set_vector(ballEV_VEC_maxsMaxBox)
    
    
entity_set_int(ballEV_INT_solidSOLID_SLIDEBOX)
    
    
entity_set_int(ballEV_INT_movetypeMOVETYPE_BOUNCEMISSILE)
    
    
entity_set_edict(ballEV_ENT_ownerid)
    
    
entity_set_int(ballEV_INT_effectsEF_BRIGHTLIGHT)
    
    
VelocityByAim(idget_pcvar_num(cvar_paralizevelocity ), fVelocity)
    
entity_set_vector(ball EV_VEC_velocityfVelocity)

    
fm_set_rendering(ballkRenderFxGlowShell,255255255kRenderNormal16)
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMFOLLOW// Temporary entity ID
    
write_short(ball// Entity
    
write_short(sTrail// Sprite index
    
write_byte(10// Life
    
write_byte(3// Line width
    
write_byte(100// Red
    
write_byte(255// Green
    
write_byte(255// Blue
    
write_byte(255// Alpha
    
message_end() 

    
UTIL_PlayPlayerAnimation(id,10)
    
UTIL_PlayWeaponAnimation(id,8)

    
g_can[id] = get_pcvar_num(cvar_paralizedelay)
    
set_task(1.0,"ability_zero",id)

    
entity_set_float(ballEV_FL_health get_pcvar_float(cvar_paralizeballhealth))

    
entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1
    
    return 
PLUGIN_HANDLED;
}

public 
touchWorld(ballworld) {

    
emit_sound(ballCHAN_WEAPONball_soundtouch1.0ATTN_NORM0PITCH_NORM)
    
g_touchs[ball] += 1
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball)
    
    return 
PLUGIN_HANDLED
}

public 
touchPlayer(ballplayer) {
    
client_print(0,print_chat,"You are trapped in %d",player)
    
remove_task(player)
    
paralize(player)
    
//set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",player)
    
    
return PLUGIN_HANDLED
}

public 
event_round_start()
{
    new 
iEnt FM_NULLENT;
    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname"ball_name)) > )
    {
        
engfunc(EngFunc_RemoveEntity,iEnt)
    }    

    for(new 
i;i<=32;i++)
    {
        if(
g_paralizen[i]) fm_set_rendering(i)
        
g_can[i] = 0
        g_paralizen
[i] = 0
        remove_task
(i)
    }
}

public 
ball_think(ball)
{
    if(!
is_valid_ent(ball))
        return;

    new 
Float:oldangles[3],Float:angles[3]
    
pev(ball,pev_angles,oldangles)
    
angles[0] = oldangles[0] + random_float(20.0,100.0)
    
angles[1] = oldangles[1] + random_float(10.0,80.0)
    
angles[2] = oldangles[2] + random_float(10.0,80.0)
    
set_pev(ball,pev_angles,angles)

    new 
Float:Velocity[3]
    
pev(ball,pev_velocity,Velocity)

    if(
Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0remove_entity(ball)
       
    if(
is_valid_ent(ball)) entity_set_float(ballEV_FL_nextthinkget_gametime() + 0.1

}

public 
paralize(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return;

    
g_paralizen[id] = 1
    fm_set_rendering
(idkRenderFxGlowShell,100255255kRenderNormal16)
    
set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",id)
}

public 
unparalize_player(id)
{
    if(!
is_user_alive(id) || zp_get_user_zombie(id))
        return;

    
g_paralizen[id] = 0
    fm_set_rendering
(id)
}

public 
remove_values(id)
{
    
remove_task(id)
    
g_can[id] = 0
}

public 
ability_zero(id
{
    
g_can[id] -= 1
    
if(!g_can[id]) client_print(id,print_center,"Ability is active!")
    if(
g_can[id]) set_task(1.0,"ability_zero",id)
}

public 
fw_PreThink(id)
{
    if( !
is_user_alive(id) || zp_get_user_zombie(id) || !g_paralizen[id])
        return 
PLUGIN_CONTINUE;

    
set_pevidpev_buttonpev(id,pev_button) & ~IN_ATTACK );

    
set_pev(idpev_maxspeed0.0)        

    new 
Float:vel[3]
    
set_pev(id,pev_velocity,vel)

    return 
PLUGIN_HANDLED
}

public 
zp_user_humanized_post(id)
{
    
fm_set_user_model_index(iddefaultindex)

     
remove_values(id)
}
public 
fw_PlayerKilled(idattackershouldgibremove_values(id)
public 
client_connect(id)  remove_values(id)

public 
zp_user_infected_post(id
{
    
set_wpnmodel(id)
    if((
zp_get_user_zombie_class(id) == g_zclassparalize) && (zp_get_user_zombie(id)))
    {
        
fm_set_user_model_index(idindex)
    }
    
remove_values(id)
}

public 
zp_user_infected_pre(id

        if(!(
get_user_flags(id) & ADMIN_LEVEL_H)) 
    { 
            if(
zp_get_user_next_class(id) == g_zclassparalize
        { 
                    
zp_set_user_zombie_class(id0
                
client_print(idprint_chat"This class is only for VIPs")
                 
client_print(idprint_chat"Admin cost $100 a month")
            }     
        }     


stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    static 
Float:color[3]
    
color[0] = float(r)
    
color[1] = float(g)
    
color[2] = float(b)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))
}

stock UTIL_PlayWeaponAnimation(const Player, const Sequence)
{
    
set_pev(Playerpev_weaponanimSequence)
    
    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM, .player Player)
    
write_byte(Sequence)
    
write_byte(pev(Playerpev_body))
    
message_end()
}

stock UTIL_PlayPlayerAnimation(const id, const Sequence Float:frame 1.0 Float:framerate 1.0)
{
    
entity_set_int(idEV_INT_sequenceSequence)
    
entity_set_int(idEV_INT_gaitsequence1)
    
entity_set_float(idEV_FL_frameframe)
    
entity_set_float(idEV_FL_framerateframerate)
}

stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speedFloat:new_velocity[3])
{
    
new_velocity[0] = origin2[0] - origin1[0]
    
new_velocity[1] = origin2[1] - origin1[1]
    
new_velocity[2] = origin2[2] - origin1[2]
    new 
Float:num floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
    
new_velocity[0] *= num
    new_velocity
[1] *= num
    new_velocity
[2] *= num
       
    
return 1


stock fm_cs_set_user_deaths(idvalue)
{
    
set_pdata_int(id444value5)
}

stock fm_cs_get_user_team(id)
{
    return 
get_pdata_int(id1145);
}

public 
Event_CurrentWeapon(idg_CurWeapon[id] = read_data(2)

public 
fw_Weapon_Deploy_Post(weapon_ent)
{
    static 
idid get_pdata_cbase(weapon_ent414)

    static 
weaponidweaponid cs_get_weapon_id(weapon_ent)

    
g_CurWeapon[id] = weaponid
    
    replace_weapon_models
(idweaponid)
}

public 
Player_Duck(id)
{
    if(
zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
    {
           static 
buttonducking
           button 
pev(idpev_button)
        
ducking pev(idpev_flags) & (FL_DUCKING FL_ONGROUND) == (FL_DUCKING FL_ONGROUND)

           if(
button IN_DUCK || ducking)
        {
            
set_pev(idpev_view_ofs, {0.00.020.0})   
           }
    }
}

set_wpnmodel(id)
{
    if(!
is_user_alive(id)) return

    new 
wpn get_user_weapon(id)

    if(
wpn == CSW_HEGRENADE || wpn == CSW_FLASHBANG || wpn == CSW_SMOKEGRENADE)
    {
            
set_pev(idpev_viewmodel2g_bombmodelwpn)
    }
}

replace_weapon_models(idweaponid)
{
    if(
zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
    {
        switch(
weaponid)
        {
            case 
CSW_HEGRENADE:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
            case 
CSW_SMOKEGRENADE:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
            case 
CSW_FLASHBANG:
            {
                
set_pev(idpev_viewmodel2g_bombmodelwpn)
            }
        }
    }
}

stock fm_set_user_model_index(idvalue)
{
    
set_pdata_int(idOFFSET_MODELINDEXvalueOFFSET_LINUX)

i want this zombie class if he can throw bullet frezz human with 10 sec
and zm need wait 15 sec to throw again ,-,
oussama90 is offline
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 00:35.


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