Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
He has the option to use it or not...what if he didnt use it?and also i cant make unlimited slots,because as i have said for example he can have unlimited amount of objects.
Posts: 1,206
Threads: 39
Joined: Feb 2014
Reputation:
0
You can't extract an objectid from a single bit unless the id is 0 or 1.
Posts: 694
Threads: 2
Joined: Oct 2012
Reputation:
0
Thats not the way binary works, basically if you are using binary 3 means both 1 and 2, you need an array for the way you do it.
You can do it binary way too, but you'd need to know what the max objectid is, and split them into groups of 32, saving over an array of objectid/32, but thats one hell lot of a hassle.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
Can you give me an example of how to do it?
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
I have read it and i still need an example....you didnt reply with a clear answer,can you tell me if it's possible to get a specific bit from a binary like i said?if yes how?and if not then what can i do?i mean something that is like it.
Posts: 1,208
Threads: 36
Joined: Apr 2015
To modify bits, use:
PHP код:
GetValueBit(value,bit);
SetValueBit(&value,bit,power);
https://sampforum.blast.hk/showthread.php?tid=591223