Hello guys,
I'm creating a Knife Skins Shop for my server, and I want to save in only one variable which knifes a user have, and im trying to use the system 1, 2, 4, 8, 16 (if the user buys the first skin and the third, is value will be 5, because 1+4) but im having serious problems, because I think its hardcode to check like this:
PHP Code:
if (szKnife[id] == 1 || szKnife[id] == 3 || szKnife[id] == 7 etc..)
No one knows a equation that will know which knife skins the user have, with the number in his variable?
__________________