Raised This Month: $ Target: $400
 0% 

1, 2, 4, 8, 16... system


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 04-28-2016 , 15:31   1, 2, 4, 8, 16... system
Reply With Quote #1

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] == || szKnife[id] == || szKnife[id] == 7 etc..) 
No one knows a equation that will know which knife skins the user have, with the number in his variable?
__________________
skz is offline
 



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 18:42.


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