Добавил в проект StringCompressor.cpp, но потом вылезла ошибка о не подключении к main.h, при добавлении в main.h выскочили ошибкиright click on .cpp -> add to project
my game crash when i use this, if I change it manually with Cheat Engine it works fine, but if I do it from the .asi plugin the game crashes, can somebody help me?C++:DWORD samp = GetModuleHandle("samp.dll"); *(DWORD*)(samp + 0x68B0C) = hpHigh; *(DWORD*)(samp + 0x68B33) = hpLow;
Change memory protection of these two addresses with VirtualProtect() (for example to PAGE_EXECUTE_READWRITE), change the values and then restore the protection. Cheat Engine do it automaticallymy game crash when i use this, if I change it manually with Cheat Engine it works fine, but if I do it from the .asi plugin the game crashes, can somebody help me?
I did, but it still doesn't work for meChange memory protection of these two addresses with VirtualProtect(), change the values and then restore the protection. Cheat Engine do it automatically
I did, but it still doesn't work for me
Есть ли в c++ аналог memory.tostring из луа ( тоесть чтение строки памяти)
C-Style string view:Есть ли в c++ аналог memory.tostring из луа ( тоесть чтение строки памяти)
const char* str = reinterpret_cast<const char*>(address);
std::string_view str{reinterpret_cast<const char*>(address)/*, [optional] size*/};
std::string str{reinterpret_cast<const char*>(address)/*, [optional] size*/};
What exactly you need?How can I get the color in hexadecimal format of this ImGui::ColorPicker ?
Посмотреть вложение 153216
If I can get both values that would be great, if not enough with string hex colorWhat exactly you need?
ImVec4 -> int color?
ImVec4 -> string hex color?
If I can get both values that would be great, if not enough with string hex color
ImVec4 color{};
// ImGui::ColorEdit
unsigned long u32_color = IM_COL32(color.x, color.y, color.z, color.w);
// or
auto u32_color = ImGui::ColorConvertFloat4ToU32(color);
std::string str_color{};
str_color.reserve(8); // SSO is used, there isn't allocation. Just in case
std::to_chars(str_color.data(), str_color.data() + str_color.capacity(), u32_color, 16);
C-Style string view:
string-view:C++:const char* str = reinterpret_cast<const char*>(address);
string copy:C++:std::string_view str{reinterpret_cast<const char*>(address)/*, [optional] size*/};
C++:std::string str{reinterpret_cast<const char*>(address)/*, [optional] size*/};
HMODULE samp = GetModuleHandle("samp.dll");
const char* str = reinterpret_cast<const char*>(samp + 0x11A2F8);
SF->getSAMP()->getChat()->AddChatMessage(-1, str);