
12.11.2024, 21:24
|
|
Постоянный
Регистрация: 05.08.2018
Сообщений: 372
С нами:
4091290
Репутация:
213
|
|
C++:
Код:
using
CDialogShow_t
=
void
(
__thiscall
*
)
(
void
*
,
int
,
int
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
BOOL
)
;
kthook
::
kthook_simple
CDialogShowHook
;
void
customhook
(
)
{
std
::
uintptr_t SampBase
=
reinterpret_cast
(
GetModuleHandle
(
"samp.dll"
)
)
;
CDialogShowHook
.
set_dest
(
SampBase
+
0x6B3E7
)
;
CDialogShowHook
.
set_cb
(
[
]
(
const
decltype
(
CDialogShowHook
)
&
hook
,
void
*
pDialog
,
void
*
edx86
,
int
nId
,
int
nType
,
const
char
*
szCaption
,
const
char
*
szText
,
const
char
*
szLeftButton
,
const
char
*
szRightButton
,
BOOL bServerside
)
{
std
::
string NewMessage
{
"test message"
}
;
return
hook
.
get_trampoline
(
)
(
pDialog
,
nId
,
nType
,
NewMessage
.
c_str
(
)
,
szText
,
szLeftButton
,
szRightButton
,
bServerside
)
;
}
)
;
CDialogShowHook
.
install
(
)
;
}
|
|
|