Raised This Month: $ Target: $400
 0% 

Biohazard v2.00 Beta 3b (Zombie Mod)


Post New Thread Reply   
 
Thread Tools Display Modes
Marcelo21
Member
Join Date: Mar 2010
Location: Argentina
Old 04-04-2015 , 06:27   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4041

as I can restrigir some weapons menu for admin?
Marcelo21 is offline
Send a message via MSN to Marcelo21 Send a message via Skype™ to Marcelo21
TickTack
Member
Join Date: Dec 2009
Old 04-07-2015 , 06:06   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4042

Has anyone made ZP Flare for Biohazard?
I found one, but it has no source and people write it can crash the server.
TickTack is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-07-2015 , 14:04   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4043

For a long time I used this plugin,and work fine for me.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

// Native from cstrike.inc
// Get weapon type. Corresponds to CSW_* in amxconst.inc: 1 is CSW_P228, 2 is CSW_SCOUT and so on...
native cs_get_weapon_id(index);

new const 
model_grenade_flare[] = "models/v_smokegrenade.mdl"
new const pmodel_grenade_flare[] = "models/p_smokegrenade.mdl"
new const wmodel_grenade_flare[] = "models/w_smokegrenade.mdl"
new const sprite_grenade_trail[] = "sprites/laserbeam.spr"
new const grenade_flare[][] = { "items/nvg_on.wav" }

// CS Player CBase Offsets (win32)
const OFFSET_ACTIVE_ITEM 373

// CS Weapon CBase Offsets (win32)
const OFFSET_WEAPONOWNER 41

// Linux diff's
const OFFSET_LINUX // offsets 5 higher in Linux builds
const OFFSET_LINUX_WEAPONS // weapon offsets are only 4 steps higher on Linux

// Some constants
const USE_STOPPED 0

// HACK: pev_ field used to store custom nade types and their values
const PEV_NADE_TYPE pev_flTimeStepSound
const NADE_TYPE_FLARE 4444
const PEV_FLARE_COLOR pev_punchangle
const PEV_FLARE_DURATION pev_flSwimTime

new cvar_flaregrenadescvar_flareduration,
cvar_flarecolorcvar_flaresize

