Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Class: Witch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkAlucard87
Member
Join Date: Feb 2009
Old 06-30-2009 , 13:25   Re: [ZP] Class: Witch
Reply With Quote #1

I updated this Version with original Witch Cry, so u hear every 20 sec the Witch crying if she is near you.

*Known "Bugs": All Witches Cry at the same Time so u just hear one Cry

BTW to "froze" someone seems not to Work ( was also befor my changes because i dont change much), someone have same Problem?

Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <zombieplague> 
#include <fun>

new const sprite_grenade_glass[] = { "models/glassgibs.mdl" }
new const grenade_frost_break[][] = { "warcraft3/impalelaunch1.wav" }
new const grenade_frost_player[][] = { "warcraft3/impalehit.wav" }
const BREAK_GLASS = 0x01
const UNIT_SECOND = (1<<12)
const FFADE_IN = 0x0000
new dano_multiplicado[33]
new witch_dmg

new const zclass14_name[] = { "Zombie Witch" }
new const zclass14_info[] = { "(Paralyze & 2x More Damage)" }
new const zclass14_model[] = { "zm_witch" }
new const zclass14_clawmodel[] = { "v_knife_witch.mdl" }
const zclass14_health = 1600
const zclass14_speed = 230
const Float:zclass14_gravity = 0.9
const Float:zclass14_knockback = 0.9

new g_zclass14
new cvar_freezeduration, g_glassSpr, g_msgScreenFade, cvar_humangravity
new g_frozen[33]
new g_zombie[33]
new Array:g_zclass_grav
new g_zombieclass[33]
new cvar_nemgravity
new cvar_survgravity
new g_maxplayers

new const sound_witch_cry[] = "zombie_plague/female_cry_2.wav"

