Raised This Month: $ Target: $400
 0% 

Weapons Drop Ability


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 03-15-2010 , 08:21   Re: Weapons Drop Ability
Reply With Quote #1

Nice!.

And..
What this ?:
Code:
SetHamReturnInteger( !! (DEFAULT_CANT_DROP_BITSUM & ( 1<<get_pdata_int(iEnt, m_iId, XTRA_OFS_WEAPON) )) )  
__________________

Kiske is offline
Send a message via Skype™ to Kiske
EXteRmiNaToR
Senior Member
Join Date: Dec 2009
Old 03-15-2010 , 08:43   Re: Weapons Drop Ability
Reply With Quote #2

Very nice!
EXteRmiNaToR is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2010 , 12:10   Re: Weapons Drop Ability
Reply With Quote #3

Quote:
Originally Posted by Kiske View Post
Nice!.

And..
What this ?:
Code:
SetHamReturnInteger( !! (DEFAULT_CANT_DROP_BITSUM & ( 1<<get_pdata_int(iEnt, m_iId, XTRA_OFS_WEAPON) )) )  
a & b returns 0 if no bit is common to both value, or the common bits if there are some.
!!0 is equal to 0
!!ANYVALUEOTHERTHANZERO is equal to 1

Could have cast to bool instead.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kiske
Veteran Member
Join Date: May 2009
Old 03-15-2010 , 17:01   Re: Weapons Drop Ability
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
a & b returns 0 if no bit is common to both value, or the common bits if there are some.
!!0 is equal to 0
!!ANYVALUEOTHERTHANZERO is equal to 1

Could have cast to bool instead.
Thanks!
__________________

Kiske is offline
Send a message via Skype™ to Kiske
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 19:47.


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