yair1221 Posted December 3, 2010 Share Posted December 3, 2010 im missing that opcode in my sacm.ini and opcodes.txt can anyone give it to me? ive tried updating to the latest ini but its still not there... Link to comment Share on other sites More sharing options...
TheSiggi Posted December 3, 2010 Share Posted December 3, 2010 Its missing, because it doesn't exist try this: 0A97: $CarStruct = car $MyCar struct+20 = [byte] Contains a pointer to the rotation/position matrix (84 bytes): * +0 = [float] X-axis Rotation (Grad) * +20 = [float] Y-axis Rotation (Looking) Link to comment Share on other sites More sharing options...
yair1221 Posted December 3, 2010 Author Share Posted December 3, 2010 sorry, i didnt really understand, is that a memory address? if it is, then whats the address? Link to comment Share on other sites More sharing options...
Nahiyan Posted December 3, 2010 Share Posted December 3, 2010 0A97: [email protected] = car [email protected] struct0A8C: write_memory [email protected] size 1 value 360.0 virtual_protect 0 Not sure about that size tho. Link to comment Share on other sites More sharing options...
TheSiggi Posted December 3, 2010 Share Posted December 3, 2010 eh? 0a97 gives you the pointer to the car you passed to the opcode, so you still need to add the 20 +20 = [byte] Contains a pointer to the rotation/position matrix (84 bytes) and then add what you want to it: * +0 = [float] X-axis Rotation (Grad) * +4 = [float] Y-axis Rotation (Grad) * +8 = [float] Z-axis Rotation (Grad) * +16 = [float] X-axis Rotation (Looking) * +20 = [float] Y-axis Rotation (Looking) * +24 = [float] Z-axis Rotation (Looking) * +48 = [float] X-axis Position * +52 = [float] Y-axis Position * +56 = [float] Z-axis Position the only relevant slots which reading out would make sense are +4 = [float] Y-axis Rotation (Grad) and +16 = [float] X-axis Rotation (Looking) so: {$CLEO}0000:const _myAngle = 180.0 // float _size = 1 // byte endwhile true wait 10 if 0256: player $PLAYER_CHAR defined then if and 03EE: player $PLAYER_CHAR controllable 00DF: actor $PLAYER_ACTOR driving then if 0AB0: key_pressed 0x09 //--------------------------------- TAB then 03C0: [email protected] = actor $PLAYER_ACTOR car 0A97: [email protected] = car [email protected] struct [email protected] += 20 // +20 = [byte] Contains a pointer to the rotation/position matrix // read directly or add // [email protected] += 16 //+16 = [float] X-axis Rotation (Looking) 0A8C: write_memory [email protected] size _size value _myAngle virtual_protect 0 Car.RemoveReferences([email protected]) break end end endend0000:0000:0A93: end_custom_thread because i don't have any compiler I can't garantee any results cheers Link to comment Share on other sites More sharing options...
yair1221 Posted December 3, 2010 Author Share Posted December 3, 2010 crashes here is what i did: 03c0: [email protected] $PLAYER_ACTOR08E6: set_plane [email protected] landing_gear 1 //TABif0ab0: 9then0A97: [email protected] = car [email protected] [email protected] += [email protected] += 40A8C: write_memory [email protected] size 1 value 180.0 virtual_protect 0end Link to comment Share on other sites More sharing options...
BnB Posted December 3, 2010 Share Posted December 3, 2010 You have to read memory after [email protected] += 20! Link to comment Share on other sites More sharing options...
yair1221 Posted December 3, 2010 Author Share Posted December 3, 2010 03c0: [email protected] $PLAYER_ACTOR08E6: set_plane [email protected] landing_gear 1 //TABif0ab0: 9then0A97: [email protected] = car [email protected] [email protected] += 200A8D: [email protected] = read_memory [email protected] size 1 virtual_protect [email protected] += 40A8C: write_memory [email protected] size 1 value 180.0 virtual_protect 0end something like that? Link to comment Share on other sites More sharing options...
Adler Posted December 4, 2010 Share Posted December 4, 2010 Floats are 4 bytes; when reading/writing floats you should set the size to 4. Link to comment Share on other sites More sharing options...
yair1221 Posted December 4, 2010 Author Share Posted December 4, 2010 03c0: [email protected] $PLAYER_ACTOR08E6: set_plane [email protected] landing_gear 1 //TABif0ab0: 9then0A97: [email protected] = car [email protected] [email protected] += 200A8D: [email protected] = read_memory [email protected] size 4 virtual_protect [email protected] += 40A8C: write_memory [email protected] size 4 value 180.0 virtual_protect 0end but, this should work? Link to comment Share on other sites More sharing options...
Nahiyan Posted December 4, 2010 Share Posted December 4, 2010 Yeah it will work! Link to comment Share on other sites More sharing options...
yair1221 Posted December 4, 2010 Author Share Posted December 4, 2010 hmmm...it DOES change the angle, but my car gets wild and starts spinning all around... 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