public plugin_init()
{
    register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
    register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
    register_event("DeathMsg", "event_DeathMsg", "a");
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    witch_dmg = register_cvar("zp_witch_damage", "2.0")
    cvar_freezeduration = get_cvar_pointer("zp_frost_duration")
    cvar_humangravity = get_cvar_pointer("zp_human_gravity")
    cvar_nemgravity = get_cvar_pointer("zp_nem_gravity")
    cvar_survgravity = get_cvar_pointer("zp_surv_gravity")
    g_msgScreenFade = get_user_msgid("ScreenFade")
    g_maxplayers = get_maxplayers()
    set_task (20.0,"sound_witch",_,_,_,"b");
}
public plugin_precache()
{
  precache_sound(sound_witch_cry)
    register_plugin("[ZP] Zombie Class: Witch", "1.2", "Bummps")
    
    new i
    
    for (i = 0; i < sizeof grenade_frost_break; i++)
        engfunc(EngFunc_PrecacheSound, grenade_frost_break[i])
    
    for (i = 0; i < sizeof grenade_frost_player; i++)
        engfunc(EngFunc_PrecacheSound, grenade_frost_player[i])
    
    g_glassSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_glass)
    g_zclass14 = zp_register_zombie_class(zclass14_name, zclass14_info, zclass14_model, zclass14_clawmodel, zclass14_health, zclass14_speed, zclass14_gravity, zclass14_knockback)
}
public client_connect(id)
{
    dano_multiplicado[id] = false
    remove_freeze(id)
}
public event_new_round(id)
{
    dano_multiplicado[id] = false
    remove_freeze(id)
}
public client_disconnect(id)
{
    dano_multiplicado[id] = false
    remove_freeze(id)
}
public event_DeathMsg(id)
{
    dano_multiplicado[id] = false
    remove_freeze(id)
}
public zp_user_humanized_post(id)
{
    dano_multiplicado[id] = false
    remove_freeze(id)
}
public zp_user_humanized_pre(id)
{
    dano_multiplicado[id] = false
    remove_freeze(id)
}
public fw_PlayerPreThink(id)
{
    if (!is_user_alive(id))
        return;

    if (g_frozen[id])
    {
        set_pev(id, pev_velocity, Float:{0.0,0.0,0.0})
        set_pev(id, pev_maxspeed, 1.0) 
    }
}
public zp_user_infected_post(id, infector)
{  
    if (zp_get_user_zombie_class(id) == g_zclass14)  
    {
        //set_task (10.0,"sound_witch",_,_,_,"b");
        dano_multiplicado[id] = true
    }  
 }  
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if ( is_user_alive( attacker ) && get_user_weapon(attacker) == CSW_KNIFE && dano_multiplicado[attacker] && zp_get_user_zombie_class(attacker) == g_zclass14 && g_zombie[attacker] )
    {            
        SetHamParamFloat(4, damage * get_pcvar_float( witch_dmg ) )
        frost_victim(victim)
    }
}
public frost_victim(victim)
{
    if (!is_user_alive(victim) || g_frozen[victim])
        return;
    #if defined HANDLE_MODELS_ON_SEPARATE_ENT
    fm_set_rendering(g_ent_playermodel[victim], kRenderFxGlowShell, 0, 100, 200, kRenderNormal, 25)
    #else
    fm_set_rendering(victim, kRenderFxGlowShell, 0, 100, 200, kRenderNormal, 25)
    #endif
    engfunc(EngFunc_EmitSound, victim, CHAN_BODY, grenade_frost_player[random_num(0, sizeof grenade_frost_player - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
    static Float:freezeduration
    freezeduration = get_pcvar_float(cvar_freezeduration)
    message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, victim)
    write_short(UNIT_SECOND*1)
    write_short(floatround(UNIT_SECOND*freezeduration))
    write_short(FFADE_IN)
    write_byte(0)
    write_byte(50) 
    write_byte(200)
    write_byte(100)
    message_end()
    if (pev(victim, pev_flags) & FL_ONGROUND)
        set_pev(victim, pev_gravity, 999999.9)
    else
        set_pev(victim, pev_gravity, 0.000001)
    g_frozen[victim] = true;
    set_task(freezeduration, "remove_freeze", victim)
}
public remove_freeze(id)
{
    if (!g_frozen[id] || !is_user_alive(id))
        return;
    g_frozen[id] = false;
    if (zp_get_user_nemesis(id))
    {
        set_pev(id, pev_gravity, get_pcvar_float(cvar_nemgravity))
    }
    if (zp_get_user_survivor(id))
    {
        set_pev(id, pev_gravity, get_pcvar_float(cvar_survgravity))
    }
    if (g_zombie[id])
    {
        set_pev(id, pev_gravity, Float:ArrayGetCell(g_zclass_grav, g_zombieclass[id]))
    }
    else
    {
        set_pev(id, pev_gravity, get_pcvar_float(cvar_humangravity))
    }
    engfunc(EngFunc_EmitSound, id, CHAN_BODY, grenade_frost_break[random_num(0, sizeof grenade_frost_break - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
    #if defined HANDLE_MODELS_ON_SEPARATE_ENT
    fm_set_rendering(g_ent_playermodel[id])
    #else
    fm_set_rendering(id)
    #endif
    static Float:origin2F[3]
    pev(id, pev_origin, origin2F)
    engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin2F, 0)
    write_byte(TE_BREAKMODEL) 
    engfunc(EngFunc_WriteCoord, origin2F[0]) 
    engfunc(EngFunc_WriteCoord, origin2F[1]) 
    engfunc(EngFunc_WriteCoord, origin2F[2]+24.0) 
    write_coord(16) 
    write_coord(16) 
    write_coord(16) 
    write_coord(random_num(-50, 50)) 
    write_coord(random_num(-50, 50)) 
    write_coord(25) 
    write_byte(10) 
    write_short(g_glassSpr) 
    write_byte(10) 
    write_byte(25) 
    write_byte(BREAK_GLASS) 
    message_end()
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
    static Float:color[3]
    color[0] = float(r)
    color[1] = float(g)
    color[2] = float(b)
    
    set_pev(entity, pev_renderfx, fx)
    set_pev(entity, pev_rendercolor, color)
    set_pev(entity, pev_rendermode, render)
    set_pev(entity, pev_renderamt, float(amount))
}

public sound_witch()
{
    for (new i = 1; i<=g_maxplayers;i++){
    if ((zp_get_user_zombie_class(i) == g_zclass14) && is_user_alive(i)&& zp_get_user_zombie(i))  
    {
  emit_sound(i, CHAN_ITEM, sound_witch_cry, 1.0, ATTN_NORM, 0, PITCH_NORM);
  }
  }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/
Attached Files
File Type: zip zp_zclass_witch.zip (897.7 KB, 342 views)

Last edited by DarkAlucard87; 06-30-2009 at 20:12.
DarkAlucard87 is offline
csl
Member
Join Date: Apr 2009
Old 07-02-2009 , 03:56   Re: [ZP] Class: Witch
Reply With Quote #2

froze not Work, I have same problem.
csl is offline
DarkAlucard87
Member
Join Date: Feb 2009
Old 07-02-2009 , 07:42   Re: [ZP] Class: Witch
Reply With Quote #3

with original or my version, or both?
DarkAlucard87 is offline
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 07-02-2009 , 15:07   Re: [ZP] Class: Witch
Reply With Quote #4

hm fronzen isnt working but 2x damage is ?
i'll try fix it.
__________________




Bummps is offline
csl
Member
Join Date: Apr 2009
Old 07-02-2009 , 15:39   Re: [ZP] Class: Witch
Reply With Quote #5

Quote:
with original or my version, or both?
with original. now i will try your version
csl is offline
DarkAlucard87
Member
Join Date: Feb 2009
Old 07-03-2009 , 06:13   Re: [ZP] Class: Witch
Reply With Quote #6

Oh u dont need to, i just wanted to know if it dont works cause my changes or not. And for me it also dont works with original. My version has just added some "Cry-Sound" every 20 Secounds, not more
DarkAlucard87 is offline
FRee StyLeR | SteeL
Junior Member
Join Date: Jul 2009
Old 07-03-2009 , 09:55   Re: [ZP] Class: Witch
Reply With Quote #7

[BP]
aew man...vlw..vo testa dps edito e posto oq axei..ok??
English
ae man valeu ... .. vo forehead then edit and post what I thought .. ok?
FRee StyLeR | SteeL is offline
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 07-03-2009 , 12:13   Re: [ZP] Class: Witch
Reply With Quote #8

hm i'll fix it later, i need to reinstall my counter-strike.
__________________




Bummps is offline
gin
Junior Member
Join Date: Feb 2009
Old 07-08-2009 , 21:07   Re: [ZP] Class: Witch
Reply With Quote #9

update?
gin is offline
[MSI] Creator
Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-10-2009 , 10:24   Re: [ZP] Class: Witch
Reply With Quote #10

veru good class for zombie plague
[MSI] Creator is offline
Send a message via Skype™ to [MSI] Creator
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 16:23.


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