gokuta Posted July 23, 2020 Share Posted July 23, 2020 (edited) This opcode 0750: set_object [email protected] visibility true need an opcode for checking whether object is visible. Something like this 7FFF: get_object [email protected] visibility Anybody knowns memory address I can check? Thanks Edited July 23, 2020 by gokuta Link to comment Share on other sites More sharing options...
Jack Posted July 24, 2020 Share Posted July 24, 2020 If we assume that the object handle is stored in [email protected] then: 0A98: [email protected] = object [email protected] struct [email protected] += 0x1C // entityFlags 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 if [email protected] == 5 then // object is invisible else // object is visible ([email protected] <> 5 ---> [email protected] == 0x85) end Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Wesser Posted July 24, 2020 Share Posted July 24, 2020 You shall never compare flags against a constant without a bitwise-AND test. Use IS_LOCAL_VAR_BIT_SET_CONST (2231) command and pass the 0-based index of the 8th bit. Jack 1 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
gokuta Posted July 24, 2020 Author Share Posted July 24, 2020 (edited) This is what I was thinking about... since the change in other bits will result in different integral value. And yet the bit of interest does not change in any way Edited July 24, 2020 by gokuta Link to comment Share on other sites More sharing options...
Jack Posted July 24, 2020 Share Posted July 24, 2020 1 hour ago, Wesser said: You shall never compare flags against a constant without a bitwise-AND test. Use IS_LOCAL_VAR_BIT_SET_CONST (2231) command and pass the 0-based index of the 8th bit. Does the bit 0 count as well? Like this: 0A98: [email protected] = object [email protected] struct [email protected] += 0x1C // entityFlags 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 if 08B7: test [email protected] bit 7 then end ??? Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
gokuta Posted July 24, 2020 Author Share Posted July 24, 2020 Well, he said "zero based index", which makes zero count I believe. So.. which bit should I test which one Link to comment Share on other sites More sharing options...
gokuta Posted July 25, 2020 Author Share Posted July 25, 2020 alright, me lil' testin' shows the last bit is what matters 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