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

|HELP| Bug Revenant Ice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-04-2016 , 17:23   |HELP| Bug Revenant Ice
Reply With Quote #1

Hi guys
After ice Human by Revenant Ice , Human fast walk, speed is high .
Who can help me get my fix to this problem?
PHP Code:
#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[] = { "[Press [G] >> Ice Human]" // 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] = 

    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] += 
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball
     
    return 
PLUGIN_HANDLED 


public 
touchPlayer(ballplayer) { 
    
client_print(0,print_chat,"[Revenant Ice] 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] = 
        g_paralizen
[i] = 
        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] = 
    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] = 
    fm_set_rendering
(id


public 
remove_values(id

    
remove_task(id
    
g_can[id] = 


public 
ability_zero(id)  

    
g_can[id] -= 
    
if(!g_can[id]) client_print(id,print_center,"Ice 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)))  
    {  
            if(
zp_get_user_next_class(id) == g_zclassparalize)  
        {  
zp_set_user_zombie_class(id0)
client_print(idprint_chat"This class is only for VIP")                           
            }      
        }      
}  

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 
}  

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
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang1065\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by Dr.Mohammad; 07-12-2016 at 13:35.
Dr.Mohammad is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 07-04-2016 , 18:25   Re: |HELP| Bug Revenant Ice
Reply With Quote #2

I'm not sure what you mean by human rate was high. But this is another zombie class who can shoot freeze webs and stop people, few bugs fixed on this by zmd. If you want to check it out here you go:

Spoiler
Attached Files
File Type: sma Get Plugin or Get Source (zp_zclass_zombie_freezer.sma - 483 views - 9.5 KB)
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!
New and Clueless is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-05-2016 , 07:26   Re: |HELP| Bug Revenant Ice
Reply With Quote #3

Quote:
Originally Posted by New and Clueless View Post
I'm not sure what you mean by human rate was high. But this is another zombie class who can shoot freeze webs and stop people, few bugs fixed on this by zmd. If you want to check it out here you go:

Spoiler
tanx . but i need to class revenant ice!
plz fix it !
Dr.Mohammad is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-05-2016 , 21:27   Re: |HELP| Bug Revenant Ice
Reply With Quote #4

Quote:
Originally Posted by Dr.Mohammad View Post
Hi guys
After freezing Human by Revenant Ice , Human rate was high.
Who can help me get my fix to this problem?
PHP Code:
#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[] = { "[Press [G] >> Ice Human]" // 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] = 

    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] += 
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball
     
    return 
PLUGIN_HANDLED 


public 
touchPlayer(ballplayer) { 
    
client_print(0,print_chat,"Revenant Ice : 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] = 
        g_paralizen
[i] = 
        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] = 
    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] = 
    fm_set_rendering
(id


public 
remove_values(id)

    
remove_task(id
    
g_can[id] = 


public 
ability_zero(id)  

    
g_can[id] -= 
    
if(!g_can[id]) client_print(id,print_center,"??????????? ???????!"
    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 VIP"
                 
client_print(idprint_chat"If you want this class. Pay for it!"
            }      
        }      
}  

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 
}  

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

plz help !
Dr.Mohammad is offline
ZdubZ0r
Senior Member
Join Date: Feb 2011
Location: Romania
Old 07-08-2016 , 14:21   Re: |HELP| Bug Revenant Ice
Reply With Quote #5

We dont know what do you mean by "high human rate" , be more specific...
ZdubZ0r is offline
Send a message via Yahoo to ZdubZ0r Send a message via Skype™ to ZdubZ0r
zodisrael
Junior Member
Join Date: Apr 2016
Location: Israel
Old 07-08-2016 , 17:55   Re: |HELP| Bug Revenant Ice
Reply With Quote #6

Quote:
Originally Posted by Dr.Mohammad View Post
Hi guys
After freezing Human by Revenant Ice , Human rate was high.
Who can help me get my fix to this problem?
PHP Code:
#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[] = { "[Press [G] >> Ice Human]" // 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] = 

    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] += 
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball
     
    return 
PLUGIN_HANDLED 


public 
touchPlayer(ballplayer) { 
    
client_print(0,print_chat,"Revenant Ice : 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] = 
        g_paralizen
[i] = 
        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] = 
    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] = 
    fm_set_rendering
(id


public 
remove_values(id)

    
remove_task(id
    
g_can[id] = 


public 
ability_zero(id)  

    
g_can[id] -= 
    
if(!g_can[id]) client_print(id,print_center,"??????????? ???????!"
    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 VIP"
                 
client_print(idprint_chat"If you want this class. Pay for it!"
            }      
        }      
}  

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 
}  

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 mean to many pings ?
zodisrael is offline
Send a message via Skype™ to zodisrael
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-11-2016 , 10:15   Re: |HELP| Bug Revenant Ice
Reply With Quote #7

Quote:
Originally Posted by ZdubZ0r View Post
We dont know what do you mean by "high human rate" , be more specific...
sry guys for bad speak english!

bug is :
After Ice Human by Revenant Ice , Human Fast walk.

plz fix it !
Dr.Mohammad is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 07-12-2016 , 10:20   Re: |HELP| Bug Revenant Ice
Reply With Quote #8

I tried to fix using

Code:
		// Update player's maxspeed
		ExecuteHamB(Ham_Player_ResetMaxSpeed, player)
but it keeps giving me compile errors, sorry.
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!
New and Clueless is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-12-2016 , 13:32   Re: |HELP| Bug Revenant Ice
Reply With Quote #9

Quote:
Originally Posted by New and Clueless View Post
I tried to fix using

Code:
		// Update player's maxspeed
		ExecuteHamB(Ham_Player_ResetMaxSpeed, player)
but it keeps giving me compile errors, sorry.
ok.plz test egain and fix speed human !
tanx.merci
PHP Code:
#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[] = { "[Press [G] >> Ice Human]" // 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] = 

    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] += 
    
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball
     
    return 
PLUGIN_HANDLED 


public 
touchPlayer(ballplayer) { 
    
client_print(0,print_chat,"[Revenant Ice] 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] = 
        g_paralizen
[i] = 
        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] = 
    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] = 
    fm_set_rendering
(id


public 
remove_values(id

    
remove_task(id
    
g_can[id] = 


public 
ability_zero(id)  

    
g_can[id] -= 
    
if(!g_can[id]) client_print(id,print_center,"Ice 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)))  
    {  
            if(
zp_get_user_next_class(id) == g_zclassparalize)  
        {  
zp_set_user_zombie_class(id0)
client_print(idprint_chat"This class is only for VIP")                           
            }      
        }      
}  

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 
}  

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
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang1065\\ f0\\ fs16 \n\\ par }
*/ 
Dr.Mohammad 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 10:07.


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