 |
|

01.01.2023, 11:15
|
|
Новичок
Регистрация: 19.06.2022
Сообщений: 14
С нами:
2055431
Репутация:
3
|
|
Как нарисовать 3D круг при помощи imgui?
|
|
|

02.01.2023, 15:21
|
|
Новичок
Регистрация: 09.04.2022
Сообщений: 19
С нами:
2156817
Репутация:
3
|
|
Как в SAMPFUNCS получить, грубо говоря, указатель на структуру stFontInfo, который хранить в себе стандартный шрифт samp.
Или все же лучше самому инициализировать этот шрифт? (Имею ввиду используя функцию CreateNewFont).
|
|
|

02.01.2023, 21:17
|
|
Флудер
Регистрация: 18.03.2013
Сообщений: 4,080
С нами:
6921957
Репутация:
183
|
|
Сообщение от Unknown_251
Как в SAMPFUNCS получить, грубо говоря, указатель на структуру stFontInfo, который хранить в себе стандартный шрифт samp.
Или все же лучше самому инициализировать этот шрифт? (Имею ввиду используя функцию CreateNewFont).
Сделай сам и все. Там не stFontInfo используется.
|
|
|

02.01.2023, 22:17
|
|
Новичок
Регистрация: 09.04.2022
Сообщений: 19
С нами:
2156817
Репутация:
3
|
|
Сообщение от Dark_Knight
Сделай сам и все. Там не stFontInfo используется.
Просто хотел удостовериться, что это действительно так.
|
|
|

03.01.2023, 13:16
|
|
Новичок
Регистрация: 29.11.2022
Сообщений: 3
С нами:
1820063
Репутация:
3
|
|
Сообщение от Ltall
Как нарисовать 3D круг при помощи imgui?
Using ImGui to draw 3D objects is not rational. Explore Direct3D.
D3DXCreateSphere function (D3dx9shape.h) - Win32 apps
Uses a left-handed coordinate system to create a mesh containing a sphere.
learn.microsoft.com
Сообщение от 0xFF
Как-то можно перехватить Read у BitStream для разбора пакета? R3
GitHub - imring/RakHook: RakNet events for SA:MP
RakNet events for SA:MP. Contribute to imring/RakHook development by creating an account on GitHub.
github.com
Сообщение от ARMOR
Знает ли кто адрес указателя на CLocalPlayer? ( На версию сампа по***, дайте под любую, там уже сам под все найду )
SAMP-API/src/sampapi/0.3.7-R1/CPlayerPool.cpp at f89b35edb7eaf5db374e32a63f2366c4bb714418 · BlastHackNet/SAMP-API
A library for interacting with functions, classes and structures of SA-MP client - BlastHackNet/SAMP-API
github.com
Сообщение от papercut
sampIsLocalPlayerSpawned
Проверяет, заспавнился ли игрок
wiki.blast.hk
Подскажите, что именно тут проверяется? Какой оффсет? Или это встроенная в самп длл функция?
Как нативно вызвать ее или аналог?
The player is not spawned only if he is a spectator. In that case, it is enough to check whether it is.
SAMP-API/include/sampapi/0.3.7-R1/CLocalPlayer.h at f89b35edb7eaf5db374e32a63f2366c4bb714418 · BlastHackNet/SAMP-API
A library for interacting with functions, classes and structures of SA-MP client - BlastHackNet/SAMP-API
github.com
Сообщение от Savchik Blazer
Товарищи, есть ли у кого-нибудь адрес surface'а диалога, желательно для R1?
All information about the dialog is contained in the CDialog class.
On the client, unfortunately, you can only get information about the current dialog.
The RefDialog() function returns a pointer to it.
SAMP-API/include/sampapi/0.3.7-R1/CDialog.h at f89b35edb7eaf5db374e32a63f2366c4bb714418 · BlastHackNet/SAMP-API
A library for interacting with functions, classes and structures of SA-MP client - BlastHackNet/SAMP-API
github.com
SAMP-API/src/sampapi/0.3.7-R1/CDialog.cpp at f89b35edb7eaf5db374e32a63f2366c4bb714418 · BlastHackNet/SAMP-API
A library for interacting with functions, classes and structures of SA-MP client - BlastHackNet/SAMP-API
github.com
|
|
|

04.01.2023, 00:52
|
|
Постоянный
Регистрация: 05.08.2018
Сообщений: 372
С нами:
4091290
Репутация:
213
|
|
Сообщение от writeline
Help!!
У тебя объявлена функция StrStr, но в коде нет ее реализации, если тебе нужно узнать, если ли в строке подстрока, то можешь юзать strstr()
|
|
|

04.01.2023, 04:00
|
|
Участник форума
Регистрация: 20.12.2021
Сообщений: 290
С нами:
2315345
Репутация:
48
|
|
есть строка на луа:
writeMemory(sampGetBase() + 0x9C0A0, 4, 0x000008C2, true)
пытался переписать на плюсы но чет нихуя не выходит, пробовал:
WriteMemory(GetModuleHandleA("samp.dll") + 0x9C0A0, (void*)4, 0x0008C2); патч срабатывал, Но игра крашилась
был вариант
WriteMemory(GetModuleHandleA("samp.dll") + 0x9C0A0, (uint8_t*)0x0008C2, 4); нихера не срабатывало, а игра все равно крашилась
крч помогите плз💞
|
|
|

