but how to do the opposite?
PHP:
:GetPlayerTargetedEntity
{
if
0AB1: @GetPlayerTargetedEntity 0 _Return: TargetedActorHandle 0@
then
// do something...
end
}
0470: 30@ = actor $PLAYER_ACTOR current_weapon
30@ *= 0x70
30@ += 0xC8AAB8
30@ += 0x8
0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0 // weapon range
0A96: 0@ = actor $PLAYER_ACTOR struct
0A8D: 1@ = read_memory 0xB6F1A8 size 2 virtual_protect 0 // TheCamera.m_aCams.m_wCamMode
0AA6: call_method 0x5E4280 struct 0@ num_params 3 pop 0 bIncludeAnim 1 iBoneID 25 vPosition 2@v // CPed__getBonePosition
000B: 4@ += 0.3
if or
0039: 1@ == 53
0039: 1@ == 55
then
0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 _targetOut 5@v _cameraOut 8@v _z 4@ _y 3@ _x 2@ _range 30@ // CCamera::Find3rdPersonCamTargetVector
else
068E: get_camera_target_point_to 5@ 6@ 7@
068D: get_camera_position_to 8@ 9@ 10@
0087: 11@ = 8@ // (float)
0087: 12@ = 9@ // (float)
0087: 13@ = 10@ // (float)
0063: 11@ -= 5@ // (float)
0063: 12@ -= 6@ // (float)
0063: 13@ -= 7@ // (float)
0087: 14@ = 11@ // (float)
0087: 15@ = 12@ // (float)
0087: 16@ = 13@ // (float)
0013: 11@ *= 30@
0013: 12@ *= 30@
0013: 13@ *= 30@
0087: 5@ = 8@ // (float)
0087: 6@ = 9@ // (float)
0087: 7@ = 10@ // (float)
0063: 5@ -= 11@ // (float)
0063: 6@ -= 12@ // (float)
0063: 7@ -= 13@ // (float)
0063: 8@ -= 14@ // (float)
0063: 9@ -= 15@ // (float)
0063: 10@ -= 16@ // (float)
end
0006: 1@ = 0 // entity = NULL
0AA7: call_function 0x56BA00 num_params 12 pop 12 0 0 0 0 _objects 1 _peds 1 _vehicles 1 _buildings 1 _pEntity 1@v _colPoint 8@v _end 5@v _start 2@v _result: 13@ // CWorld::ProcessLineOfSight
0006: 14@ = 0
0006: 15@ = 0
if
1@ <> 0
then
0A8E: 2@ = 1@ + 0x36 // 1@ Entity struct
0A8D: 2@ = read_memory 2@ size 1 virtual_protect 0 // entity->m_nStatusType
0B10: 2@ = 2@ AND 7
if
2@ == 3 // ENTITY_TYPE_PED
then
0A96: 31@ = actor $PLAYER_ACTOR struct
if
803B: not 31@ == 1@ // (int)
then
0AEA: 15@ = actor_struct 1@ handle
end
end
end
if 056D: actor 15@ defined
then 0485: return_true
else 059A: return_false
end
0AB2: ret 1 15@
Last edited: