Thread
:
Save Entity Index with BitSum
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
07-26-2022 , 19:52 Re: Save Entity Index with BitSum
#
6
Ok, I'll try to give you a quick visual
Lets use a 3-cell array
Cell 1 - 4 bytes/32 bits - 32 bits total
A single cell is perfect for player booleans since player ID's range from 1 to 32.
[ 0000 0000 ][ 0000 0000 ][ 0000 0000 ][ 0000 0000 ]
Cell 2 - 4 bytes/32 bits - 64 bits total
[ 0000 0000 ][ 0000 0000 ][ 0000 0000 ][ 0000 0000 ]
Cell 3 - 4 bytes/32 bits - 96 bits total
[ 0000 0000 ][ 0000 0000 ][ 0000 0000 ][ 0000 0000 ]
When you want to set bits beyond 32, you need to use an array, cell 2 holds bits 33 to 64, cell 3 holds 65-96, etc. Those macros do the work for you to set the appropriate bit.
__________________
Plugins
|
CSStats Editor
|
nVault Editor
Last edited by Bugsy; 07-26-2022 at
19:53
.
Bugsy
View Public Profile
Send a private message to Bugsy
Find More Posts by Bugsy