// Cached stuff for players
new g_isconnected[33// whether player is connected
new g_currentweapon[33// player's current weapon id
#define is_user_valid_connected(%1) (1 <= %1 <= get_maxplayers() && g_isconnected[%1])

// Game vars
new g_trailSpr // grenade sprites

public plugin_init()
{
    
register_plugin("ZP Flares Nades""4.3""MeRcyLeZZ")
    
    
register_forward(FM_SetModel"fw_SetModel")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade")
    
RegisterHam(Ham_Use"func_tank""fw_UseStationary_Post"1)
    
RegisterHam(Ham_Use"func_tankmortar""fw_UseStationary_Post"1)
    
RegisterHam(Ham_Use"func_tankrocket""fw_UseStationary_Post"1)
    
RegisterHam(Ham_Use"func_tanklaser""fw_UseStationary_Post"1)
    
RegisterHam(Ham_Item_Deploy"weapon_smokegrenade""fw_Item_Deploy_Post"1)
    
    
cvar_flaregrenades register_cvar("zp_flare_grenades","1")
    
cvar_flareduration register_cvar("zp_flare_duration""120")
    
cvar_flaresize register_cvar("zp_flare_size""25")
    
cvar_flarecolor register_cvar("zp_flare_color""3")
}

public 
plugin_precache()
{
    
engfunc(EngFunc_PrecacheModelmodel_grenade_flare)
    
engfunc(EngFunc_PrecacheModelpmodel_grenade_flare)
    
engfunc(EngFunc_PrecacheModelwmodel_grenade_flare)
    
    
// Custom models/sprites for grenades
    
g_trailSpr engfunc(EngFunc_PrecacheModelsprite_grenade_trail)
    
    for (new 
0sizeof grenade_flarei++)
        
engfunc(EngFunc_PrecacheSoundgrenade_flare[i])
}

// Ham Player Spawn Post Forward
public fw_PlayerSpawn_Post(id)
{
    if (!
is_user_valid_connected(id))
        return;
    
    
// Replace weapon models (bugfix)
    
static weapon_ent
    weapon_ent 
fm_cs_get_current_weapon_ent(id)
    if (
pev_valid(weapon_ent)) replace_weapon_models(idcs_get_weapon_id(weapon_ent))
}

// Ham Use Stationary Gun Post Forward
public fw_UseStationary_Post(entitycalleractivatoruse_type)
{
    
// Someone stopped using a stationary gun
    
if (use_type == USE_STOPPED && is_user_valid_connected(caller))
        
replace_weapon_models(callerg_currentweapon[caller]) // replace weapon models (bugfix)
}

// Ham Weapon Deploy Forward
public fw_Item_Deploy_Post(weapon_ent)
{
    
// Get weapon's owner
    
static owner
    owner 
fm_cs_get_weapon_ent_owner(weapon_ent)
    
    
// Get weapon's id
    
static weaponid
    weaponid 
cs_get_weapon_id(weapon_ent)
    
    
// Store current weapon's id for reference
    
g_currentweapon[owner] = weaponid
    
    
// Replace weapon models with custom ones
    
replace_weapon_models(ownerweaponid)
}

// WeaponMod bugfix
//forward wpn_gi_reset_weapon(id);
public wpn_gi_reset_weapon(id)
{
    
// Replace knife model
    
replace_weapon_models(idCSW_KNIFE)
}

// Client joins the game
public client_putinserver(id)
    
// Player joined
    
g_isconnected[id] = true

// Client leaving
public client_disconnect(id)
    
g_isconnected[id] = false

// Forward Set Model
public fw_SetModel(entity, const model[])
{
    
// We don't care
    
if (strlen(model) < 8)
        return;
    
    
// Narrow down our matches a bit
    
if (model[7] != 'w' || model[8] != '_')
        return;
    
    
// Get damage time of grenade
    
static Float:dmgtime
    pev
(entitypev_dmgtimedmgtime)
    
    
// Grenade not yet thrown
    
if (dmgtime == 0.0)
        return;
    
    if (
model[9] == 's' && model[10] == 'm' && get_pcvar_num(cvar_flaregrenades)) // Flare
    
{
        
// Build flare's color
        
static rgb[3]
        switch (
get_pcvar_num(cvar_flarecolor))
        {
            case 
0// white
            
{
                
rgb[0] = 255 // r
                
rgb[1] = 255 // g
                
rgb[2] = 255 // b
            
}
            case 
1// red
            
{
                
rgb[0] = random_num(50,255// r
                
rgb[1] = // g
                
rgb[2] = // b
            
}
            case 
2// green
            
{
                
rgb[0] = // r
                
rgb[1] = random_num(50,255// g
                
rgb[2] = // b
            
}
            case 
3// blue
            
{
                
rgb[0] = // r
                
rgb[1] = // g
                
rgb[2] = random_num(50,255// b
            
}
            case 
4// random (all colors)
            
{
                
rgb[0] = random_num(50,200// r
                
rgb[1] = random_num(50,200// g
                
rgb[2] = random_num(50,200// b
            
}
            case 
5// random (r,g,b)
            
{
                switch (
random_num(13))
                {
                    case 
1// red
                    
{
                        
rgb[0] = random_num(50,255// r
                        
rgb[1] = // g
                        
rgb[2] = // b
                    
}
                    case 
2// green
                    
{
                        
rgb[0] = // r
                        
rgb[1] = random_num(50,255// g
                        
rgb[2] = // b
                    
}
                    case 
3// blue
                    
{
                        
rgb[0] = // r
                        
rgb[1] = // g
                        
rgb[2] = random_num(50,255// b
                    
}
                }
            }
        }
        
        
// Set model
        
EF_SetModel(entitywmodel_grenade_flare)
        
        
// Give it a glow
        
fm_set_rendering(entitykRenderFxGlowShellrgb[0], rgb[1], rgb[2], kRenderNormal16);
        
        
// And a colored trail
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW// TE id
        
write_short(entity// entity
        
write_short(g_trailSpr// sprite
        
write_byte(3// life
        
write_byte(2// width
        
write_byte(rgb[0]) // r
        
write_byte(rgb[1]) // g
        
write_byte(rgb[2]) // b
        
write_byte(200// brightness
        
message_end()
        
        
// Set grenade type on the thrown grenade entity
        
set_pev(entityPEV_NADE_TYPENADE_TYPE_FLARE)
        
        
// Set flare color on the thrown grenade entity
        
set_pev(entityPEV_FLARE_COLORrgb)
    }
}

// Ham Grenade Think Forward
public fw_ThinkGrenade(entity)
{
    
// Invalid entity
    
if (!pev_valid(entity)) return HAM_IGNORED;
    
    
// Get damage time of grenade
    
static Float:dmgtimeFloat:current_time
    pev
(entitypev_dmgtimedmgtime)
    
current_time get_gametime()
    
    
// Check if it's time to go off
    
if (dmgtime current_time)
        return 
HAM_IGNORED;
    
    
// Check if it's one of our custom nades
    
if (pev(entityPEV_NADE_TYPE) != NADE_TYPE_FLARE)
        return 
HAM_IGNORED;
    
    
// Get its duration
    
static duration
    duration 
pev(entityPEV_FLARE_DURATION)
    
    
// Already went off, do lighting loop for the duration of PEV_FLARE_DURATION
    
if (duration 0)
    {
        
// Check whether this is the last loop
        
if (duration == 1)
        {
            
// Get rid of the flare entity
            
engfunc(EngFunc_RemoveEntityentity)
            return 
HAM_SUPERCEDE;
        }
        
        
// Light it up!
        
flare_lighting(entityduration)
        
        
// Set time for next loop
        
set_pev(entityPEV_FLARE_DURATION, --duration)
        
set_pev(entitypev_dmgtimecurrent_time 5.0)
    }
    
// Light up when it's stopped on ground
    
else if ((pev(entitypev_flags) & FL_ONGROUND) && fm_get_speed(entity) < 10)
    {
        
// Flare sound
        
engfunc(EngFunc_EmitSoundentityCHAN_WEAPONgrenade_flare[random_num(0sizeof grenade_flare 1)], 1.0ATTN_NORM0PITCH_NORM)
        
        
// Set duration and start lightning loop on next think
        
set_pev(entityPEV_FLARE_DURATIONget_pcvar_num(cvar_flareduration)/5)
        
set_pev(entitypev_dmgtimecurrent_time 0.1)
    }
    else
    {
        
// Delay explosion until we hit ground
        
set_pev(entitypev_dmgtimecurrent_time 0.5)
    }
    
    return 
HAM_IGNORED;
}

// Set Custom Weapon Models
replace_weapon_models(idweaponid)
{
    if (
weaponid != CSW_SMOKEGRENADE
    
|| !get_pcvar_num(cvar_flaregrenades))
        return;
    
    
set_pev(idpev_viewmodel2model_grenade_flare)
    
set_pev(idpev_weaponmodel2model_grenade_flare)
}

// Flare Lighting Effects
flare_lighting(entityduration)
{
    
// Get origin and color
    
static Float:originF[3], color[3]
    
pev(entitypev_originoriginF)
    
pev(entityPEV_FLARE_COLORcolor)
    
    
// Lighting
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYoriginF0)
    
write_byte(TE_DLIGHT// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_byte(get_pcvar_num(cvar_flaresize)) // radius
    
write_byte(color[0]) // r
    
write_byte(color[1]) // g
    
write_byte(color[2]) // b
    
write_byte(51//life
    
write_byte((duration 2) ? 0//decay rate
    
message_end()
    
    
// Sparks
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_SPARKS// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
message_end()
}

// Get User Current Weapon Entity
stock fm_cs_get_current_weapon_ent(id)
    return 
get_pdata_cbase(idOFFSET_ACTIVE_ITEMOFFSET_LINUX);

// Get Weapon Entity's Owner
stock fm_cs_get_weapon_ent_owner(ent)
    return 
get_pdata_cbase(entOFFSET_WEAPONOWNEROFFSET_LINUX_WEAPONS);

// Set entity's rendering type (from fakemeta_util)
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))
}

// Get entity's speed (from fakemeta_util)
stock fm_get_speed(entity)
{
    static 
Float:velocity[3]
    
pev(entitypev_velocityvelocity)
    
    return 
floatround(vector_length(velocity));
}

stock EF_SetModel(const ID, const STRING[])
    return 
engfunc(EngFunc_SetModelIDSTRING); 
Krtola is offline
Send a message via Skype™ to Krtola
TickTack
Member
Join Date: Dec 2009
Old 05-03-2015 , 19:35   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4044

Thanks, it works great.
The only problem is that now there is a hand sticking out of players mouth
But I will fix that.
TickTack is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 05-04-2015 , 05:52   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4045

Zombie class [ JACK FROST ]
Author:Chrescoe1
Adjusted for Biohazard by:Krtola

Warning:use only if you have yokomo patch 4
https://forums.alliedmods.net/showpo...postcount=3952

- Throw fire and ice sphere
- Both sphere can cause damage
- Sphere mode changes by pressing [E]
- Ice sphere will change the speed of victim
- Fire sphere will burn victim
- I tested and used this class a few months and worked well for me.
PHP Code:
/*
        Plugin generated by AMXX-Studio
       
        Plugin: [KF Like] JackZombie special to NewYear Zombie-Mod.ru //SlowPocke.jpg
        Creator: Chrescoe1
        Version: 0.0 //i con't test it on ZP - if you found Bugs - write me please Skype: Xailer24
       
        01.01.2014 19:27 - Code make started
        01.01.2014 20:14 - First Test
        01.01.2014 20:27 - 20:35 Drink Coffe - AFK
        01.01.2014 22:48 - Test Ending - Version 0.0 Released - Upload to Zombie-Mod.ru
       
        01.04.2014 00:00 - Fixed little bug with rendering
 
*/
 
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
#include <biohazard>
 
#define PLUGIN "[IceFire] JackFrost"
#define VERSION "0.1"
#define AUTHOR "Chrescoe1"

#define D_ZOMBIE_NAME "Jack the Frost"
#define D_ZOMBIE_DESC "Press E"
#define D_PLAYER_MODEL "jack_frost"
#define D_CLAWS "models/v_jackfrost.mdl"
#define PMODEL "models/player/jack_frost/jack_frost.mdl"
      
new Jack
       
#define FireShpere_Classname "ZP_Jack_FireShpere"
#define FrostSphere_Classname "ZP_Jack_FrostSphere"
 
#define CDHudChannel 4
 

#define Shpere "models/w_flashbang.mdl"
#define Trail "sprites/xenobeam.spr"
#define Burn "sprites/xflare2.spr"
#define ThrowFireShpereSound "FireBallMissileLaunch3.wav"

const Float:FireShpereExplodeRadius 140.0
const Float:FireShpereExplodeDamage 15.0
const Float:FireShpere_CD=30.0
 
const Float:FireShpere_BurnTime 6.0
const Float:BurnDamage 3.0
const Float:BurnUpdate 0.5    //Damage == FireShpere_BurnTime/BurnUpdate*BurnDamage
 
 
const Float:FrostSphereExplodeRadius 170.0
const Float:FrostSphereExplodeDamage 35.0
const Float:FrostSphere_CD=20.0
const Float:FrostSphere_FreezeTime 8.0
 
 
new bool:Can_Use_Ability[32],Selected_Ability[32],Float:Ability_CD[32],Float:UpdateHud[32]
new 
bool:in_frost[32],Float:FrostTime[32]
new 
bool:in_burn[32],Float:BurnTime[32],BurnOwner[32],Float:BurnUpdateDamage[32]
 
new 
Msg_ScreenShake,Msg_ScreenFade,TrailSpriteIndex,BurnSprite
 
public plugin_precache()
{
        
precache_model(Shpere)
        
TrailSpriteIndex=precache_model(Trail)
        
BurnSprite=precache_model(Burn)
        
precache_sound(ThrowFireShpereSound)
}
public 
plugin_init()
{
        
register_plugin(PLUGINVERSIONAUTHOR)
        
register_logevent("round_end"2"1=Round_End");

        
Msg_ScreenShake get_user_msgid("ScreenShake")
        
Msg_ScreenFade get_user_msgid("ScreenFade")  
        
        
register_class_data()
       
        
//Ham
        
RegisterHam(Ham_Touch"info_target""Ham_Touch_Pre")
       
        
//CMD
        
register_clcmd("drop","use_ability")    //Becouse ZP block impulse 100 =|
        // Add your code here...
}

public 
register_class_data()
{
    
Jack register_class(D_ZOMBIE_NAMED_ZOMBIE_DESC)

    if(
Jack != -1)
    {
        
set_class_data(JackDATA_HEALTH189.0)
        
set_class_data(JackDATA_SPEED250.0)
        
set_class_data(JackDATA_GRAVITY0.7)
        
set_class_data(JackDATA_HITREGENDLY5.0)
        
set_class_pmodel(JackD_PLAYER_MODEL)
        
set_class_wmodel(JackD_CLAWS)
    }
}

//Cmd Drop
public use_ability(id)
{
        if(!
is_user_connected(id))return
        if(!
is_user_alive(id))return
        
        if(!
is_user_zombie(id))return
        if(
get_user_class(id)!=Jack)return
        
        if(!
Can_Use_Ability[id-1])return
        new 
Floatgametime get_gametime()
        switch(
Selected_Ability[id-1])
        {
                case 
0:throw_Shpere(id,1),Ability_CD[id-1]=gametime+FireShpere_CD,Can_Use_Ability[id-1]=false
                
case 1:throw_Shpere(id,2),Ability_CD[id-1]=gametime+FrostSphere_CD,Can_Use_Ability[id-1]=false
        
}      
}
//Ham
public Ham_Touch_Pre(ent,world)
{
        if(!
pev_valid(ent))return HAM_IGNORED
       
        
new Classname[32]
        
pev(entpev_classnameClassnamesizeof(Classname))
        if(!
equal(ClassnameFireShpere_Classname)&&!equal(ClassnameFrostSphere_Classname))return HAM_IGNORED
       
        
new Float:Origin[3],id pev(ent,pev_owner)
                               
        
pev(ent,pev_origin,Origin)
        new 
victim =-1,Float:Damage_Radius,Float:Damage,attacker
        
switch(pev(ent,pev_iuser1))
        {
                case 
1:Damage_Radius=FireShpereExplodeRadius,Damage=FireShpereExplodeDamage,Light(Origin,30,255,105,0,4),DrawRings(Origin,255,105,0)
                case 
2:Damage_Radius=FrostSphereExplodeRadius,Damage=FrostSphereExplodeDamage,Light(Origin,30,0,105,255,4),DrawRings(Origin,0,105,255)
        }
       
       
        while((
victim engfunc(EngFunc_FindEntityInSpherevictimOriginDamage_Radius)) != 0)
        {
                if(
pev_valid(victim)&&pev(victimpev_takedamage)!=DAMAGE_NO&&pev(victimpev_solid)!=SOLID_NOT)
                {
                        if(
is_user_connected(victim))
                        {
                                if(
get_user_team(victim)!=get_user_team(id))
                                
                                if(!
is_user_zombie(victim))
                                {
                                        if(
pev(victim,pev_armorvalue)<=0.0&&pev(victim,pev_health)<Damage)attacker=id;else attacker=0
                                        
switch(pev(ent,pev_iuser1))
                                        {
                                                case 
1ExecuteHamB(Ham_TakeDamage,victiment,attackerDamageDMG_BURN),ScreenFade(victim,6,1,{255,125,0},125,1),fm_set_rendering(victim),
                                                        
BurnTime[victim-1]=get_gametime()+FireShpere_BurnTime,in_burn[victim-1]=true,in_frost[victim-1]=false,BurnOwner[victim-1]=id
                                                
case 2ExecuteHamB(Ham_TakeDamage,victiment,attackerDamageDMG_FREEZE),ScreenFade(victim,6,1,{0,0,255},125,1),
                                                        
FrostTime[victim-1]=get_gametime()+FrostSphere_FreezeTime,in_frost[victim-1]=true,in_burn[victim-1]=false,
                                                        
fm_set_rendering(victimkRenderFxGlowShell0,105,255kRenderNormal,15)
                                        }
                                        
ScreenShake(victim, ((1<<12) * 3), ((2<<12) * 3))
                                }
                        }
                        else 
ExecuteHamB(Ham_TakeDamage,victiment,idDamageDMG_BLAST)      //take damage entity
                
}
        }
        if(
pev_valid(ent))engfunc(EngFunc_RemoveEntityent)    //Remove sphere after blast!
        
return HAM_HANDLED
}
                       
public 
event_infect(id)
{
    if(
get_user_class(id)!=Jack)
    {
        
Can_Use_Ability[id-1]=true
    
}
}

public 
round_end()
{
    static 
id
    
new numiPlayers[32]
    
get_players(iPlayersnum)
    if( !
num )
    {
        return;
    }
    for(new 
0numi++)
    {
        
id iPlayers[i]
        if(!
is_user_connected(id))
            continue

        if(
in_frost[i-1]||in_burn[i-1])in_frost[i-1]=false,in_burn[i-1]=false,fm_set_rendering(i)
    }
}

//Standart Forwards
public client_connect(id)Can_Use_Ability[id-1]=false,Selected_Ability[id-1]=0
public client_PreThink(id)
{
        new 
Float:gametime get_gametime()
        if(
in_frost[id-1])
                
                if(
FrostTime[id-1]<gametime||!is_user_alive(id))
                
                if(
FrostTime[id-1]<gametime||!is_user_alive(id)||is_user_zombie(id))
                
                        
fm_set_rendering(id),
                        
in_frost[id-1]=false
                
else
                        {
set_pev(id,pev_velocity,{0.0,0.0,0.0});new Float:Origin[3];pev(id,pev_origin,Origin);Light(Origin,15,0,105,255,4);}
        if(
in_burn[id-1])
                
                if(
BurnTime[id-1]<gametime||!is_user_alive(id))
                
                if(
BurnTime[id-1]<gametime||!is_user_alive(id)||is_user_zombie(id))
                
                        
in_burn[id-1]=false
                
else
                        if(
BurnUpdateDamage[id-1]<gametime)
                        {
                                if(
pev(id,pev_armorvalue)<=0.0&&pev(id,pev_health)<BurnDamage)ExecuteHamB(Ham_TakeDamage,id0,BurnOwner[id-1], BurnDamageDMG_BURN)
                                else 
ExecuteHamB(Ham_TakeDamage,id0,0BurnDamageDMG_BURN)
                               
                                
BurnUpdateDamage[id-1]=gametime+BurnUpdate
                               
                                
new Float:Origin[3]
                                
pev(id,pev_origin,Origin)
                                
engfunc(EngFunc_MessageBeginMSG_BROADCASTSVC_TEMPENTITYOrigin0)
                                
write_byte(TE_SPRITE// TE id
                                
engfunc(EngFunc_WriteCoordOrigin[0]+random_float(-5.05.0)) // x
                                
engfunc(EngFunc_WriteCoordOrigin[1]+random_float(-5.05.0)) // y
                                
engfunc(EngFunc_WriteCoordOrigin[2]+random_float(-10.010.0)) // z
                                
write_short(BurnSprite// sprite
                                
write_byte(random_num(510)) // scale
                                
write_byte(200// brightness
                                
message_end()
                                
Light(Origin,15,255,105,0,7)   
                        }
        if(!
is_user_alive(id))return
        
        if(!
is_user_zombie(id))return
        
        if(
get_user_class(id)!=Jack)return
        
        if(
UpdateHud[id-1]<gametime)
        {
                new 
Text0[100], Text1[56],Text2[56]
                
formatex(Text099"Press [E] (IN_USE) to change ability^nPress [F] (Impulse 100) or [G] (Drop) to use ability^n^n")
                switch(
Selected_Ability[id-1])
                {
                        case 
0:formatex(Text155"Selected Ability: Throw Fire Shpere^n")
                        case 
1:formatex(Text155"Selected Ability: Throw Frost Sphere^n")
                }
                if(!
Can_Use_Ability[id-1])
                {
                        if(
Ability_CD[id-1]-gametime>0.0)formatex(Text255"Recharge Ability: %..1f^n",Ability_CD[id-1]-gametime)
                        else 
formatex(Text255"Recharge Ability: Ready to use^n"),Can_Use_Ability[id-1]=true
                
}
                
set_hudmessage(255,255,255,0.02,0.2,0,0.1,1.0,0.0,0.0,CDHudChannel)
                
show_hudmessage(id,"%s%s%s",Text0,Text1,Text2)
                
UpdateHud[id-1]=gametime+0.1
        
}
        
//Select Ability
        
if((pev(id,pev_button)&IN_USE)&&!(pev(id,pev_oldbuttons)&IN_USE))
        {
                switch(
Selected_Ability[id-1])
                {
                        case 
0:Selected_Ability[id-1]=1
                        
case 1:Selected_Ability[id-1]=0
                
}
        }
        
//Use ability
        
if(Can_Use_Ability[id-1])
        if (
pev(id,pev_impulse)==100)
        {
                switch(
Selected_Ability[id-1])
                {
                        case 
0:throw_Shpere(id,1),Ability_CD[id-1]=gametime+FireShpere_CD,Can_Use_Ability[id-1]=false
                        
case 1:throw_Shpere(id,2),Ability_CD[id-1]=gametime+FrostSphere_CD,Can_Use_Ability[id-1]=false
                
}
               
        }
}
//Public func
public throw_Shpere(id,type)
{
        
emit_sound(idCHAN_VOICEThrowFireShpereSound1.0ATTN_NORM0PITCH_NORM//Play sound
        
set_pdata_float(id830.75//Block attack
        
UTIL_PlayWeaponAnimation(id,5)  //And play Anim
       
        
new Float:StartOrigin[3],Float:EndOrigin[3]
        
get_position(id,30.0,0.0,5.0,StartOrigin)
        
fm_get_aim_origin(id,EndOrigin)
       
        new 
ient engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
        
engfunc(EngFunc_SetModel,ientShpere)
        
engfunc(EngFunc_SetSizeient, {-3.0,-3.0,-3.0}, {3.0,3.0,3.0})
        switch(
type)
        {
                case 
1set_pev(ientpev_classnameFireShpere_Classname),
                        
fm_set_rendering(ientkRenderFxGlowShell255,105,0kRenderTransAlpha,55)
                case 
2set_pev(ientpev_classnameFrostSphere_Classname),
                        
fm_set_rendering(ientkRenderFxGlowShell0,105,255kRenderTransAlpha,55)
        }
        
set_pev(ientpev_movetypeMOVETYPE_FLY)
        
set_pev(ient,pev_solid,SOLID_TRIGGER)
        
set_pev(ient,pev_origin,StartOrigin)
        
set_pev(ient,pev_owner,id)
        
set_pev(ientpev_nextthinkget_gametime() +0.01)             
        
set_pev(ient,pev_iuser1,type)
       
        
//Sphere Trail
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW)
        
write_short(ient)
        
write_short(TrailSpriteIndex)
        
write_byte(15)
        
write_byte(15)
        switch(
type)    //Select colors
        
{
                case 
1:
                {
                        
write_byte(255)
                        
write_byte(105)
                        
write_byte(0)
                }
                case 
2:
                {
                        
write_byte(0)
                        
write_byte(105)
                        
write_byte(255)
                }
        }
        
write_byte(155)
        
message_end()
       
        new 
Float:VECTOR[3],Float:VELOCITY[3]
        
xs_vec_sub(EndOriginStartOriginVECTOR)
        
xs_vec_normalize(VECTORVECTOR)
        
xs_vec_mul_scalar(VECTOR1300.0VELOCITY)     //1300.0 - Sphere speed! (Max 2000.0!!!)
        
set_pev(ientpev_velocityVELOCITY)
}
//Stocks
stock get_position(id,Float:forwFloat:rightFloat:upFloat:vStart[])
{
        new 
Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
        
pev(idpev_v_anglevAngle);pev(idpev_originvOrigin);pev(idpev_view_ofs,vUp)
        
xs_vec_add(vOrigin,vUp,vOrigin)
        
angle_vector(vAngle,ANGLEVECTOR_FORWARD,vForward)
        
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 DrawRings(Float:Origin[3],R,G,B)
{
        for(new 
i=0;i<4;i++)
        {
                
message_beginMSG_BROADCASTSVC_TEMPENTITY );
                
write_byteTE_BEAMTORUS );
                
engfunc(EngFunc_WriteCoordOrigin[0])
                
engfunc(EngFunc_WriteCoordOrigin[1])
                
engfunc(EngFunc_WriteCoordOrigin[2]+3.0*i)
                
engfunc(EngFunc_WriteCoordOrigin[0])
                
engfunc(EngFunc_WriteCoordOrigin[1])
                
engfunc(EngFunc_WriteCoordOrigin[2]+100.0+10.0*i)
                
write_shortTrailSpriteIndex ); // sprite
                
write_byte); // Starting frame
                
write_byte0  ); // framerate * 0.1
                
write_byte8-1*); // life * 0.1
                
write_byte14 ); // width
                
write_byte); // noise
                
write_byte); // color r,g,b
                
write_byte); // color r,g,b
                
write_byteB); // color r,g,b
                
write_byte255 ); // brightness
                
write_byte); // scroll speed
                
message_end();  
        }      
}
stock Light(Float:Origin[3],RAD,R,G,B,Life)
{
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_DLIGHT)
        
engfunc(EngFunc_WriteCoordOrigin[0])
        
engfunc(EngFunc_WriteCoordOrigin[1])
        
engfunc(EngFunc_WriteCoordOrigin[2])
        
write_byte(RAD//Radius
        
write_byte(R)   // r
        
write_byte(G)   // g
        
write_byte(B)   // b
        
write_byte(Life)        //Life
        
write_byte(10)
        
message_end()
}
stock ScreenFade(idTimerFadeTimeColors[3], Alphatype)
{
        if(
id) if(!is_user_connected(id)) return
 
        if (
Timer 0xFFFFTimer 0xFFFF
        
if (FadeTime <= 0FadeTime 4
       
        message_begin
(id MSG_ONE_UNRELIABLE MSG_BROADCAST,Msg_ScreenFade_id);
        
write_short(Timer << 12)
        
write_short(FadeTime << 12)
        switch (
type)
        {
                case 
1write_short(0x0000)             // IN ( FFADE_IN )
                
case 2write_short(0x0001)             // OUT ( FFADE_OUT )
                
case 3write_short(0x0002)             // MODULATE ( FFADE_MODULATE )
                
case 4write_short(0x0004)             // STAYOUT ( FFADE_STAYOUT )
                
default: write_short(0x0001)
        }
        
write_byte(Colors[0])
        
write_byte(Colors[1])
        
write_byte(Colors[2])
        
write_byte(Alpha)
        
message_end()
}
stock ScreenShake(iddurationfrequency)
{      
        
message_begin(id MSG_ONE_UNRELIABLE MSG_ALLMsg_ScreenShake_id id 0);
        
write_short(1<<14)
        
write_short(duration)
        
write_short(frequency)
        
message_end();
}
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()

Attached Files
File Type: zip JackFrost.zip (591.6 KB, 167 views)
Krtola is offline
Send a message via Skype™ to Krtola
Limesays
Junior Member
Join Date: Apr 2010
Old 06-03-2015 , 07:53   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4046

There used to be a list of plugins for Biohazard Zombie Mod, and I can't remember if it was in this thread or another. I searched high and low but nothing that directs me to that list. Does anyone have a list of handy plugins which I can install for my Biohazard Zombie Mod server? Maybe someone knows of the list I speak about. Thanks in Advance.
Limesays is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 06-03-2015 , 10:38   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4047

Quote:
Originally Posted by Limesays View Post
There used to be a list of plugins for Biohazard Zombie Mod, and I can't remember if it was in this thread or another. I searched high and low but nothing that directs me to that list. Does anyone have a list of handy plugins which I can install for my Biohazard Zombie Mod server? Maybe someone knows of the list I speak about. Thanks in Advance.
handy plugins---give me more information please
Krtola is offline
Send a message via Skype™ to Krtola
Limesays
Junior Member
Join Date: Apr 2010
Old 06-03-2015 , 11:10   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4048

Well, that list contained many plugins useful for a Biohazard ZM server. I cannot remember many of them out of the top of my head right now but what I am looking for and what was on that list:

A BOT plugin that actually worked with ZM, zombies would chase you if they are infected
Different types of nades such as frost, napalm etc.
A plugin that lets you respawn when you die as a zombie only

Stuff like this. I did find the frostnades, but the bot plugin for biohazard is the one im looking for the most. Thanks Krtola.
Limesays is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 06-03-2015 , 18:15   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4049

Try there:

https://forums.alliedmods.net/showth...68523&page=365
Krtola is offline
Send a message via Skype™ to Krtola
warprof
Junior Member
Join Date: Jun 2009
Location: Belarus
Old 08-23-2015 , 09:52   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4050

Hi Guys. In this version can classes zombie turn off? Or need download Biohazard 1.95+ ?

Last edited by warprof; 08-23-2015 at 09:53.
warprof 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 18:56.


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