Raised This Month: $ Target: $400
 0% 

Set C4 Glow (when is dropped)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 05-09-2010 , 08:13   Set C4 Glow (when is dropped)
Reply With Quote #1

Title ?

My code:
PHP Code:
#include < amxmodx >
#include < fakemeta >

#define fm_find_ent_by_class(%1,%2) engfunc( EngFunc_FindEntityByString, %1, "classname", %2 )

#define _red    255
#define _green    255
#define _blue    255
#define _alpha    25

public plugin_init()
{
    
register_forwardFM_SetModel"fw_model")
}

public 
fw_modelent )
{
    if( !
pev_valident) )
        return 
FMRES_IGNORED
    
    
while( ( ent fm_find_ent_by_classent"weapon_c4" ) ) > )
        
fm_set_renderingentkRenderFxGlowShell_red_green_blue__alpha )

    return 
FMRES_IGNORED
}

fm_set_renderingentfx kRenderFxNonergbmode=kRenderNormalamount 16 )
{
    static 
Float:RenderColor
    
RenderColor] = float)
    
RenderColor] = float)
    
RenderColor] = float)
    
    
set_peventpev_renderfxfx )
    
set_peventpev_rendercolorRenderColor )
    
set_peventpev_rendermodemode )
    
set_peventpev_renderamtfloatamount ) )

doesn't work!
dFF is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 05-09-2010 , 08:39   Re: Set C4 Glow (when is dropped)
Reply With Quote #2

PHP Code:
public fw_modelent )
{
    if( !
pev_valident) )
        return 
FMRES_IGNORED
    
new class[24]
  
pev(entpev_classname, class, sizeof class - 1)
  if(
equal(class, "w_c4")){
        
fm_set_renderingentkRenderFxGlowShell_red_green_blue__alpha )
  }
    return 
FMRES_IGNORED

hzqst is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-09-2010 , 10:06   Re: Set C4 Glow (when is dropped)
Reply With Quote #3

PHP Code:
public fw_modelentModel[] )
{
    if( !
pev_valident) )
        return 
FMRES_IGNORED
 
    
if (equal(Model"models/w_c4.mdl"))
        
fm_set_renderingentkRenderFxGlowShell_red_green_blue__alpha )
 
    return 
FMRES_IGNORED

__________________
hleV is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 05-09-2010 , 11:08   Re: Set C4 Glow (when is dropped)
Reply With Quote #4

Doesn't work.
dFF is offline
Amonel
Senior Member
Join Date: May 2009
Old 05-09-2010 , 15:07   Re: Set C4 Glow (when is dropped)
Reply With Quote #5

Code:
#define _red    255
#define _green    255
#define _blue    255
Amonel is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 05-09-2010 , 16:36   Re: Set C4 Glow (when is dropped)
Reply With Quote #6

dropped c4 is backpack thingame

EDIT: "models/w_backpack.mdl"
__________________
minimiller is offline
Send a message via MSN to minimiller
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 05-09-2010 , 16:39   Re: Set C4 Glow (when is dropped)
Reply With Quote #7

i think he means planted c4 ,not dropped..
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-09-2010 , 18:22   Re: Set C4 Glow (when is dropped)
Reply With Quote #8

Quote:
Originally Posted by FlyingHorse View Post
i think he means planted c4 ,not dropped..
Read the topic title -_-
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 05-10-2010 , 09:39   Re: Set C4 Glow (when is dropped)
Reply With Quote #9

How do i change the glow of this code to teamcolor? So it's easier to see which guns belongs to who.. Cause this is useful for guntoss in last request plugin
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-10-2010 , 09:43   Re: Set C4 Glow (when is dropped)
Reply With Quote #10

Try this

Code:
#include < amxmodx > #include < engine > enum _:GlowTypes {     Glow_Dropped,     Glow_Planted }; new g_pCvar; public plugin_init( ) {     register_plugin( "Bomb Glow", "1.0", "xPaw" );         g_pCvar = register_cvar( "bomb_glow", "3" ); // 0 - Dropped | 1 - Planted | 2 - Both         if( !find_ent_by_class( FM_NULLENT, "func_bomb_target" )     &&  !find_ent_by_class( FM_NULLENT, "info_bomb_target" ) )         pause( "a" );         register_logevent( "BombDropped", 3, "2=Dropped_The_Bomb" );     register_logevent( "BombPlanted", 3, "2=Planted_The_Bomb" ); } public BombDropped( )     if( IsEnabled( Glow_Dropped ) )         SetBombRender( find_ent_by_model( FM_NULLENT, "weaponbox", "models/w_backpack.mdl" ) ); public BombPlanted( )     if( IsEnabled( Glow_Planted ) )         SetBombRender( find_ent_by_model( FM_NULLENT, "grenade", "models/w_c4.mdl" ); SetBombRender( const iEntity ) {     if( !is_valid_ent( iEntity ) )         return;         // Your render code } bool:IsEnabled( const iType ) {     new iCvar = get_pcvar_num( g_pCvar );         return bool:( iCvar & iType ); }
__________________
xPaw 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 03:44.


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