
07.06.2021, 00:28
|
|
Постоянный
Регистрация: 03.11.2017
Сообщений: 305
С нами:
4487038
Репутация:
98
|
|
Сообщение от KiN4StAt
C++:
Код:
constexpr
auto
SAMP_037_R1_CHAT_OFFSET
=
0x21A0E4
;
constexpr
auto
SAMP_037_R3_CHAT_OFFSET
=
0x26E8C8
;
constexpr
auto
SAMP_037_R1_ADDCHATMSG_FUNC
=
0x64010
;
constexpr
auto
SAMP_037_R3_ADDCHATMSG_FUNC
=
0x67460
;
inline
void
AddChatMessage_R1
(
int
nType
,
const
char
*
szText
,
const
char
*
szPrefix
,
unsigned
int
textColor
,
unsigned
int
prefixColor
)
{
using
AddChatMsgProt
=
void
(
__thiscall
*
)
(
void
*
,
int
,
const
char
*
,
const
char
*
,
unsigned
int
,
unsigned
int
)
;
auto
pChat
=
*
reinterpret_cast
(
dwSAMP
+
SAMP_037_R1_CHAT_OFFSET
)
;
return
reinterpret_cast
(
SAMP_037_R1_ADDCHATMSG_FUNC
)
(
pChat
,
nType
,
szText
,
szPrefix
,
textColor
,
prefixColor
)
;
}
inline
void
AddChatMessage_R3
(
int
nType
,
const
char
*
szText
,
const
char
*
szPrefix
,
unsigned
int
textColor
,
unsigned
int
prefixColor
)
{
using
AddChatMsgProt
=
void
(
__thiscall
*
)
(
void
*
,
int
,
const
char
*
,
const
char
*
,
unsigned
int
,
unsigned
int
)
;
auto
pChat
=
*
reinterpret_cast
(
dwSAMP
+
SAMP_037_R3_CHAT_OFFSET
)
;
return
reinterpret_cast
(
SAMP_037_R3_ADDCHATMSG_FUNC
)
(
pChat
,
nType
,
szText
,
szPrefix
,
textColor
,
prefixColor
)
;
}
Требуется объявление dwSAMP, загуглил, ничего не нашёл. только начинаю свой путь в с++ )
|
|
|