ты уже второй бессмысленный совет даешь,смысл от твоих сообщений?в коде
ты уже второй бессмысленный совет даешь,смысл от твоих сообщений?в коде
Смысл от твоих вопрос если ты не прикрепляешь код к ним?ты уже второй бессмысленный совет даешь,смысл от твоих сообщений?
Смысл от твоих вопрос если ты не прикрепляешь код к ним?
pRender->render_String(150, 700, Color(255, 0, 255, 0), DT_LEFT | DT_SHADOW, "X:%.2f Y:%.2f Z:%.2f", GetPosX(), GetPosY(), GetPosZ());
float GetPosX()
{
float PlayerPosX;
p1 = *(DWORD*)0xB6F5F0 + 0x14;
p2 = *(DWORD*)p1 + 0x30;
memcpy(&PlayerPosX, (void*)p2, sizeof(PlayerPosX));
return PlayerPosX;
}
Перед чтением проверяй указатель на валидность.C++:pRender->render_String(150, 700, Color(255, 0, 255, 0), DT_LEFT | DT_SHADOW, "X:%.2f Y:%.2f Z:%.2f", GetPosX(), GetPosY(), GetPosZ());C++:float GetPosX() { float PlayerPosX; p1 = *(DWORD*)0xB6F5F0 + 0x14; p2 = *(DWORD*)p1 + 0x30; memcpy(&PlayerPosX, (void*)p2, sizeof(PlayerPosX)); return PlayerPosX; }
Начни с lua. Ты не понимаешь, что делаешьC++:pRender->render_String(150, 700, Color(255, 0, 255, 0), DT_LEFT | DT_SHADOW, "X:%.2f Y:%.2f Z:%.2f", GetPosX(), GetPosY(), GetPosZ());C++:float GetPosX() { float PlayerPosX; p1 = *(DWORD*)0xB6F5F0 + 0x14; p2 = *(DWORD*)p1 + 0x30; memcpy(&PlayerPosX, (void*)p2, sizeof(PlayerPosX)); return PlayerPosX; }
#include "plugin.h"
#include <experimental\filesystem>
class MyDocumentsDir {
public:
static void SetDocumentsDir() {
const char *documentsDir = "D:\\My Documents\\Hello World - My GTA SA Documents";
std::experimental::filesystem::create_directories(documentsDir);
strcpy(reinterpret_cast<char *>(0xC92368), documentsDir);
}
MyDocumentsDir() {
// skip registry checks
plugin::patch::SetUInt(0x744FD1, 0x9014C483);
plugin::patch::Nop(0x744FD5, 10);
plugin::patch::SetUInt(0x745001, 0x9018C483);
plugin::patch::Nop(0x745005, 10);
plugin::patch::SetUInt(0x745018, 0x9004C483);
plugin::patch::Nop(0x74501C, 16);
// set documents path
plugin::patch::RedirectCall(0x74503E, SetDocumentsDir);
plugin::patch::Nop(0x745048, 2);
}
} myDocumentsDir;
Меняй путь на шестой строке на свой.Нарыл код от DK22Pac, плагин позволяет произвольно сменить место хранения папки GTA San Andreas User Files
Я в Ц++ не БУБУ, подскажите, как указывать путь. Полагаю это на 18 строке
C++:#include "plugin.h" #include <experimental\filesystem> class MyDocumentsDir { public: static void SetDocumentsDir() { const char *documentsDir = "D:\\My Documents\\Hello World - My GTA SA Documents"; std::experimental::filesystem::create_directories(documentsDir); strcpy(reinterpret_cast<char *>(0xC92368), documentsDir); } MyDocumentsDir() { // skip registry checks plugin::patch::SetUInt(0x744FD1, 0x9014C483); plugin::patch::Nop(0x744FD5, 10); plugin::patch::SetUInt(0x745001, 0x9018C483); plugin::patch::Nop(0x745005, 10); plugin::patch::SetUInt(0x745018, 0x9004C483); plugin::patch::Nop(0x74501C, 16); // set documents path plugin::patch::RedirectCall(0x74503E, SetDocumentsDir); plugin::patch::Nop(0x745048, 2); } } myDocumentsDir;
NULL вместо названияКак прочесть запись в реестре (строку) если пункт с ней не именован?
Везде где учат читать строки у них есть название, так что гугл не помог
Запись приклеил к посту