04.01.2023, 12:04
|
|
Новичок
Регистрация: 29.11.2022
Сообщений: 3
С нами:
1820063
Репутация:
3
|
|
Сообщение от Z3roKwq
есть строка на луа:
writeMemory(sampGetBase() + 0x9C0A0, 4, 0x000008C2, true)
пытался переписать на плюсы но чет нихуя не выходит, пробовал:
WriteMemory(GetModuleHandleA("samp.dll") + 0x9C0A0, (void*)4, 0x0008C2); патч срабатывал, Но игра крашилась
был вариант
WriteMemory(GetModuleHandleA("samp.dll") + 0x9C0A0, (uint8_t*)0x0008C2, 4); нихера не срабатывало, а игра все равно крашилась
крч помогите плз💞
The most obvious mistake in your code is that you are trying to add int to the pointer returned by the GetModuleHandleA function. In this case, pointer arithmetic works. The pointer is shifted by 0x9C0A0*sizeof(the type the pointer points to, in this case it is HINSTANCE__ whose size is equal to 4).
The second mistake is that you do not remove the memory protection.
C++:
Код:
void
make_night
(
)
{
const
auto
samp
=
reinterpret_cast
(
GetModuleHandle
(
"samp.dll"
)
)
;
if
(
const
auto
ptr
=
reinterpret_cast
(
samp
+
0x9C0A0
)
)
{
// prevent contamination of the local namespace
const
char
raw
[
]
=
"\xC2\x08\x00\x00"
;
::
DWORD old_prot
{
}
;
VirtualProtect
(
ptr
,
sizeof
(
raw
)
-
1
,
PAGE_READWRITE
,
&
old_prot
)
;
std
::
memcpy
(
ptr
,
raw
,
4
)
;
VirtualProtect
(
ptr
,
sizeof
(
raw
)
-
1
,
old_prot
,
&
old_prot
)
;
}
}
Сообщение от writeline
Help!!
Do not use strstr.
C++:
Код:
#include
if
(
std
::
string_view
{
cmdline
}
.
find
(
"-samp"
)
!=
std
::
string
::
npos
)
{
// C++17 and higher
// ...
}
|
|
|

06.01.2023, 22:07
|
|
Познавший АНТИЧАТ
Регистрация: 27.11.2020
Сообщений: 1,431
С нами:
2874035
Репутация:
183
|
|
Сообщение от Wilhelm Groener
The most obvious mistake in your code is that you are trying to add int to the pointer returned by the GetModuleHandleA function. In this case, pointer arithmetic works. The pointer is shifted by 0x9C0A0*sizeof(the type the pointer points to, in this case it is HINSTANCE__ whose size is equal to 4).
The second mistake is that you do not remove the memory protection.
C++:
Код:
void
make_night
(
)
{
const
auto
samp
=
reinterpret_cast
(
GetModuleHandle
(
"samp.dll"
)
)
;
if
(
const
auto
ptr
=
reinterpret_cast
(
samp
+
0x9C0A0
)
)
{
// prevent contamination of the local namespace
const
char
raw
[
]
=
"\xC2\x08\x00\x00"
;
::
DWORD old_prot
{
}
;
VirtualProtect
(
ptr
,
sizeof
(
raw
)
-
1
,
PAGE_READWRITE
,
&
old_prot
)
;
std
::
memcpy
(
ptr
,
raw
,
4
)
;
VirtualProtect
(
ptr
,
sizeof
(
raw
)
-
1
,
old_prot
,
&
old_prot
)
;
}
}
Do not use strstr.
C++:
Код:
#include
if
(
std
::
string_view
{
cmdline
}
.
find
(
"-samp"
)
!=
std
::
string
::
npos
)
{
// C++17 and higher
// ...
}
where from u got this string? i want to know
C++:
Код:
const
char
raw
[
]
=
"\xC2\x08\x00\x00"
;
|
|
|

07.01.2023, 16:31
|
|
Участник форума
Регистрация: 14.04.2018
Сообщений: 122
С нами:
4254200
Репутация:
98
|
|
Сообщение от Z3roKwq
есть строка на луа:
writeMemory(sampGetBase() + 0x9C0A0, 4, 0x000008C2, true)
пытался переписать на плюсы но чет нихуя не выходит, пробовал:
WriteMemory(GetModuleHandleA("samp.dll") + 0x9C0A0, (void*)4, 0x0008C2); патч срабатывал, Но игра крашилась
был вариант
WriteMemory(GetModuleHandleA("samp.dll") + 0x9C0A0, (uint8_t*)0x0008C2, 4); нихера не срабатывало, а игра все равно крашилась
крч помогите плз💞
как ты вообще собрал это если вместо wpm у тебя луашная функция
C++:
Код:
unsigned
long
sampGetBase
=
reinterpret_cast
(
GetModuleHandleA
(
"samp.dll"
)
)
;
unsigned
long
data
=
0x000008C2
;
WriteProcessMemory
(
GetCurrentProcess
(
)
,
reinterpret_cast
(
sampGetBase
+
0x9C0A0
)
,
&
data
,
4
,
NULL
)
;
WriteProcessMemory function (memoryapi.h) - Win32 apps
Writes data to an area of memory in a specified process. The entire area to be written to must be accessible or the operation fails.
learn.microsoft.com
|
|
|
|
 |
|
Предыдущая тема
Следующая тема
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|