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

Biohazard v2.00 Beta 3b (Zombie Mod)


Post New Thread Reply   
 
Thread Tools Display Modes
Low_radiation
Member
Join Date: Nov 2008
Old 12-21-2008 , 05:31   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2921

Hi, I need help with modify plugin thermal_googles (autor: cheap_suit).
Code:
#include <amxmodx>
#include <engine>
#include <xs>
#include <fakemeta_util>
#include <biohazard>
#include <fun>
#include <bh_classes>


#define FROST_R    0
#define FROST_G    206
#define FROST_B    209

new Float:g_fDelay[33]
new g_ThermalOn[33]
new sprite_playerheat
new cvar_enable
new cvar_maxdistance
new cvar_updatedelay
new trailSpr

static const PLUGIN_NAME[]     = "Thermal Imaging Goggle"
static const PLUGIN_AUTHOR[]     = "Cheap_Suit"
static const PLUGIN_VERSION[]    = "1.0"

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
    register_cvar(PLUGIN_NAME, PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER)
    
    cvar_enable     = register_cvar("amx_tig_enable",     "1")
    cvar_maxdistance = register_cvar("amx_tig_distance",     "1000")
    cvar_updatedelay = register_cvar("amx_tig_updatedelay", "0.2")
    
    register_event("NVGToggle", "Event_NVGToggle", "be")
}

public plugin_precache()
{
    sprite_playerheat = precache_model("sprites/poison.spr")
    ////////////By me Low_radiation
    trailSpr = engfunc(EngFunc_PrecacheModel,"sprites/laserbeam.spr")
}
public Event_NVGToggle(id)
    g_ThermalOn[id] = read_data(1)

public client_PostThink(id)
{
    if(!is_user_alive(id) || !g_ThermalOn[id] || !get_pcvar_num(cvar_enable))
    return PLUGIN_CONTINUE
        
    if((g_fDelay[id] + get_pcvar_float(cvar_updatedelay)) > get_gametime())
        return PLUGIN_CONTINUE
    
    g_fDelay[id] = get_gametime()
    
    new Float:fMyOrigin[3]
    entity_get_vector(id, EV_VEC_origin, fMyOrigin)
    
    static Players[32], iNum
    get_players(Players, iNum, "a")
    
    for(new i = 0; i < iNum; ++i) if(id != Players[i])
    if (!is_user_zombie(Players[i]))
    
    {
        new target = Players[i]
        new Float:fTargetOrigin[3]
        entity_get_vector(target, EV_VEC_origin, fTargetOrigin)
        
        
        if((get_distance_f(fMyOrigin, fTargetOrigin) > get_pcvar_num(cvar_maxdistance)) 
        || !is_in_viewcone(id, fTargetOrigin))
        
            continue

        new Float:fMiddle[3], Float:fHitPoint[3]
        xs_vec_sub(fTargetOrigin, fMyOrigin, fMiddle)
        trace_line(-1, fMyOrigin, fTargetOrigin, fHitPoint)
                                
        new Float:fWallOffset[3], Float:fDistanceToWall
        fDistanceToWall = vector_distance(fMyOrigin, fHitPoint) - 10.0
        normalize(fMiddle, fWallOffset, fDistanceToWall)
        
        new Float:fSpriteOffset[3]
        xs_vec_add(fWallOffset, fMyOrigin, fSpriteOffset)
        new Float:fScale, Float:fDistanceToTarget = vector_distance(fMyOrigin, fTargetOrigin)
        if(fDistanceToWall > 100.0)
            fScale = 8.0 * (fDistanceToWall / fDistanceToTarget)
        else
            fScale = 2.0
        set_beamfollow(target,100,2,FROST_R,FROST_G,FROST_B,10)
        te_sprite(id, fSpriteOffset, sprite_playerheat, floatround(fScale), 125)
    }
    return PLUGIN_CONTINUE
}

stock te_sprite(id, Float:origin[3], sprite, scale, brightness)
{
    message_begin(MSG_ONE, SVC_TEMPENTITY, _, id)
    write_byte(TE_SPRITE)
    write_coord(floatround(origin[0]))
    write_coord(floatround(origin[1]))
    write_coord(floatround(origin[2]))
    write_short(sprite)
    write_byte(scale) 
    write_byte(brightness)
    message_end()
}

stock normalize(Float:fIn[3], Float:fOut[3], Float:fMul)
{
    new Float:fLen = xs_vec_len(fIn)
    xs_vec_copy(fIn, fOut)
    
    fOut[0] /= fLen, fOut[1] /= fLen, fOut[2] /= fLen
    fOut[0] *= fMul, fOut[1] *= fMul, fOut[2] *= fMul
}
////////////By me Low_radiation

// give an entity a trail
public set_beamfollow(target,life,width,r,g,b,brightness)
{
    message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte(22) // TE_BEAMFOLLOW
    write_short(target) // ball
    write_short(trailSpr) // sprite
    write_byte(life) // life
    write_byte(width) // width
    write_byte(r) // r
    write_byte(g) // g
    write_byte(b) // b
    write_byte(brightness) // brightness
    message_end()
    
    
    
    message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte(22) // TE_BEAMFOLLOW
    write_short(target) // ball
    write_short(trailSpr) // sprite
    write_byte(life) // life
    write_byte(width) // width
    write_byte(r) // r
    write_byte(g) // g
    write_byte(b) // b
    write_byte(brightness) // brightness
    message_end()
}
change for zombies: if they see enemy (in front of), create blue trail over enemy BUT the trail is visible also for humans how i can fix it?
__________________
Sorry for my English..
Icq

Last edited by Low_radiation; 12-21-2008 at 05:34.
Low_radiation is offline
Send a message via ICQ to Low_radiation
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 12-21-2008 , 13:41   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2922

Quote:
Hey mando, I see your running bh server. Do you have crashes with it?

my server runs fine i dont have crashes much.
__________________
mando127 is offline
Send a message via Skype™ to mando127
Fawkes37
Senior Member
Join Date: Jul 2008
Old 12-26-2008 , 12:43   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2923

is there a sub-plugin which kind of makes zombies speak? like in Zombie Plague or MD's mod, where they scream or something randomly? would love that1.
Fawkes37 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 12-26-2008 , 12:52   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2924

its just a sound changed that someone hardcoded into. Just edit the biohazard.cfg
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
fearo1
New Member
Join Date: Dec 2008
Old 12-26-2008 , 19:29   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2925

hi,
Is there any possibility to get a light between 'a' and 'b', coz the 'a' is too dark, and 'b' is too bright

Last edited by fearo1; 12-26-2008 at 19:33.
fearo1 is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 12-27-2008 , 00:04   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2926

Quote:
Originally Posted by Fawkes37 View Post
is there a sub-plugin which kind of makes zombies speak? like in Zombie Plague or MD's mod, where they scream or something randomly? would love that1.
U should looking for bio_painsound by marcellus
Find in this thread or If U 're too lazy too find it , I'll upload it .
5c0r-|3i0 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 12-27-2008 , 10:08   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2927

Quote:
Originally Posted by DruGzOG View Post
its just a sound changed that someone hardcoded into. Just edit the biohazard.cfg
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Low_radiation
Member
Join Date: Nov 2008
Old 12-27-2008 , 13:49   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2928

Can somebody do it?
My idea:

In time before infected event .
There are on floor green toxic sprites or some infection specific sprites at somwhere places. When Infect event starts sprites slowly dissapear.
Easy plugin i hope
__________________
Sorry for my English..
Icq
Low_radiation is offline
Send a message via ICQ to Low_radiation
Fawkes37
Senior Member
Join Date: Jul 2008
Old 12-27-2008 , 16:45   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2929

Quote:
Originally Posted by DruGzOG View Post
its just a sound changed that someone hardcoded into. Just edit the biohazard.cfg
?
could u please be more specific? cant quite understand.
Fawkes37 is offline
kolibus
New Member
Join Date: Dec 2008
Old 12-27-2008 , 19:30   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #2930

I Need Help. ( a bug )

when im in game play, and when zombies win, (example) they respawn as zombies! so its hard to know who is zombie and who is not cause some are HUMANS but still look like a zombie?

I Will Gladly want help, Seeya
kolibus 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 14:00.


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