Fix startup crash

This commit is contained in:
Grinch_ 2021-06-04 19:20:47 +06:00
parent 8b69bba17a
commit 6a9c4ee1e2
3 changed files with 12 additions and 2 deletions

View File

@ -163,8 +163,16 @@ void CheatMenu::ApplyStyle()
void MenuThread(void* param)
{
static bool game_init = false;
// Wait till the game is initialized
Sleep(3000);
Events::processScriptsEvent += []
{
game_init = true;
};
while (!game_init)
Sleep(1000);
if (GetModuleHandle("SAMP.dll"))
{

View File

@ -2,5 +2,5 @@
#define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "2.7"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20210522"
#define BUILD_NUMBER "20210604"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"

View File

@ -284,6 +284,8 @@ void Visual::Draw()
if (ImGui::BeginChild("VisualsChild"))
{
ImGui::TextWrapped("These options won't work if you got any mods that drastically changes the game hud. i.e. Mobile Hud, GTA 5 Hud etc.");
ImGui::Spacing();
Ui::ColorPickerAddress("Armourbar color", *(int*)0x5890FC, ImVec4(180, 25, 29, 255));
Ui::EditAddress<float>("Armourbar posX ", 0x866B78, -999, 94, 999);
Ui::EditAddress<float>("Armourbar posY ", 0x862D38, -999, 48, 999);