Raised This Month: $ Target: $400
 0% 

How to block suicide?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 10-29-2011 , 16:25   How to block suicide?
Reply With Quote #1

How can I block suicide? There are few death/dmg forwards from few modules (Ham, engine etc...) and I don't know which one should I choose, and I want to block only suicide. (SUICIDE DOES NOT MEANS TYPING 'KILL', but Jumping down from a roof or something and then dying)
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-29-2011 , 16:52   Re: How to block suicide?
Reply With Quote #2

Hook Ham_TakeDamage, check damage bits if contains DMG_FALL and supercede.
__________________
Arkshine is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 10-29-2011 , 17:26   Re: How to block suicide?
Reply With Quote #3

if (damage_bits_variable == DMG_FALL)?
thats how i check it?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-29-2011 , 17:27   Re: How to block suicide?
Reply With Quote #4

if (damage_bits_variable & DMG_FALL)
__________________
Arkshine is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 10-29-2011 , 17:52   Re: How to block suicide?
Reply With Quote #5

what does & means? (I know that && is AND but whats &?)
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-29-2011 , 17:55   Re: How to block suicide?
Reply With Quote #6

You better search in the tutorial section, already explained a lot of times.
__________________
Arkshine is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-29-2011 , 19:13   Re: How to block suicide?
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?t=139916

http://en.m.wikipedia.org/wiki/Bitwise_operation
__________________
Bugsy 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 14:16.


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