help with bit
Hello, i cant find info about ->
Code:
#define get_bit(%2,%1) (%1 & (1<<(%2&31)))Code:
public csgo_reset_data() |
Re: help with bit
Without getting into too much detail on how it works, you can compare the int "loaded" to a boolean array of size 32. So say you want to check if a player is connected, you can do it like this, note that the bool method is in comments
Code:
new Connected //new bool:Connected[33] |
Re: help with bit
Bugsy has some good explanation on that https://forums.alliedmods.net/showthread.php?t=139916
rem_bit is unseting whatever value is stored on the "loaded" variable out of the "i" variable, which doesn't make much sense, as far as I'm concerned it should be the inverse, ram_bit(loaded, i). |
Re: help with bit
These macros are designed to store booleans/bit-flags for each player, allowing you to pass their player ID and the bit-field variable. It's pretty straightforward.
Suppose you wanted to record each player that was slayed, clearing the flag if they are revived. PHP Code:
Please ask a more specific question if you need help, but the above posts should help you understand what each macro does. |
Re: help with bit
THANKS YOU GUYS, a little bit clear now ;)
|
| All times are GMT -4. The time now is 21:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.