HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > ПРОГРАММИРОВАНИЕ > С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby
   
 
 
Опции темы Поиск в этой теме Опции просмотра

  #11  
Старый 13.08.2024, 19:53
0x73616D
Участник форума
Регистрация: 27.05.2021
Сообщений: 140
С нами: 2614229

Репутация: 33
По умолчанию

Is there a way to get the string from a textdraw in a loop using RakHook?

Есть ли способ получить строку из зацикленного текстового рисунка с помощью RakHook?

This only works the first time the textdraw is displayed, using while will cause the game to freeze.

Это работает только при первом отображении textdraw, использование while приведет к зависанию игры.

C++:





[CODE]
bool
PluginRPC
::
onShowTextDraw
(
unsigned
char
&
id
,
RakNet
::
BitStream
*
bs
)
{
if
(
id
!=
134
)
{
return
true
;
}
uint16_t
wTextDrawID
;
uint8_t
Flags
;
float
fLetterWidth
;
float
fLetterHeight
;
uint32_t
dLetterColor
;
float
fLineWidth
;
float
fLineHeight
;
uint32_t
dBoxColor
;
uint8_t
Shadow
;
uint8_t
Outline
;
uint32_t
dBackgroundColor
;
uint8_t
Style
;
uint8_t
Selectable
;
float
fX
;
float
fY
;
uint16_t
wModelID
;
float
fRotX
;
float
fRotY
;
float
fRotZ
;
float
fZoom
;
int16_t
wColor1
;
int16_t
wColor2
;
uint16_t
szTextLen
;
std
::
string szText
;
bs
->
Read
(
wTextDrawID
)
;
bs
->
Read
(
Flags
)
;
bs
->
Read
(
fLetterWidth
)
;
bs
->
Read
(
fLetterHeight
)
;
bs
->
Read
(
dLetterColor
)
;
bs
->
Read
(
fLineWidth
)
;
bs
->
Read
(
fLineHeight
)
;
bs
->
Read
(
dBoxColor
)
;
bs
->
Read
(
Shadow
)
;
bs
->
Read
(
Outline
)
;
bs
->
Read
(
dBackgroundColor
)
;
bs
->
Read
(
Style
)
;
bs
->
Read
(
Selectable
)
;
bs
->
Read
(
fX
)
;
bs
->
Read
(
fY
)
;
bs
->
Read
(
wModelID
)
;
bs
->
Read
(
fRotX
)
;
bs
->
Read
(
fRotY
)
;
bs
->
Read
(
fRotZ
)
;
bs
->
Read
(
fZoom
)
;
bs
->
Read
(
wColor1
)
;
bs
->
Read
(
wColor2
)
;
bs
->
Read
(
szTextLen
)
;
szText
.
resize
(
szTextLen
)
;
bs
->
Read
(
szText
.
data
(
)
,
szTextLen
)
;
if
(
wTextDrawID
==
2053
)
{
std
::
string gasolina
=
szText
;
std
::
string gasolinaValue
=
gasolina
;
size_t startPos
=
gasolina
.
find
(
"{"
)
;
size_t endPos
=
gasolina
.
find
(
"}"
)
;
if
(
startPos
!=
std
::
string
::
npos
&&
endPos
!=
std
::
string
::
npos
)
{
gasolinaValue
=
gasolina
.
substr
(
startPos
+
1
,
endPos
-
startPos
-
1
)
;
}
std
::
cout

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





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.

×

Создать сделку

Продавец: ник или ID

Название сделки:

Сумма USDT:

Срок сделки, дней:

Кто платит комиссию:

Условия сделки:

После создания сделки средства будут зарезервированы в холде до завершения сделки.

×

Мои сделки

Загрузка...
×

Сделка


Загрузка чата...
×

ESCROW ADMIN PANEL

Загрузка...
Загрузка...