
28.04.2024, 12:07
|
|
Постоянный
Регистрация: 15.09.2021
Сообщений: 396
С нами:
2453766
Репутация:
68
|
|
Сообщение от why ega
Если я правильно понимаю, ты хочешь изменить айпи при подключении в сампе?
Тогда ты можешь делать что-то типа такого
C++:
Код:
using
NetGameConnect_t
=
int
(
__thiscall
*
)
(
std
::
uintptr_t
*
netgame
)
;
kthook
::
kthook_simple
NetGameConnectHook
;
// r3
NetGameConnectHook
.
set_dest
(
reinterpret_cast
(
GetModuleHandleA
(
"samp.dll"
)
)
+
0x85D0
)
;
NetGameConnectHook
.
set_cb
(
[
]
(
const
decltype
(
NetGameConnectHook
)
&
hook
,
std
::
uintptr_t
*
netgame
)
{
char
*
host
=
reinterpret_cast
(
*
netgame
+
0x30
)
;
strcpy
(
host
,
"127.0.0.1"
)
;
*
reinterpret_cast
(
*
netgame
+
0x235
)
=
7777
;
return
hook
.
get_trampoline
(
)
(
netgame
)
;
}
)
;
NetGameConnectHook
.
install
(
)
;
крашит, при попытке подключения
|
|
|