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

  #1  
Старый 03.12.2023, 18:31
delanov
Познающий
Регистрация: 11.05.2023
Сообщений: 53
С нами: 1585608

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

Вот такая ошибка с kthook, если кто-то догадывается о моей ошибке, дайте знать пожалуйста

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

  #2  
Старый 03.12.2023, 18:57
Andrinall
Постоянный
Регистрация: 11.07.2019
Сообщений: 702
С нами: 3601315

Репутация: 148


По умолчанию

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

Вот такая ошибка с kthook, если кто-то догадывается о моей ошибке, дайте знать пожалуйста


Используй
Код:
kthook::kthook_simple
kthook_simple_t там нет(я даже на гите в коммитах не нашёл его нигде)

Цитата:
Сообщение от Спойлер  


C++:





Код:
#include 
typedef
struct
CVector
{
float
x
,
y
,
z
;
}
CVector
;
typedef
struct
tRadarTrace
{
unsigned
int
m_nColour
;
// see eBlipColour
unsigned
int
m_nEntityHandle
;
CVector           m_vecPos
;
unsigned
short
m_nCounter
;
float
m_fSphereRadius
;
unsigned
short
m_nBlipSize
;
class
CEntryExit
*
m_pEntryExit
;
unsigned
char
m_nRadarSprite
;
// see eRadarSprite
unsigned
char
m_bBright
:
1
;
// It makes use of bright colors. Always set.
unsigned
char
m_bInUse
:
1
;
// It is available.
unsigned
char
m_bShortRange
:
1
;
// It doesn't show permanently on the radar.
unsigned
char
m_bFriendly
:
1
;
// It is affected by BLIP_COLOUR_THREAT.
unsigned
char
m_bBlipRemain
:
1
;
// It has the priority over the entity (it will still appear after the entity's deletion).
unsigned
char
m_bBlipFade
:
1
;
// Possibly a leftover. Always unset (unused).
unsigned
char
m_nCoordBlipAppearance
:
2
;
// see eBlipAppearance
unsigned
char
m_nBlipDisplay
:
2
;
// see eBlipDisplay
unsigned
char
m_nBlipType
:
4
;
// see eBlipType
}
tRadarTrace
;
class
plugin
{
protected
:
using
drawCoordBlip_t
=
void
(
__cdecl
*
)
(
int
,
std
::
uint8_t
)
;
unsigned
char
deleted_sprite_idx
=
32
;
kthook
::
kthook_simple

hk_drawCoordBlip
{
0x586D60
}
;
tRadarTrace
*
ms_RadarTrace
=
(
tRadarTrace
*
)
0xBA86F0
;
public
:
plugin
(
)
{
hk_drawCoordBlip
.
set_cb
(
[
this
]
(
const
decltype
(
hk_drawCoordBlip
)
&
hook
,
int
blipArrId
,
std
::
uint8_t
isSprite
)
{
if
(
ms_RadarTrace
[
blipArrId
]
.
m_nRadarSprite
==
deleted_sprite_idx
)
return
;
return
hook
.
get_trampoline
(
)
(
blipArrId
,
isSprite
)
;
}
)
;
hk_drawCoordBlip
.
install
(
)
;
}
~
plugin
(
)
{
hk_drawCoordBlip
.
~
kthook_simple
(
)
;
}
}
_plugin_
;


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

  #3  
Старый 03.12.2023, 19:53
delanov
Познающий
Регистрация: 11.05.2023
Сообщений: 53
С нами: 1585608

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

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

Используй
Код:
kthook::kthook_simple
kthook_simple_t там нет(я даже на гите в коммитах не нашёл его нигде)

Цитата:
Сообщение от Спойлер  


C++:





Код:
#include 
typedef
struct
CVector
{
float
x
,
y
,
z
;
}
CVector
;
typedef
struct
tRadarTrace
{
unsigned
int
m_nColour
;
// see eBlipColour
unsigned
int
m_nEntityHandle
;
CVector           m_vecPos
;
unsigned
short
m_nCounter
;
float
m_fSphereRadius
;
unsigned
short
m_nBlipSize
;
class
CEntryExit
*
m_pEntryExit
;
unsigned
char
m_nRadarSprite
;
// see eRadarSprite
unsigned
char
m_bBright
:
1
;
// It makes use of bright colors. Always set.
unsigned
char
m_bInUse
:
1
;
// It is available.
unsigned
char
m_bShortRange
:
1
;
// It doesn't show permanently on the radar.
unsigned
char
m_bFriendly
:
1
;
// It is affected by BLIP_COLOUR_THREAT.
unsigned
char
m_bBlipRemain
:
1
;
// It has the priority over the entity (it will still appear after the entity's deletion).
unsigned
char
m_bBlipFade
:
1
;
// Possibly a leftover. Always unset (unused).
unsigned
char
m_nCoordBlipAppearance
:
2
;
// see eBlipAppearance
unsigned
char
m_nBlipDisplay
:
2
;
// see eBlipDisplay
unsigned
char
m_nBlipType
:
4
;
// see eBlipType
}
tRadarTrace
;
class
plugin
{
protected
:
using
drawCoordBlip_t
=
void
(
__cdecl
*
)
(
int
,
std
::
uint8_t
)
;
unsigned
char
deleted_sprite_idx
=
32
;
kthook
::
kthook_simple

hk_drawCoordBlip
{
0x586D60
}
;
tRadarTrace
*
ms_RadarTrace
=
(
tRadarTrace
*
)
0xBA86F0
;
public
:
plugin
(
)
{
hk_drawCoordBlip
.
set_cb
(
[
this
]
(
const
decltype
(
hk_drawCoordBlip
)
&
hook
,
int
blipArrId
,
std
::
uint8_t
isSprite
)
{
if
(
ms_RadarTrace
[
blipArrId
]
.
m_nRadarSprite
==
deleted_sprite_idx
)
return
;
return
hook
.
get_trampoline
(
)
(
blipArrId
,
isSprite
)
;
}
)
;
hk_drawCoordBlip
.
install
(
)
;
}
~
plugin
(
)
{
hk_drawCoordBlip
.
~
kthook_simple
(
)
;
}
}
_plugin_
;


Там еще много ошибок, и я полагаю связанны с неправильным подключением, в туториале -> https://www.blast.hk/threads/101433/ там так и было написано

UPD: Проблема решена, спасибо
 
Ответить с цитированием
Ответ





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


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




ANTICHAT ™ © 2001- Antichat Kft.