| qwertyrus |
26.04.2024 21:58 |
Для ВХ в МТА решил использовать функцию для получения координаты кости(так как просто линии неудобные):
С++:
Код:
//функция
CVector
GetBonePosition
(
void
*
cped
,
byte BoneID
)
{
CVector Position
;
typedef
void
(
__thiscall
*
CPed__getBonePositionWithOffset
)
(
void
*
_this
,
CVector
*
offset
,
int
bodeId
,
bool
includeAnim
)
;
if
(
cped
!=
nullptr
)
{
(
CPed__getBonePositionWithOffset
(
0x5E01C0
)
)
(
cped
,
&
Position
,
BoneID
,
true
)
;
}
return
Position
;
}
;
//вызов
void
*
cped
=
(
void
*
)
0xb6f5f0
;
if
(
cped
!=
nullptr
)
{
CVector headpos
=
GetBonePosition
(
cped
,
8
)
;
}
Мне доходчиво объяснили, что вместо указателя на саму структуру CPed я передаю просто указатель на начало CPed. Сможет кто помочь?
|