Raised This Month: $ Target: $400
 0% 

Biohazard v2.00 Beta 3b (Zombie Mod)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-29-2008 , 09:33   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #11

hey , i had try to change the colors of smokes in Biohazard v2.00 Beta 3b, but ill become a error on compiler :

home/groups/amxmodx/tmp3/textduEII8.sma(6) : fatal error 110: assertion failed: Biohazard functions file required!

there is the code,i hope anyone can help me :



Code:
#include <amxmodx>
#include <fakemeta>
#tryinclude <biohazard>

#if !defined _biohazard_included
        #assert Biohazard functions file required!
#endif

#define pev_flare pev_iuser4
#define flare_id 1337
#define is_ent_flare(%1) (pev(%1, pev_flare) == flare_id) ? 1 : 0

new const g_flare_model[] = "models/w_flare.mdl"

new cvar_smokeflare, cvar_smokeflare_dur
public plugin_init()
{
    register_plugin("smoke flare", "0.1", "mini_midget/cheap_suit")
    is_biomod_active() ? plugin_init2() : pause("ad")
}

public plugin_precache() 
    precache_model(g_flare_model)

public plugin_init2()
{
    register_forward(FM_SetModel, "fwd_setmodel")    
    register_forward(FM_Think, "fwd_think")
    cvar_smokeflare = register_cvar("bh_flare_enable",   "1")
    cvar_smokeflare_dur = register_cvar("bh_flare_duration", "999.9")
}

public fwd_setmodel(ent, const model[]) 
{
    if(!pev_valid(ent) || !equal(model[9], "smokegrenade.mdl"))
        return FMRES_IGNORED
    
    static classname[32]; pev(ent, pev_classname, classname, 31)
    if(equal(classname, "grenade") && get_pcvar_num(cvar_smokeflare))
    {
        engfunc(EngFunc_SetModel, ent, g_flare_model)
        set_pev(ent, pev_effects, EF_BRIGHTLIGHT)
        set_pev(ent, pev_flare,   flare_id)
        set_pev(ent, pev_nextthink, get_gametime() + get_pcvar_float(cvar_smokeflare_dur))
        fm_set_rendering(ent, kRenderFxGlowShell, 150, 150, 250, kRenderNormal, 16)
        
        return FMRES_SUPERCEDE
    }
    return FMRES_IGNORED
}

public fwd_think(ent) if(pev_valid(ent) && is_ent_flare(ent))
    engfunc(EngFunc_RemoveEntity, ent)

stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) 
{
    static Float:color[3]; color[2] = float(b), color[0] = float(r), color[1] = float(g)
    
    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))

    return 1
}
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 20:56.


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