Raised This Month: $ Target: $400
 0% 

fwAddToFullPack


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 02-09-2017 , 17:12   fwAddToFullPack
Reply With Quote #1

I want to set glow of ENT if is player turret (only for owner)

PHP Code:
public IsEntityPlayerTurret(iEntiPlayer)
    return 
entity_get_edict(iEntEV_ENT_turret_owner) == iPlayer && entity_get_int(iEntEV_INT_turret_level)

public 
fwAddToFullPack(es_handleeENTHOSThostflagsplayerset) {
    if(
player || !is_user_connected(HOST) || !is_valid_ent(ENT))
        return 
FMRES_IGNORED

    
/* If ranger owner is other than player -> hide him */
    
if(IsEntityRanger(ENT) && entity_get_int(ENTEV_INT_ranger_owner) != HOST
        return 
FMRES_OVERRIDE;
    
    if(
IsEntityPlayerTurret(ENTHOST))
    {
        
set_es(es_handleES_RenderModekRenderNormal)
        
set_es(es_handleES_RenderAmt13)
        
set_es(es_handleES_RenderColor25500)
        
set_es(es_handleES_RenderFxkRenderFxGlowShell)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

I tested all f....g options with ES_, with return TYPE. Checking IsEntityPlayer turret work well - (I do not want to checking all times classname, I think checking integers is Faster

What Am I doing wrong?

I tested too with
PHP Code:
set_es(es_handleES_RenderColor, {25500}) 
and others order

//edit
I tested too without if(player || ...) return....

Last edited by grs4; 02-09-2017 at 17:33.
grs4 is offline
 



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:42.


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