
08.01.2021, 15:08
|
|
Познавший АНТИЧАТ
Регистрация: 09.08.2015
Сообщений: 1,213
С нами:
5663255
Репутация:
183
|
|
C++:
Код:
uintptr_t sampModule
=
reinterpret_cast
(
GetModuleHandle
(
"samp.dll"
)
)
;
if
(
sampModule
!=
0
)
{
char
*
str
=
"Oh yes, server closed the connection."
;
void
*
address
=
reinterpret_cast
(
sampModule
+
0x8A76
+
1
)
;
DWORD vp
;
VirtualProtect
(
address
,
sizeof
(
str
)
,
PAGE_EXECUTE_READWRITE
,
&
vp
)
;
*
reinterpret_cast
(
address
)
=
str
;
VirtualProtect
(
address
,
sizeof
(
str
)
,
vp
,
&
vp
)
;
}
Важно чтобы строка оставалась в памяти, то есть твой плагин не должен быть выгружен, иначе выделяй память и копируй строку туда.
|
|
|