Raised This Month: $ Target: $400
 0% 

Biohazard smokeflare


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 02-20-2009 , 09:16   Biohazard smokeflare
Reply With Quote #1

Hi,

im searching for a plugin that has biohazard smokeflare effect. i tried to edit the original smoke flare but its not functionaly. could anyone make it? i dont wanna anything els only the smoke effect

Here that what i tried :
PHP Code:
#include <amxmodx>
#include <fakemeta>



#define pev_flare pev_iuser4
#define flare_id 1337


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

new cvar_smokeflarecvar_smokeflare_dur
public plugin_init()
{
    
register_plugin("smoke flare""0.1""mini_midget/cheap_suit")

}

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(entpev_classnameclassname31)
    if(
equal(classname"grenade") && get_pcvar_num(cvar_smokeflare))
    {
        
engfunc(EngFunc_SetModelentg_flare_model)
        
set_pev(entpev_effectsEF_BRIGHTLIGHT)
        
set_pev(entpev_flare,   flare_id)
        
set_pev(entpev_nextthinkget_gametime() + get_pcvar_float(cvar_smokeflare_dur))
        
fm_set_rendering(entkRenderFxGlowShell150150250kRenderNormal16)
        
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}



stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16
{
    static 
Float:color[3]; color[2] = float(b), color[0] = float(r), color[1] = float(g)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermode,  render)
    
set_pev(entitypev_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
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 02-20-2009 , 11:20   Re: Biohazard smokeflare
Reply With Quote #2

Search....................................... ..........................
http://forums.alliedmods.net/showthr...ighlight=flare
xbatista is offline
Send a message via Skype™ to xbatista
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 02-20-2009 , 11:36   Re: Biohazard smokeflare
Reply With Quote #3

Quote:
Originally Posted by xbatista View Post
Search....................................... ..........................
http://forums.alliedmods.net/showthr...ighlight=flare
1. Ty.
2. I searched just for smoke :-D sry
3. they have to approve this
__________________
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
bombey
Member
Join Date: Jul 2006
Old 02-26-2009 , 20:49   Re: Biohazard smokeflare
Reply With Quote #4

How do I change the colour of the lighting?

Code:
        
fm_set_rendering(ent, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16)
With this I can change the colour of the glowing of the flare.

But I wanna know how to change the colour of the lighting around the flare.
__________________
I'm the creator of:
-zm_lila_panic_cs
, zm_office


bombey is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 02-27-2009 , 03:26   Re: Biohazard smokeflare
Reply With Quote #5

Sorry, xbatista is right

Change this
PHP Code:
  write_byte(25// radius
  
write_byte(255// Red
  
write_byte(0// Green
  
write_byte(0)  // Blue
  
write_byte(3)  // life
  
write_byte(0// decay rate
  
message_end()
  
set_task(0.1,"preThink",ent); 
Colors:
Quote:
225, 0, 0 = RED
0, 0, 225 = BLUE
0, 225, 0 = GREEN

225, 225, 225 = WHITE
There are also other colors:
http://en.wikipedia.org/wiki/List_of_colors
__________________

Last edited by crazyeffect; 02-27-2009 at 03:30.
crazyeffect is offline
Send a message via MSN to crazyeffect
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 02-27-2009 , 03:27   Re: Biohazard smokeflare
Reply With Quote #6

He means LIGHT around flare.
Here it is, if I bad coded correct me.
Attached Files
File Type: sma Get Plugin or Get Source (bio_smokeflare.sma - 955 views - 2.6 KB)

Last edited by xbatista; 02-27-2009 at 04:35.
xbatista is offline
Send a message via Skype™ to xbatista
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-27-2009 , 04:04   Re: Biohazard smokeflare
Reply With Quote #7

prethink?! useless cpu usage, check out how it done in zombie plague.
__________________
xPaw is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 02-27-2009 , 04:35   Re: Biohazard smokeflare
Reply With Quote #8

OK, prethink not used now.Code upd.
xbatista is offline
Send a message via Skype™ to xbatista
bombey
Member
Join Date: Jul 2006
Old 02-27-2009 , 21:40   Re: Biohazard smokeflare
Reply With Quote #9

Thank you very much xbatista! It works.
__________________
I'm the creator of:
-zm_lila_panic_cs
, zm_office


bombey 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 09:28.


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