Raised This Month: $ Target: $400
 0% 

Help with set weapon glow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lolz123
Member
Join Date: Aug 2010
Old 04-29-2011 , 15:48   Help with set weapon glow
Reply With Quote #1

hello
i need help with set up weapon glow when player drop the weapon, i try to use this

PHP Code:
public plugin_init() {

RegisterHam(Ham_Spawn"weaponbox""weapon_setcolor"1)
}

public 
weapon_setcolor(ent)
{
    if(!
is_valid_ent(ent))
        return

    new 
szClass[32]

    
entity_get_string(entEV_SZ_classnameszClasscharsmax(szClass))
    
entity_set_int(entEV_INT_rendermodekRenderTransAlpha)
    
entity_set_int(entEV_INT_renderfxkRenderFxGlowShell)
    
entity_set_float(entEV_FL_renderamt255.0)
    
entity_set_vector(entEV_VEC_rendercolorFloat:{255.00.055.0})

thx
Lolz123 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 04-29-2011 , 16:38   Re: Help with set weapon glow
Reply With Quote #2

Try using only fakemeta:
PHP Code:
public plugin_init()
{
    
register_forward(FM_SetModel"fw_SetModel")
}

public 
fw_SetModel(entity, const model[])
{
    static 
classname[32]
        
    if (
strlen(model) < 8)
        return;

    
pev(entitypev_classnameclassnamecharsmax(classname))
        
    if (!
equal(classname"weaponbox"))
       return 
FMRES_IGNORED

    set_pev
(Flag[flagid], pev_renderfxkRenderFxGlowShell)
    
set_pev(Flag[flagid], pev_rendercolorFloat:{255.00.055.0})
    
set_pev(Flag[flagid], pev_rendermodekRenderTransAlpha)
    
set_pev(Flag[flagid], pev_renderamt255.0)

__________________

SonicSonedit is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 04-29-2011 , 17:21   Re: Help with set weapon glow
Reply With Quote #3

Instead of this:
PHP Code:
    entity_set_int(entEV_INT_rendermodekRenderTransAlpha)
    
entity_set_int(entEV_INT_renderfxkRenderFxGlowShell)
    
entity_set_float(entEV_FL_renderamt255.0)
    
entity_set_vector(entEV_VEC_rendercolorFloat:{255.00.055.0}) 
you could use set_rendering()

PHP Code:
set_rendering(entkRenderFxGlowShell255055kRenderTransAlpha255); 
</span></span>
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Lolz123
Member
Join Date: Aug 2010
Old 04-29-2011 , 20:54   Re: Help with set weapon glow
Reply With Quote #4

thx both i used fakemeta and set_rendering and works fine ty
Lolz123 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 04:19.


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