Thread: GetPlayers()
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-25-2016 , 15:21   Re: GetPlayers()
Reply With Quote #18

Quote:
Originally Posted by PRoSToTeM@ View Post
You can just use 1 << Players[i] because (1 << 32) works as (1 << 0).
The bit will fall off of the end. You cannot use the logic 'if BitSum == 0 then slot 32 is connected'.

Also (assuming a 32 bit):
1 << 32 = 0
1 << 0 = 1

Blue are valid bits within a cell (32). 1 << 32 goes to the 33rd bit, which doesn't exist in a 32-bit cell.
[0000 0001] [0000 0000] [0000 0000] [0000 0000] [0000 0000]
__________________
Bugsy is offline