Raised This Month: $ Target: $400
 0% 

Doesn't take damage from the front


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 05-21-2009 , 13:47   Re: Doesn't take damage from the front
Reply With Quote #3

Quote:
Originally Posted by el.nino View Post
http://forums.alliedmods.net/showthr...ight=back+shot
This can help you. Don't forget you are in scripting help and not in suggest or request section
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

__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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