
02.07.2022, 16:47
|
|
Постоянный
Регистрация: 04.06.2020
Сообщений: 620
С нами:
3127813
Репутация:
133
|
|
C++:
Код:
using
CDialog__Show_t
=
void
(
__thiscall
*
)
(
samp
::
CDialog
*
,
int
,
int
,
const
char
*
,
const
char
*
,
const
char
*
,
BOOL
)
;
#if defined(BUILD_R3)
#define CDialog__Show 0x6F8C0
#else
#define CDialog__Show 0x6B9C0
#endif
static
kthook
::
kthook_signal
show_dialog_hook
;
static
bool
OnShowDialog
(
const
kthook
::
kthook_signal
&
hk
,
samp
::
CDialog
*
,
int
nId
,
int
,
const
char
*
,
const
char
*
,
const
char
*
,
BOOL
)
{
_DebugPrn
(
"Show dialog %d"
,
nId
)
;
return
false
;
}
void
drugstimer_Init
(
)
{
nlohmann
::
json
&
settings
=
getSubSettings
(
"drugstimer"
,
DefaultSettings
)
;
drugstimer_Key
=
settings
[
"key"
]
;
show_dialog_hook
.
set_dest
(
sampapi
::
GetAddress
(
CDialog__Show
)
)
;
show_dialog_hook
.
before
.
connect
(
OnShowDialog
)
;
}
|
|
|