Hey guys sorry for my basic question but I'm really struggling as I found many many many stuffs online base codes functions etc I tried all and it was not what I wanted at all ! so I decided to ask help from an expert which respectfully is a lot of you guys here anyway lets get back to the problem
Task I want to achieve : Using memory manipulating I want to lock players camera at X Y Z point in world
Steps Iv done :
So until now I can get players current position using these memories which I add to gta_sa.exe
PLAYER_BASE_ADDRESS = 0xB6F5F0 # Base address for player data
XYZ_OFFSET = 0x14 # Offset to XYZ position structure
POSITION_X_OFFSET = 0x30 # Offset to X position
POSITION_Y_OFFSET = 0x34 # Offset to Y position
POSITION_Z_OFFSET = 0x38 # Offset to Z position
for example that will give something like that
Player Position: X = 686.7557983398438, Y = 888.8825073242188, Z = -39.41261672973633
In Cleo iv tested code snipped I got from this post
Screen Camera Look at Position(Multi-Purpose)- GET CAMERA FACING ANGLES
And This post
Need auto walk to ten cordinates
and I made a cleo which will accept /look x y z command and point the camera to that location using Sampfuncs that also works perfectly fine which ill share the code if you want
Thanks to @Parazitas
but the problem is with camera which I'm trying to manipulate the looking angle to the point I want in python (I'm not asking python code help)
no matter what code base address I tried CCamera or what ever I found like 10 in this forum and total net but its not what I want ! i mean some not even working for setting player camera
so may question is ! can any one guide me so how can I simply point and lock player camera look at a point using that point x y z coordinates using only memory hack not cleo not samp funcs nothing at all ?
Task I want to achieve : Using memory manipulating I want to lock players camera at X Y Z point in world
Steps Iv done :
So until now I can get players current position using these memories which I add to gta_sa.exe
PLAYER_BASE_ADDRESS = 0xB6F5F0 # Base address for player data
XYZ_OFFSET = 0x14 # Offset to XYZ position structure
POSITION_X_OFFSET = 0x30 # Offset to X position
POSITION_Y_OFFSET = 0x34 # Offset to Y position
POSITION_Z_OFFSET = 0x38 # Offset to Z position
for example that will give something like that
Player Position: X = 686.7557983398438, Y = 888.8825073242188, Z = -39.41261672973633
In Cleo iv tested code snipped I got from this post
Screen Camera Look at Position(Multi-Purpose)- GET CAMERA FACING ANGLES
And This post
Need auto walk to ten cordinates
and I made a cleo which will accept /look x y z command and point the camera to that location using Sampfuncs that also works perfectly fine which ill share the code if you want
Thanks to @Parazitas
Code:
{$CLEO .cs}
// Initialize
0000:
// Wait for the game to fully load
REPEAT
WAIT 0
UNTIL 0AFA: // Wait until SAMP is initialized
// Register the `/look` command in SA-MP
0B34: samp register_client_command "look" to_label @cmd_look
// Main loop (necessary for CLEO scripts)
WHILE TRUE
WAIT 0
END
// Label triggered by the `/look` command
:cmd_look
// Get the parameters (X, Y, Z) typed after `/look`
0B35: samp 31@ = get_last_command_params
// Scan the input for three float values (X, Y, Z)
IF 0AD4: $NOT_USED = scan_string 31@ format "%f %f %f" 1@ 2@ 3@
THEN
// Set the camera to look at the specified coordinates (X, Y, Z)
0AB1: @CAMERA_AT_POS 3 XYZ: 1@ 2@ 3@
ELSE
// If the input was invalid, show an error message
0AF8: samp add_message_to_chat "{FF0000}Invalid format! Usage: /look X Y Z"
END
// Return to the game after handling the command
0B43: samp cmd_ret
//0AB1: @AIM_AT_POS 3 XYZ: 1@ 2@ 3@
:CAMERA_AT_POS
0087: 8@ = 3@
068D: get_camera_position_to 3@ 4@ 5@
0063: 0@ -= 3@
0063: 1@ -= 4@
0604: get_Z_angle_for_point 0@ 1@ store_to 6@
6@ -= 90.0
0017: 6@ /= 57.2957795
005B: 6@ += 8@ // (float)
0A8D: 7@ = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
no matter what code base address I tried CCamera or what ever I found like 10 in this forum and total net but its not what I want ! i mean some not even working for setting player camera
so may question is ! can any one guide me so how can I simply point and lock player camera look at a point using that point x y z coordinates using only memory hack not cleo not samp funcs nothing at all ?