Raised This Month: $ Target: $400
 0% 

Solved EngFunc_TraceTexture result is only NoTexture


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AimniX
New Member
Join Date: May 2020
Old 05-04-2020 , 18:39   EngFunc_TraceTexture result is only NoTexture
Reply With Quote #1

Hy, i try to make a AntiWallbang plugin.
So far it works but it should be possible to shot thrue wooden textures.
EngFunc_TraceTexture gives me only "NoTexture".
what do i wrong?

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>




new const Version[] = "1.0";

#define MAX_PLAYERS 32
#define IsPlayer(%1)    ( 1 <= %1 <= MAX_PLAYERS )

public plugin_init()
{
    
register_plugin"Anti_Wallbang" Version "AimniX" );
    
    
RegisterHamHam_TraceAttack "player" "Player_TraceAttack" );

}

public 
Player_TraceAttackiEnt iAttacker Float:flDamage Float:fDir] , ptr iDamageType )
{
    if( 
IsPlayeriAttacker ) )
    {
        if ( 
iDamageType DMG_BULLET )
        {
            new 
Float:fEnd];
            
get_tr2ptr TR_vecEndPos fEnd);
            
            if(
bool:!ExecuteHamHam_FVecVisible iAttacker fEnd )!= false)
        {
            new 
startOrigin[3
            
get_user_origin(iAttackerstartOrigin 1);
            
            new 
endOrigin[3]
            
get_user_origin(iAttackerendOrigin 4);

            
            new 
texture_name[64],texture_type
            engfunc
(EngFunc_TraceTexture0startOrigin endOrigintexture_namecharsmax(texture_name))
            
texture_type dllfunc(DLLFunc_PM_FindTextureTypetexture_name)

            
client_print0print_chat"This is the Texture: %s",texture_type)


    
            
            
            return 
HAM_SUPERCEDE
        
}
        }
        else
        {
            return 
HAM_IGNORED
        
}
    }
    return 
HAM_IGNORED


Last edited by AimniX; 05-07-2020 at 20:35. Reason: Solved
AimniX is offline
 


Thread Tools
Display Modes

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 16:52.


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