Raised This Month: $ Target: $400
 0% 

Doesn't take damage from the front


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 05-22-2009 , 01:44   Re: Doesn't take damage from the front
Reply With Quote #4

Quote:
Originally Posted by ot_207 View Post
That is not a good example.

Here is how I would do it. (NOT TESTED! It may be needed to add more lines)
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
 
public plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""fw_takedamage")
}
 
public 
fw_takedamage(victiminfilctorattackerFloat:damagebits)
{
    static 
Float:origin[3]
    
entity_get_vector(infilctorEV_VEC_originorigin)
    if (
is_in_viewcone(victimorigin1))
    {
        
// HIT FROM FRONT
        
return HAM_SUPERCEDE
    
}
 
    return 
HAM_IGNORED


Thanks so much

If it can ignored the knockback it will be cool.

Problem 1 : Could you set it will take damage from any other Grenade.
__________________

Last edited by ƒa†es™; 05-22-2009 at 01:54.
ƒa†es™ 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 01:32.


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