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

  #1  
Старый 05.04.2021, 22:26
TheRedLion
Новичок
Регистрация: 05.04.2021
Сообщений: 2
С нами: 2688352

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

Hey guys, I'd like to asking for help that something about this code. VS doesn't show any error or something but plugin makes game crash when I logged in to spawn. The problem could be getting packet

C++:





Код:
bool
CALLBACK
IncomingRPC
(
stRakNetHookParams
*
params
)
{
if
(
params
->
packetId
==
ScriptRPCEnumeration
::
RPC_ScrSetPlayerMapIcon
)
{
BYTE iconid
;
BYTE type
;
int
color
;
params
->
bitStream
->
ResetReadPointer
(
)
;
params
->
bitStream
->
Read
(
iconid
)
;
params
->
bitStream
->
Read
(
pos
[
0
]
)
;
params
->
bitStream
->
Read
(
pos
[
1
]
)
;
params
->
bitStream
->
Read
(
pos
[
2
]
)
;
params
->
bitStream
->
Read
(
type
)
;
params
->
bitStream
->
Read
(
color
)
;
if
(
type
==
0
)
{
if
(
color
==
0xA50000ff
)
{
int
car
=
SF
->
getSAMP
(
)
->
getVehicles
(
)
->
GetCarHandleFromSAMPCarID
(
SF
->
getSAMP
(
)
->
getPlayers
(
)
->
pLocalPlayer
->
sCurrentVehicleID
)
;
char
_text
[
100
]
;
if
(
_cp
==
false
)
{
sprintf
(
_text
,
"02D3: %d %f %f %f"
,
car
,
pos
[
0
]
,
pos
[
1
]
,
pos
[
2
]
)
;
SF
->
getCLEO
(
)
->
callOpcode
(
_text
)
;
SF
->
getSAMP
(
)
->
getChat
(
)
->
AddChatMessage
(
-
1
,
"1"
)
;
_cp
=
true
;
}
else
{
sprintf
(
_text
,
"02D3: %d "
,
car
)
;
SF
->
getCLEO
(
)
->
callOpcode
(
_text
)
;
SF
->
getSAMP
(
)
->
getChat
(
)
->
AddChatMessage
(
-
1
,
"Middle"
)
;
}
}
else
if
(
color
==
0x366B2CFF
)
{
if
(
_cp
==
false
)
_cp
=
true
;
int
car
=
SF
->
getSAMP
(
)
->
getVehicles
(
)
->
GetCarHandleFromSAMPCarID
(
SF
->
getSAMP
(
)
->
getPlayers
(
)
->
pLocalPlayer
->
sCurrentVehicleID
)
;
char
_text
[
100
]
;
sprintf
(
_text
,
"02D3: %d %f %f %f"
,
car
,
pos
[
0
]
,
pos
[
1
]
,
pos
[
2
]
)
;
SF
->
getCLEO
(
)
->
callOpcode
(
_text
)
;
SF
->
getSAMP
(
)
->
getChat
(
)
->
AddChatMessage
(
-
1
,
"1"
)
;
}
}
char
_text
[
100
]
;
sprintf
(
_text
,
"%d %f %f %f %d %s"
,
iconid
,
pos
[
0
]
,
pos
[
1
]
,
pos
[
2
]
,
type
,
color
)
;
SF
->
getSAMP
(
)
->
getChat
(
)
->
AddChatMessage
(
-
1
,
_text
)
;
return
true
;
}
return
true
;
}
 
Ответить с цитированием
 



Предыдущая тема Следующая тема

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


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




ANTICHAT ™ © 2001- Antichat Kft.