jedijosh920 Posted May 23, 2016 Share Posted May 23, 2016 Does anyone know how these work? Link to comment Share on other sites More sharing options...
mockba.the.borg Posted May 23, 2016 Share Posted May 23, 2016 Yup ... they set (or clear) bits on an integer value ... for example: If you set N = 0 Then set bit 3 of N to 1, N value becomes 8. Because: N = 1000 = 8 Then set bit 1 of N to 1 and N value becomes 10. Because: N = 1010 = 10 Got it? Cheers, Mockba. jedijosh920 1 Link to comment Share on other sites More sharing options...
jedijosh920 Posted May 24, 2016 Author Share Posted May 24, 2016 Thanks for the explanation! Do you know why Rockstar uses these natives, is it to offset something? Because in the decompiled scripts I remember seeing the player ID as a parameter sometimes. And do these do anything? Thanks again. Link to comment Share on other sites More sharing options...
unknown modder Posted May 24, 2016 Share Posted May 24, 2016 Thanks for the explanation! Do you know why Rockstar uses these natives, is it to offset something? Because in the decompiled scripts I remember seeing the player ID as a parameter sometimes. And do these do anything? Thanks again. They use it to store bools in the scripts. without it each bool would take up 4 bytes, now they can fit 32 bools into each 4 byte item jedijosh920 1 Link to comment Share on other sites More sharing options...
mockba.the.borg Posted May 24, 2016 Share Posted May 24, 2016 Hi Jedi, Maybe what you saw was the BIT_SET being used on an array variable to which the PLAYER_ID is the index. Like this example on carmod_shop: GAMEPLAY::SET_BIT(&l_71[PLAYER::PLAYER_ID()/*4*/]._f3, 1); You see, l_71 is a local array of structs, and field 3 seems to be a bitmapped value. May the force be with you, Mockba. jedijosh920 and ToyStorySpringDog 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now