Показать сообщение отдельно

  #2  
Старый 20.12.2018, 16:03
Romelo
Постоянный
Регистрация: 21.11.2014
Сообщений: 540
С нами: 6039222

Репутация: 163


По умолчанию

Цитата:
Сообщение от beento  

C++:





Код:
void
sendDialog
(
uint16_t
DialogId
,
uint8_t
Button
,
uint16_t
ListboxId
,
char
*
string
)
{
BitStream bs
;
bs
.
ResetWritePointer
(
)
;
bs
.
Write
(
DialogId
)
;
bs
.
Write
(
Button
)
;
bs
.
Write
(
ListboxId
)
;
bs
.
Write
(
strlen
(
string
)
)
;
bs
.
Write
(
string
)
;
SF
->
getRakNet
(
)
->
SendRPC
(
RPCEnumeration
::
RPC_DialogResponse
,
&
bs
)
;
}

C++:





Код:
void
sendDialog
(
short
id
,
char
button
,
short
listitem
,
const
char
*
input
)
{
BitStream bs
;
bs
.
ResetWritePointer
(
)
;
bs
.
Write
(
id
)
;
bs
.
Write
(
button
)
;
bs
.
Write
(
listitem
)
;
bs
.
Write
(
(
BYTE
)
strlen
(
input
)
)
;
bs
.
Write
(
input
,
strlen
(
input
)
)
;
SF
->
getRakNet
(
)
->
SendRPC
(
RPCEnumeration
::
RPC_DialogResponse
,
&
bs
)
;
}
void
CALLBACK
log
(
std
::
string param
)
{
sendDialog
(
SF
->
getSAMP
(
)
->
getDialog
(
)
->
DialogID
,
1
,
0
,
param
.
c_str
(
)
)
;
}


 
Ответить с цитированием