|
Author
|
Message
|
|
Member
|

12-31-2007
, 01:54
flags/math help [2, 4, 8, 16, 32, etc]
|
#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..
__________________
Last edited by sgtbane; 01-02-2008 at 17:14.
|
|
|
|