Raised This Month: $ Target: $400
 0% 

Function to check wall kill?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CHE4TER
Member
Join Date: Jul 2013
Location: Portugal
Old 10-31-2015 , 06:20   Function to check wall kill?
Reply With Quote #1

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

public plugin_init()
{
    
RegisterHam(Ham_TraceAttack"player""CBasePlayer_TraceAttack")
}

public 
CBasePlayer_TraceAttack(iVictimiAttackerFloat:flDamageFloat:vDirection], ptrBits 
{
    if( 
iAttacker && get_user_weaponiAttacker ) != CSW_KNIFE 
    {
        static 
Float:vStart], Float:vEnd], Float:flFraction;

        
get_tr2ptrTR_vecEndPosvEnd ); 
        
get_tr2ptrTR_flFractionflFraction ); 

        
xs_vec_mul_scalarvDirection, -1.0vDirection ); 
        
xs_vec_mul_scalarvDirectionflFraction 9999.0vStart ); 
        
xs_vec_addvStartvEndvStart ); 

        new 
iTarget trace_lineiVictimvEndvStartvEnd ); 

        if( !
iTarget )
        {
        
// attacker is hitting victim
        
}
        

        
// Check if attacker killed victim?
    
}


Last edited by CHE4TER; 02-28-2016 at 23:04.
CHE4TER 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 18:04.


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