19.12.2013, 21:33
There is no BitFlag_Set but BitFlag_On and BitFlag_Off. And I set it to on/off then used BitFlag_Get but it only returns 0.
Test this code:
It not only returns 0 but the line with prefix '_B_' returns 2. And another returns 4(can buy property).
EDIT: OMFG I'm such a noob just realised I can check if it is set or not so don't have to check it's value...
Nice tut btw.
Test this code:
Code:
g_PlayerFlags[0] = PlayerFlags:0; BitFlag_On(g_PlayerFlags[0], PLAYER_IS_LOGGED_IN); printf("___ %i", BitFlag_Get(g_PlayerFlags[0], PLAYER_IS_LOGGED_IN)); BitFlag_Off(g_PlayerFlags[0], PLAYER_IS_LOGGED_IN); printf("__ %i", BitFlag_Get(g_PlayerFlags[0], PLAYER_IS_LOGGED_IN)); printf("_S_%i", BitFlag_Get(g_PlayerFlags[0], PLAYER_HAS_GANG)); BitFlag_On(g_PlayerFlags[0], PLAYER_HAS_GANG); printf("_B_%i", BitFlag_Get(g_PlayerFlags[0], PLAYER_HAS_GANG)); BitFlag_Off(g_PlayerFlags[0], PLAYER_HAS_GANG); printf("_C_%i", BitFlag_Get(g_PlayerFlags[0], PLAYER_HAS_GANG)); }
EDIT: OMFG I'm such a noob just realised I can check if it is set or not so don't have to check it's value...
Nice tut btw.