Raised This Month: $ Target: $400
 0% 

TakeDamage & trigger_hurt problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ILUSION
Senior Member
Join Date: Oct 2006
Location: Argentina
Old 04-06-2009 , 15:39   TakeDamage & trigger_hurt problem
Reply With Quote #1

Hi I have this code:

PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if (!
get_pcvar_num(cvar_godmode))
        return 
HAM_IGNORED
    
    
if (g_godmode[attacker])
    {
        
set_user_hitzones(0attacker255)
        
g_godmode[attacker] = false
    
}
    
    return 
HAM_IGNORED

In the map surf_ninja when I fall, the trigger_hurt fails (not ever). If I disable the function "TakeDamage" now the trigger_hurt works fine. What is wrong?

Some pics...

[IMG]http://img12.**************/img12/5193/surfninja0000.th.jpg[/IMG]
[IMG]http://img19.**************/img19/82/surfninja0001.th.jpg[/IMG]
[IMG]http://img12.**************/img12/2923/surfninja0002.th.jpg[/IMG]

Thanks
__________________
ILUSION is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 04-06-2009 , 15:48   Re: TakeDamage & trigger_hurt problem
Reply With Quote #2

You can try to check if there's a touch between the player and the trigger_hurt, and then kill the player, else, set him godmode, or check the dmg_bits (if dmg_fall then kill them?)

P.S. You should try to make another method to make a surf godmode, I'll try to do one =)
__________________

Last edited by IneedHelp; 04-06-2009 at 15:51.
IneedHelp is offline
ILUSION
Senior Member
Join Date: Oct 2006
Location: Argentina
Old 04-06-2009 , 16:13   Re: TakeDamage & trigger_hurt problem
Reply With Quote #3

Quote:
Originally Posted by IneedHelp
You can try to check if there's a touch between the player and the trigger_hurt, and then kill the player, else, set him godmode, or check the dmg_bits (if dmg_fall then kill them?)
How?

This method is effective, but I have that bug -_-

If I set the pcvar cvar_godmode to 0 the trigger_hurt works fine.
__________________
ILUSION is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-06-2009 , 16:22   Re: TakeDamage & trigger_hurt problem
Reply With Quote #4

What you exactly want to do ?
Prevent players to shoot other players and let every other damage ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ILUSION
Senior Member
Join Date: Oct 2006
Location: Argentina
Old 04-06-2009 , 16:30   Re: TakeDamage & trigger_hurt problem
Reply With Quote #5

If a player have godmode and attack other player, remove the godmode of the player.

Quote:
Originally Posted by ConnorMcLeod
What you exactly want to do ?
Prevent players to shoot other players and let every other damage ?
Yes, but first need write "/godmode" in the chat.
__________________
ILUSION is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-06-2009 , 16:32   Re: TakeDamage & trigger_hurt problem
Reply With Quote #6

You don't get it, question is which damage do you want to block and which one do you want to allow ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ILUSION
Senior Member
Join Date: Oct 2006
Location: Argentina
Old 04-06-2009 , 16:36   Re: TakeDamage & trigger_hurt problem
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
You don't get it, question is which damage do you want to block and which one do you want to allow ?
Yes. Sorry if you don't understand me.
__________________

Last edited by ILUSION; 04-06-2009 at 16:39.
ILUSION is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 04-06-2009 , 17:16   Re: TakeDamage & trigger_hurt problem
Reply With Quote #8

lmao ILUSION you need to tell what you wanna do
__________________
Dr.G is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-06-2009 , 17:17   Re: TakeDamage & trigger_hurt problem
Reply With Quote #9

What kind of damage(hurt) do you want to block?
BOYSplayCS is offline
ILUSION
Senior Member
Join Date: Oct 2006
Location: Argentina
Old 04-06-2009 , 17:21   Re: TakeDamage & trigger_hurt problem
Reply With Quote #10

I want to block shots, knife damage and nade damage.
ILUSION is offline
Reply



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 02:27.


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