
25.07.2023, 17:44
|
|
Участник форума
Регистрация: 20.12.2021
Сообщений: 290
С нами:
2315345
Репутация:
48
|
|
Сообщение от Smeruxa
screen position с координатой Z???
давно с сф не работал, получилось, что получилось
C++:
Код:
void
renderPlayers
(
)
{
for
(
int
i
=
0
;
i
getSAMP
(
)
->
getPlayers
(
)
->
isListed
[
i
]
&&
SF
->
getSAMP
(
)
->
getPlayers
(
)
->
remotePlayerInfo
[
i
]
!=
nullptr
&&
i
!=
SF
->
getSAMP
(
)
->
getPlayers
(
)
->
localPlayerInfo
.
id
)
{
CVector myPedPositionWorld
=
*
PEDSELF
->
GetPosition
(
)
;
CVector pedPositionWorld
=
*
reinterpret_cast
(
SF
->
getSAMP
(
)
->
getPlayers
(
)
->
remotePlayerInfo
[
i
]
->
data
->
onFootPos
)
;
CVector myPedPositionScreen
=
ConvertGametoScreen
(
myPedPositionWorld
)
;
CVector pedPositionScreen
=
ConvertGametoScreen
(
pedPositionWorld
)
;
if
(
pedPositionScreen
.
fZ
>
1.f
)
{
ImGui
::
GetBackgroundDrawList
(
)
->
AddLine
(
{
myPedPositionScreen
.
fX
,
myPedPositionScreen
.
fY
}
,
{
pedPositionScreen
.
fX
,
pedPositionScreen
.
fY
}
,
-
1
)
;
}
}
}
}
|
|
|