
05.06.2021, 19:35
|
|
Флудер
Регистрация: 06.11.2017
Сообщений: 2,759
С нами:
4483143
Репутация:
183
|
|
Сообщение от pe1fecto
понял, но можно кодом?
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
)
;
}
|
|
|