AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Biohazard v2.00 Beta 3b (Zombie Mod) (https://forums.alliedmods.net/showthread.php?t=68523)

Indigozm 12-13-2018 23:49

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
Krtola, Looks great!

Krtola 04-25-2019 06:30

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
https://forums.alliedmods.net/showthread.php?t=215468

Dasher zombie for biohazard mod.

I set that every zombie has this ability( because I do not use classes but zombie evolution).

If somebody needs for particular class,maybe we can adjust it.

PHP Code:

#include <amxmodx>
#include <engine>
#include <fakemeta_util>
#include <biohazard>

new bool:g_cooldown[33], g_rushing[33], cvar_rush

public plugin_precache()
{
    
register_plugin("[BIO] Class: Rusher Zombie""1.0""Catastrophe")
        
register_clcmd("drop","do_rush")
          
        
cvar_rush register_cvar("rush_cooldown","20.0")      
}

public 
do_rush(ent)
{
    if(!
is_user_alive(ent) || g_cooldown[ent] || !is_user_zombie(ent))
        return

        if(!(
pev(entpev_flags) & FL_ONGROUND))    
                return

        
g_cooldown[ent] = true
        g_rushing
[ent] = true

    set_task
(0.1"rush_now"ent)
        
        
set_task(get_pcvar_float(cvar_rush),"reset_cooldown",ent)
        
set_task(1.0,"resetmd",ent
}

public 
rush_now(ent)
{    
    if(!
is_user_alive(ent))
        return
    
    static 
Float:Origin[3]
    
get_position(ent1000.00.00.0Origin)
    
    
hook_ent2(entOrigin2000.0)
}

public 
reset_cooldown(id)
{
       
g_cooldown[id] = false
}

public 
resetmd(id)
{
       
g_rushing[id] = false      
}

stock get_position(entFloat:forwFloat:rightFloat:upFloat:vStart[])
{
    new 
Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
    
    
pev(entpev_originvOrigin)
    
pev(entpev_view_ofs,vUp//for player
    
xs_vec_add(vOrigin,vUp,vOrigin)
    
pev(entpev_v_anglevAngle// if normal entity ,use pev_angles
    
    
vAngle[0] = 0.0
    
    angle_vector
(vAngle,ANGLEVECTOR_FORWARD,vForward//or use EngFunc_AngleVectors
    
angle_vector(vAngle,ANGLEVECTOR_RIGHT,vRight)
    
angle_vector(vAngle,ANGLEVECTOR_UP,vUp)
    
    
vStart[0] = vOrigin[0] + vForward[0] * forw vRight[0] * right vUp[0] * up
    vStart
[1] = vOrigin[1] + vForward[1] * forw vRight[1] * right vUp[1] * up
    vStart
[2] = vOrigin[2] + vForward[2] * forw vRight[2] * right vUp[2] * up
}

stock hook_ent2(entFloat:VicOrigin[3], Float:speed)
{
    static 
Float:fl_Velocity[3]
    static 
Float:EntOrigin[3]
    
    
pev(entpev_originEntOrigin)
    
    static 
Float:distance_f
    distance_f 
get_distance_f(EntOriginVicOrigin)
    
    if (
distance_f 60.0)
    {
        new 
Float:fl_Time distance_f speed
        
        fl_Velocity
[0] = (VicOrigin[0] - EntOrigin[0]) / fl_Time
        fl_Velocity
[1] = (VicOrigin[1] - EntOrigin[1]) / fl_Time
        fl_Velocity
[2] = (VicOrigin[2] - EntOrigin[2]) / fl_Time
    
} else {
        
fl_Velocity[0] = 0.0
        fl_Velocity
[1] = 0.0
        fl_Velocity
[2] = 0.0
    
}

    
entity_set_vector(entEV_VEC_velocityfl_Velocity)


https://forums.alliedmods.net/showthread.php?t=150283

Houndeye Zombie for Biohazard mod.

I set that every zombie has this ability( because I do not use classes but zombie evolution).

If somebody needs for particular class,maybe we can adjust it.

PHP Code:

/*                Houndeye Zombie v0.4
                    By Morte
                    
    -. Description: Blast player and make it fly.
    
    -. Cvars: zp_houndeye_timeblast 2.5 (Time to Blast)
          zp_houndeye_radius 150.0 (Blast Radius)
          zp_houndeye_infect_blast 0 (Blast infect players)
          zp_houndeye_damage 0 (Blast Damage)
          zp_houndeye_damage_amount 25 (Blast Damage Amount)
          
          
    -. Changelog:
            # 0.1 - Plugin Release
            # 0.2 - Added 2 cvar's: 1) To activate the blast damage
                            2) To select the amount of the damage
            # 0.3 - Now you can't use blast hability if you are nemesis.
            # 0.4 - Fixed cvar "zp_houndeye_damage_amount".
    -. Credits:
            # shinoda - Help me with how to make players fly.
            # MeRcyLeZZ - For his Zombie Plague ^.^
            # frk_14 - For the model.

*/

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <xs>
#include <engine>
#include <biohazard>

/*================================================================================
 [Plugin Customization]
=================================================================================*/
new const beam_cylinder[] = "sprites/white.spr"

new const houndeye_attack[][] = { "houndeye/he_attack1.wav""houndeye/he_attack3.wav" }
new const 
houndeye_blast[][] = { "houndeye/he_blast1.wav""houndeye/he_blast3.wav" }

/*================================================================================
 [End Customization]
=================================================================================*/

#define is_player(%0)    (1 <= %0 <= giMaxplayers)
#define TASK_BARTIME 16000

// Zombie vars
new gMsgBarTimegMsgDeathMsggSprBeamgiMaxplayerscvar_timeblastcvar_radiuscvar_blast_infect,
cvar_damagecvar_damage_amount

public plugin_init()
{
    
register_plugin("Houndeye Zombie""0.4""Morte")
    
    
cvar_timeblast register_cvar("zp_houndeye_timeblast""2.5")
    
cvar_radius register_cvar("zp_houndeye_radius""150.0")
    
cvar_blast_infect register_cvar("zp_houndeye_infect""0")
    
cvar_damage register_cvar("zp_houndeye_damage""0")
    
cvar_damage_amount register_cvar("zp_houndeye_damage_amount""25")
    
    
register_forwardFM_CmdStart"CmdStart")
    
    
giMaxplayers get_maxplayers()
    
gMsgBarTime get_user_msgid("BarTime")
    
gMsgDeathMsg get_user_msgid("DeathMsg")
}

public 
plugin_precache()

    
gSprBeam precache_model(beam_cylinder)
    
    for (new 
0sizeof houndeye_attacki++)
        
engfunc(EngFunc_PrecacheSoundhoundeye_attack[i])
    for (new 
0sizeof houndeye_blasti++)
        
engfunc(EngFunc_PrecacheSoundhoundeye_blast[i])
}

public 
CmdStart(id)
{
    if(!
is_user_alive(id))
        return;
    
    static 
iButtoniButton pev(idpev_button)
    static 
iOldButtoniOldButton pev(idpev_oldbuttons)
    
    if(
is_user_zombie(id))
    {
        if( ( 
iButton IN_USE ) && !( iOldButton IN_USE ) )
        {
            if(!
is_user_alive(id))
                return;

            
message_begin(MSG_ONEgMsgBarTime_id)
            
write_byte(get_pcvar_num(cvar_timeblast))
            
write_byte(0)
            
message_end()
            
            
emit_sound(idCHAN_VOICEhoundeye_attack[random_num(0sizeof houndeye_attack 1)], 1.0ATTN_NORM0PITCH_NORM)
            
            
set_task(get_pcvar_float(cvar_timeblast), "blast_players"id+TASK_BARTIME)
        }
            
        if( 
iOldButton IN_USE && !( iButton IN_USE ) )
            
set_task(0.1"blast_stop"id)
    }
}

public 
blast_stop(id)
{
    
message_begin(MSG_ONEgMsgBarTime_id)
    
write_byte(0)
    
write_byte(0)
    
message_end()
    
    
remove_task(id+TASK_BARTIME)
}

public 
blast_players(id)
{
    
id -= TASK_BARTIME
    
    
new FloatiOrigin[3]
    
pev(idpev_originiOrigin)
    
    
emit_sound(idCHAN_VOICEhoundeye_blast[random_num(0sizeof houndeye_blast 1)], 1.0ATTN_NORM0PITCH_NORM)
    
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYiOrigin0)
    
write_byte(TE_BEAMCYLINDER)
    
engfunc(EngFunc_WriteCoordiOrigin[0])
    
engfunc(EngFunc_WriteCoordiOrigin[1])
    
engfunc(EngFunc_WriteCoordiOrigin[2])
    
engfunc(EngFunc_WriteCoordiOrigin[0])
    
engfunc(EngFunc_WriteCoordiOrigin[1])
    
engfunc(EngFunc_WriteCoordiOrigin[2]+385.0)
    
write_short(gSprBeam)
    
write_byte(0)
    
write_byte(0)
    
write_byte(4)
    
write_byte(60)
    
write_byte(0)
    
write_byte(255)
    
write_byte(255)
    
write_byte(255)
    
write_byte(200)
    
write_byte(0)
    
message_end()
    
    static 
EntFloatoriginF[3]
    
    while( (
Ent engfunc(EngFunc_FindEntityInSphereEntiOriginget_pcvar_float(cvar_radius))) )
    {
        if( 
is_player(Ent) && Ent != id )
        {
            if(
is_user_zombie(Ent))
                return 
PLUGIN_CONTINUE;
                
            if(
get_pcvar_num(cvar_blast_infect))
            {
                
infect_user(Ent1)
                
                
SendDeathMsg(idEnt)
            }
            
            if(
get_pcvar_num(cvar_damage))
            {    
                
fm_set_user_health(Entpev(Entpev_health) - get_pcvar_num(cvar_damage_amount))
            }
            
            
pev(Entpev_originoriginF)
            
            
originF[0] = (originF[0] - iOrigin[0]) * 10.0 
            originF
[1] = (originF[1] - iOrigin[1]) * 10.0 
            originF
[2] = (originF[2] - iOrigin[2]) + 500.0
            
            set_pev
(Entpev_velocityoriginF)
        }
    }
    
    return 
PLUGIN_HANDLED;
}

SendDeathMsg(attackervictim)
{
    
message_begin(MSG_BROADCASTgMsgDeathMsg)
    
write_byte(attacker)
    
write_byte(victim)
    
write_byte(1)
    
write_string("infection")
    
message_end()
}

/*================================================================================
 [Stocks]
=================================================================================*/

stock print_chatColor(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"!g","^4");// green
    
replace_all(msg,190,"!n","^1");// normal
    
replace_all(msg,190,"!t","^3");// team
    
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
    if (
is_user_connected(players[i]))
    {
        
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
        
write_byte(players[i]);
        
write_string(msg);
        
message_end();
    }
}

stock fm_set_user_health(idhealth)
{
    (
health 0) ? set_pev(idpev_healthfloat(health)) : dllfunc(DLLFunc_ClientKillid);



Krtola 05-15-2019 09:10

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
-Infection Effect for Biohazard Mod
- Download resources from there https://forums.alliedmods.net/showthread.php?t=182408
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <biohazard>
#include <xs>

#define PLUGIN "[ZP] Addon: Infect-Effect"
#define VERSION "1.0"
#define AUTHOR "Dias"

new g_effect_id[33], g_had_effect[33]
new const 
effect_model[] = "sprites/infect-effect.spr"

new cvar_scalecvar_showtimecvar_lightlevel

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fw_spawn_post"1)
    
register_forward(FM_AddToFullPack"fw_WhatTheFuck_Post"1)
    
    
cvar_scale register_cvar("zp_in-ef_scale""0.035")
    
cvar_showtime register_cvar("zp_in-ef_showtime""2.0")
    
cvar_lightlevel register_cvar("zp_in-ef_lightlevel""100.0")
}

public 
plugin_precache()
{
    
precache_model(effect_model)
}

public 
fw_spawn_post(id)
{
    if(
g_had_effect[id])
        
remove_effect(id)
}

public 
event_infect(victimattacker)
{
    if(
is_user_alive(victim))
    {
        
show_effect(victim)
    }
}

public 
show_effect(id)
{
    
g_effect_id[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"env_sprite"))
    
    if (!
pev_valid(g_effect_id[id]))
        return
    
    
g_had_effect[id] = 1
    
    set_pev
(g_effect_id[id], pev_solidSOLID_NOT)
    
set_pev(g_effect_id[id], pev_movetypeMOVETYPE_NONE)

    
engfunc(EngFunc_SetModelg_effect_id[id], effect_model)
    
    
set_pev(g_effect_id[id], pev_rendermodekRenderTransAlpha)
    
set_pev(g_effect_id[id], pev_renderamt0.0)
    
set_pev(g_effect_id[id], pev_ownerid)
    
set_pev(g_effect_id[id], pev_scaleget_pcvar_float(cvar_scale))
    
set_pev(g_effect_id[id], pev_light_levelget_pcvar_float(cvar_lightlevel))
    
    
set_task(get_pcvar_float(cvar_showtime), "remove_effect"g_effect_id[id])
}

public 
fw_WhatTheFuck_Post(eseenthosthost_flagsplayerp_set)
{
    if(!(
host 33))
        return 
FMRES_IGNORED
        
    
if(ent != g_effect_id[host] || !pev_valid(ent))
        return 
FMRES_IGNORED
        
    
if(pev(entpev_owner) != host)
        return 
FMRES_IGNORED
        
    
if(!is_user_alive(host))
        return 
FMRES_IGNORED
        
    
static Float:origin[3], Float:forvec[3], Float:voffsets[3], Float:Angles[3]
    
    
pev(hostpev_originorigin)
    
pev(hostpev_view_ofsvoffsets)
    
pev(hostpev_anglesAngles)
    
    
xs_vec_add(originvoffsetsorigin)
    
    
// Get a forward vector in the direction of player's aim
    
velocity_by_aim(host10forvec)
    
    
// Set the sprite on the new origin
    
xs_vec_add(originforvecorigin)
    
    
engfunc(EngFunc_SetOriginentorigin)
    
set_es(esES_Originorigin)
    
set_es(esES_AnglesAngles)
    
    
// Make the sprite visible
    
set_es(esES_RenderModekRenderTransAdd)
    
set_es(esES_RenderAmt200)
        
    return 
FMRES_HANDLED
}

public 
remove_effect(ent)
{
    
g_had_effect[pev(entpev_owner)] = 0
    
    
if(pev_valid(ent))
        
engfunc(EngFunc_RemoveEntityent)



JorisCeoen 12-01-2019 17:51

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
Was this truly the very first Zombie Escape or Zombie Mod-typish thing for CS1.6? I mean, didn't zombie escape exist before Source was even out yet? (before 2004)

ZASTRELIS 12-09-2019 12:34

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
Is these addon working with zBot? Because I see incorrect things with players models and other bio*stuff

ZASTRELIS 12-09-2019 22:59

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
Quote:

Originally Posted by HamletEagle (Post 2454589)
With ham, for bots that don't have "player" classname, you need to either use amxx 1.8.3 and set specialbot param to 1 or use directly RegisterHamPlayer. For amxx < 183 use RegisterHamFromEntity and provide a bot index.

Special thanks for solving the problem with register damage for bots
Quote:

I publish this fix for rehlds & zbots. Working for me correctly on cstrike mod (instead cz) with -bots
Replace RegisterHamPlayer instead of RegisterHam
Code:
RegisterHamPlayer(Ham_TakeDamage, "bacon_takedamage_player") RegisterHamPlayer(Ham_TraceAttack, "bacon_traceattack_player") RegisterHamPlayer(Ham_Killed, "bacon_killed_player") RegisterHamPlayer(Ham_Spawn, "bacon_spawn_player_post", 1)
click for expand to the view demo video


GBLTeam 02-10-2020 16:15

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
How to disable smoke grenade, so people wont have it?

CryWolf 02-15-2020 05:05

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
Hi remove "weapon_smokegrenade" or add dashes like i did , from biohazard.cfg and recompile the plugin
Code:

// weapon name (game)
new g_grenades[][] =
{
        "weapon_hegrenade",
        "weapon_flashbang"
        // "weapon_smokegrenade"
}


TickTack 02-23-2020 06:42

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
How can I remedy stalker speed too slow?
I have set speed to 420 and sv_maxspeed 999 but zombie still walks 320?

Krtola 03-04-2020 01:55

Re: Biohazard v2.00 Beta 3b (Zombie Mod)
 
Need to use maxspeed api , or cliend cmd to change cl side, back and forward speed ...


All times are GMT -4. The time now is 00:44.

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