Raised This Month: $ Target: $400
 0% 

flags/math help [2, 4, 8, 16, 32, etc]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sgtbane
Member
Join Date: Feb 2006
Old 12-31-2007 , 01:54   flags/math help [2, 4, 8, 16, 32, etc]
Reply With Quote #1

ok, this has been bothering me for a while so im just gonna ask on here. The reason I want this is not exactly directly amxx related, but related to many forms of code.
In AMXX there is the player flags. a-u, and I am assuming they use the values 1,2,4,8,16,32,64,128,256,512,1024,2048, etc...
(If this is not the case then please help me anyways because as I said i have been wondering for a while.)

when you have something like this you can have a variety of different options selected and store it as a single value because no combination of them will ever equal another.

so how do you read it?
if i had the number 69, how do i know that its 64, 4, and 1? There has to be a mathematical formula to figure it out but i can't get it.
again I know that this is not directly connected with AMXX although I am sure it is used in some way or form, and I know when writing I have often wondered how it is done.

If anyone can help thankyou very much. If this is removed since it does not apply to this "Support / Help - Find help for general AMXX issues. This does not include support for individual 3rd party plugins." then thanks anyways..
__________________
[Add|Community]

~SgtBane

Last edited by sgtbane; 01-02-2008 at 17:14.
sgtbane is offline
Send a message via MSN to sgtbane
 



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 11:03.


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