Raised This Month: $ Target: $400
 0% 

[CSS/CSGO] Need help with array sort


Post New Thread Reply   
 
Thread Tools Display Modes
BAILANDO
Senior Member
Join Date: Feb 2015
Location: Slovakia
Old 10-30-2015 , 07:48   Re: [CSS/CSGO] Need help with array sort
Reply With Quote #21

Thanks a lot i will try it when i came home from work. but can i ask last question for now, where i can find description what and why you use 0xFFFF (all bits at 1) and << or >> 16 what this mean in this code? thanks
BAILANDO is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 10-30-2015 , 09:39   Re: [CSS/CSGO] Need help with array sort
Reply With Quote #22

They're left/right shifts! If one person has 10 kills (0xA) and the other has 12 (0xC), and they have client ids 3 and 4, kills << 16 | client would be 0x000A0003 and 0x000C0004, respectively, which makes them sort properly by kills. Then, 0x000A0003 >> 16 gives you the kills, 0xA, and 0x000A0003 & 0xFFFF gives you the client id, 0x3
Miu is offline
BAILANDO
Senior Member
Join Date: Feb 2015
Location: Slovakia
Old 10-30-2015 , 10:04   Re: [CSS/CSGO] Need help with array sort
Reply With Quote #23

ah then it's hexa, thanks, i will try it later this when i go sort some arrays thanks a lot
BAILANDO is offline
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 22:31.


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