Show your aim calculation
Why you don't have choise??Filen
Filen – Next Generation End-To-End Encrypted Cloud Platform. Get started with 10 GB of free storage space.filen.io
0AB1: @MOVEMOUSE_ALLDIRECTION 0 // I actually hate this function because it dazzle the screen a bit, but I have no choice I have to use it :(
I threw off the opening from the public my code in Chita and starts from the lineWhy you don't have choise??
PHP:0AB1: @MOVEMOUSE_ALLDIRECTION 0 // I actually hate this function because it dazzle the screen a bit, but I have no choice I have to use it :(
@ajom seems like he using your func..
Please give me the code
- 3DVelocity_Difference = 3DVelocity_Target - 3DVelocity_Me
- Get Average_50fps_Ratio by reading 0xB7CB5C
- 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
- Next_Frame_Predicted_3DPosition = 3FPosition_Target + 3DVelocity_Difference_PerFrame
- Then feed Next_Frame_Predicted_3DPosition to your AimAtPos Snippet.
Actually if you tried searching around ugbase threads, the idea is a bit the same here.
Something is wrong with calculation i guess, i puts on right hand side of player..
- 3DVelocity_Difference = 3DVelocity_Target - 3DVelocity_Me
- Get Average_50fps_Ratio by reading 0xB7CB5C
- 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
- Next_Frame_Predicted_3DPosition = 3FPosition_Target + 3DVelocity_Difference_PerFrame
- Then feed Next_Frame_Predicted_3DPosition to your AimAtPos Snippet.
Actually if you tried searching around ugbase threads, the idea is a bit the same here.
{$CLEO .cs}
0000:
REPEAT
IF 8AA2: $NOT_USED = "samp.dll"
THEN 0A93: end_custom_thread
END
WAIT 1500
UNTIL 0AA2: $NOT_USED = "samp.dll"
WHILE TRUE
WAIT 0
IF 0256: player $PLAYER_CHAR defined
THEN
IF 0AD2: 31@ = player $PLAYER_CHAR targeted_actor //IF and SET
THEN
0AB1: @GENERATE_AIM_POSITION 1 ActorHandle 31@ _Returned: XYZ 0@ 1@ 2@
0AB1: @CamAtPos 5 _XYZ 0@ 1@ 2@ _withCamOffsetAngleX 0.0 _andCamOffsetAngleZ 0.0
END
END
END
:GENERATE_AIM_POSITION
{
0AB1: @GENERATE_AIM_POSITION 1 ActorHandle 31@ _Returned: XYZ 0@ 1@ 2@
}
// 3DVelocity_Difference = 3DVelocity_Target - 3DVelocity_Me
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 31@ 30@ 29@
083D: get_actor 0@ velocity_in_direction_XYZ 28@ 27@ 26@
0063: 28@ -= 31@ // (float)
0063: 27@ -= 30@ // (float)
0063: 26@ -= 29@ // (float)
// Get Average_50fps_Ratio by reading 0xB7CB5C
0A8D: 25@ = read_memory 0xB7CB5C size 4 virtual_protect 0 // gta frame time, use in order to be consistent with FPS
// 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
24@ = 50.0 // 50.0fps
006B: 24@ *= 25@ // (float)
0073: 28@ /= 24@ // (float)
0073: 27@ /= 24@ // (float)
0073: 26@ /= 24@ // (float)
// Next_Frame_Predicted_3DPosition = 3FPosition_Target + 3DVelocity_Difference_PerFrame
00A0: store_actor 0@ position_to 23@ 22@ 21@
005B: 23@ += 28@ // (float)
005B: 22@ += 27@ // (float)
005B: 21@ += 26@ // (float)
0AB2: ret 3 23@ 22@ 21@
:CamAtPos // thx to ajom >> ugbase.eu
// 0AB1: @CamAtPos 5 _XYZ 0@ 1@ 2@ _withCamOffsetAngleX 3@ _andCamOffsetAngleZ 4@
// ~~~~~~~~~~anti auto-vehicle cam movement
0A8D: 16@ = read_memory 0xB70118 size 4 virtual_protect 0
IF AND
16@ < 50.0
00DF: actor $PLAYER_ACTOR in_car
THEN 0A8C: write_memory 0xB70118 size 4 value 50.0 virtual_protect 0 // reset vehicle camera stabalizer timer, credit to Parazitas
END
// ~~~~~~~~~~
068D: get_camera_position_to 31@ 30@ 29@
// ~~~~~~~~~~Camera Z-Angle from our camera towards the target
0087: 28@ = 1@ // y2
0063: 28@ -= 30@ // y1
0087: 27@ = 0@ // x2
0063: 27@ -= 31@ // x1
0AA5: atan2 | 0x4207C0 2 2 | _X 27@ _Y 28@
0AE9: pop_float 28@ // store result from above operation
28@ += 3.1415926535897987671013733832795 // Camera Angle Leads 180 degrees respect to Z world coordinats
005B: 28@ += 4@ // use the defined camz offset to move the camera leftwards or rightwards
// ~~~~~~~~~~
// ~~~~~~~~~~Camera X-Angle from our camera towards the target
0087: 27@ = 2@ // z2
0063: 27@ -= 29@ // z1
0509: 26@ = distance_between_XY 31@ 30@ and_XY 0@ 1@ // adjacent side
0AA5: atan2 | 0x4207C0 2 2 | _X 26@ _Y 27@
0AE9: pop_float 27@ // store result from above operation
005B: 27@ += 3@ // use the defined camx offset to move the camera downwards or upwards
// ~~~~~~~~~~
0A25: set_camera_on_players_X_angle 27@ Z_angle 28@
0AB2: ret 0
What you mean by this?
- 3DVelocity_Difference = 3DVelocity_Target - 3DVelocity_Me
- Get Average_50fps_Ratio by reading 0xB7CB5C
- 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
- Next_Frame_Predicted_3DPosition = 3FPosition_Target + 3DVelocity_Difference_PerFrame
- Then feed Next_Frame_Predicted_3DPosition to your AimAtPos Snippet.
Actually if you tried searching around ugbase threads, the idea is a bit the same here.
Something is wrong with calculation i guess, i puts on right hand side of player..
The 3D coordinates/position of the aimed target actor. Can't edit the post anymore.What you mean by this?
" 3FPosition_Target "
is it player position ?
// Get Average_50fps_Ratio by reading 0xB7CB5C
0A8D: 25@ = read_memory 0xB7CB5C size 4 virtual_protect 0 // gta frame time, use in order to be consistent with FPS
// 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
24@ = 50.0 // 50.0fps
006B: 24@ *= 25@ // (float)
// Get Average_50fps_Ratio by reading 0xB7CB5C
0A8D: 25@ = read_memory 0xB7CB5C size 4 virtual_protect 0 // gta frame time, use in order to be consistent with FPS
// 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
24@ = 50.0 // 50.0fps
0073: 24@ /= 25@ // (float)
Well something is still wrong, code below:Just change this:
Into:
PHP:// Get Average_50fps_Ratio by reading 0xB7CB5C 0A8D: 25@ = read_memory 0xB7CB5C size 4 virtual_protect 0 // gta frame time, use in order to be consistent with FPS // 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio) 24@ = 50.0 // 50.0fps 0073: 24@ /= 25@ // (float)
:GENERATE_AIM_POSITION
{
0AB1: @GENERATE_AIM_POSITION 1 ActorHandle 31@ _Returned: XYZ 0@ 1@ 2@
}
// 3DVelocity_Difference = 3DVelocity_Target - 3DVelocity_Me
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 31@ 30@ 29@
083D: get_actor 0@ velocity_in_direction_XYZ 28@ 27@ 26@
0063: 28@ -= 31@ // (float)
0063: 27@ -= 30@ // (float)
0063: 26@ -= 29@ // (float)
// Get Average_50fps_Ratio by reading 0xB7CB5C
0A8D: 25@ = read_memory 0xB7CB5C size 4 virtual_protect 0 // gta frame time, use in order to be consistent with FPS
// 3DVelocity_Difference_PerFrame = 3DVelocity_Difference / (50.0fps x Average_50fps_Ratio)
24@ = 50.0 // 50.0fps
0073: 24@ /= 25@ // (float)
0073: 28@ /= 24@ // (float)
0073: 27@ /= 24@ // (float)
0073: 26@ /= 24@ // (float)
// Next_Frame_Predicted_3DPosition = 3FPosition_Target + 3DVelocity_Difference_PerFrame
00A0: store_actor 0@ position_to 23@ 22@ 21@
005B: 23@ += 28@ // (float)
005B: 22@ += 27@ // (float)
005B: 21@ += 26@ // (float)
0AB2: ret 3 23@ 22@ 21@
CamAtPos Snippet Will Pan the camera at the Center of the Screen. So you can either do the following:Well something is still wrong, code below: