AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block suicide? (https://forums.alliedmods.net/showthread.php?t=170855)

Diegorkable 10-29-2011 16:25

How to block suicide?
 
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)

Arkshine 10-29-2011 16:52

Re: How to block suicide?
 
Hook Ham_TakeDamage, check damage bits if contains DMG_FALL and supercede.

Diegorkable 10-29-2011 17:26

Re: How to block suicide?
 
if (damage_bits_variable == DMG_FALL)?
thats how i check it?

Arkshine 10-29-2011 17:27

Re: How to block suicide?
 
if (damage_bits_variable & DMG_FALL)

Diegorkable 10-29-2011 17:52

Re: How to block suicide?
 
what does & means? (I know that && is AND but whats &?)

Arkshine 10-29-2011 17:55

Re: How to block suicide?
 
You better search in the tutorial section, already explained a lot of times.

Bugsy 10-29-2011 19:13

Re: How to block suicide?
 
http://forums.alliedmods.net/showthread.php?t=139916

http://en.m.wikipedia.org/wiki/Bitwise_operation


All times are GMT -4. The time now is 14:16.

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