Form App C++ Function activation

Posts 1–14 of 14 · Page 1 of 1
Form App C++ Function activation
Hi, again
I got my Game.h defining vars in it, my offsets are on my main.cpp and my Form is the hack.h

I'm doing like this in hack.h
Code:
	private: System::Void checkBox3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) { //GLOW ESP ENABLE
		enmp = !enmp;
	}

	private: System::Void checkBox4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) { //TEAM ESP ENABLE
		teamesp = !teamesp;
	}

	private: System::Void checkBox5_CheckedChanged(System::Object^  sender, System::EventArgs^  e) { //C4
		c4esp = !c4esp;
	}

	private: System::Void checkBox6_CheckedChanged(System::Object^  sender, System::EventArgs^  e) { //CHICKEN
		chickenesp = !chickenesp;
	}

	private: System::Void comboBox1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) { //SELECT COLOR
		if (comboBox1->SelectedItem == "Red")
		{
			re = 255;
			ge = 0;
			be = 0;
		}
		else if (comboBox1->SelectedItem == "Water")
		{
			re = 255;
			ge = 0;
			be = 0;
		}
		else if (comboBox1->SelectedItem == "Health Base")
		{

		}
		else if (comboBox1->SelectedItem == "Pink")
		{
			re = 255;
			ge = 0;
			be = 0;
		}
		else if (comboBox1->SelectedItem == "Orange")
		{
			re = 255;
			ge = 0;
			be = 0;
		}
		else if (comboBox1->SelectedItem == "White")
		{
			re = 255;
			ge = 0;
			be = 0;
		}
	}
And at my main.cpp
Code:
if (enmp) {
        whorules(re, ge, be, 1.0f);
}
...
void whorules (float r, float g, float b, float thick)
{
checkers...dormant...blablabla
DrawGlow(..., r, g, b, thick);
}
...
Already tested if is changing the vars to true or false, and it is, but it is not calling the whorules function :/
And yes i the function whorules is before int main

-----------------
Just made a "no-hand" test... to check if is working, adding this to if (enmp) ... WritePrivateProfileString("OFFSETS2", "LOCALPLAYER", CStringify(offLocalPlayer), iniFile);, and it only writes after the program closes, can someone help me?
Major tip:
Dont use CLR

(I'll read the thread see if I can help anyway)

EDIT:
Possibly need more code from main.cpp (Or wherever your entry is)

Are you using threads?
When does this happen?

Code:
if (enmp) {
        whorules(re, ge, be, 1.0f);
}
Now i'm using threads, i got it "Working"... Glows only one player, and when i go to window console app, works perfect normal
ThreadStart ^ t_Glow = gcnew ThreadStart(&Glow);
Thread ^ GlowESPThread = gcnew Thread(t_Glow);
GlowESPThread->Start();

//OPEN APP...

GlowESPThread->Abort();

And now in the void Glow()

void Glow() {
while(true) {
if(enmp) {
//GLOW
}
}
}

Just glowing one player :/

----------
the if (enmp) happens when i check a checkbox, i already tested and it is working
Quote Originally Posted by PhY'z View Post
Now i'm using threads, i got it "Working"... Glows only one player, and when i go to window console app, works perfect normal
ThreadStart ^ t_Glow = gcnew ThreadStart(&Glow);
Thread ^ GlowESPThread = gcnew Thread(t_Glow);
GlowESPThread->Start();

//OPEN APP...

GlowESPThread->Abort();

And now in the void Glow()

void Glow() {
while(true) {
if(enmp) {
//GLOW
}
}
}

Just glowing one player :/

----------
the if (enmp) happens when i check a checkbox, i already tested and it is working
Do you even loop through the glowobjects table?
Quote Originally Posted by gtaplayer2 View Post
Do you even loop through the glowobjects table?
Yes, my glow code is perfect working in Console App, loops, check dormant, check team, check if health base (life check color) is enable) then Draw

But now when i actvate by using the Form, glow just 1 person.
How should we tell you what you are doing wrong if you post almost no code? How are we supposed to help you with the code posted above? Post some more code and we might be able to help you.
Quote Originally Posted by WasserEsser View Post
How should we tell you what you are doing wrong if you post almost no code? How are we supposed to help you with the code posted above? Post some more code and we might be able to help you.
That's the "Code"
Code:
void GlowESP() {
	while (true) {
		if (enmp) {
			DWORD pointerGlow = mem.Read<DWORD>(modClient.dwBase + offGlow);
			if (pointerGlow != NULL) {
				for (int i = 0; i < 64; i++) {
					DWORD mObj = pointerGlow + i * sizeof(GlowObject);
					GlowObject glowObj = mem.Read<GlowObject>(mObj);
					if (glowObj.pEntity != NULL) {
						if (!dormant) {
							if (team != MyTeam) {
								DrawGlow(mObj, r, g, b, 1.00f);
							}
							else {
								DrawGlow(mObj, 0, 0, 255, 1.00f);
							}
						}
					}
				}
			}
		}
		Sleep(1);
	}
}
And i check the dormant and the team after if (GlowObj.pEntity != NULL) every thing inside the function
Quote Originally Posted by PhY'z View Post
That's the "Code"
Code:
void GlowESP() {
    while (true) {
        if (enmp) {
            DWORD pointerGlow = mem.Read<DWORD>(modClient.dwBase + offGlow);
            if (pointerGlow != NULL) {
                for (int i = 0; i < 64; i++) {
                    DWORD mObj = pointerGlow + i * sizeof(GlowObject);
                    GlowObject glowObj = mem.Read<GlowObject>(mObj);
                    if (glowObj.pEntity != NULL) {
                        if (!dormant) {
                            if (team != MyTeam) {
                                DrawGlow(mObj, r, g, b, 1.00f);
                            }
                            else {
                                DrawGlow(mObj, 0, 0, 255, 1.00f);
                            }
                        }
                    }
                }
            }
        }
        Sleep(1);
    }
}
And i check the dormant and the team after if (GlowObj.pEntity != NULL) every thing inside the function
Where are you getting dormant and team from?
And why
Code:
DWORD mObj = pointerGlow + i * sizeof(GlowObject);
GlowObject glowObj = mem.Read<GlowObject>(mObj);
Just do
Code:
GlowObject glowObj = mem.Read<GlowObject>(pointerGlow + i * sizeof(GlowObject););
C+P without looking what it is?
Quote Originally Posted by Chris View Post

Where are you getting dormant and team from?
And why
Code:
DWORD mObj = pointerGlow + i * sizeof(GlowObject);
GlowObject glowObj = mem.Read<GlowObject>(mObj);
Just do
Code:
GlowObject glowObj = mem.Read<GlowObject>(pointerGlow + i * sizeof(GlowObject););
C+P without looking what it is?
C+P?? No...

For dormant and my team and entity team i use struct, and they work perfect,
mem.Read<bool>(glowObj.pEntity + offIsDormant);
mem.Read<int>(PlayerBase + offEntityTeam); //myteam
mem.Read<int>(BaseEntity + offEntityTeam); //entitylist team
and then i do other check if (ClassID == CLASSID_Player)
As i said... everything works in CONSOLE app, but now in Form app don't
-------------
oops dormant i don't use struct
Quote Originally Posted by PhY'z View Post
C+P?? No...

I guess you just use the same code and variable names as this by coincidence.
Quote Originally Posted by Chris View Post


I guess you just use the same code and variable names as this by coincidence.
Code:
[30/07/2015 15:49:39] Chris Denton: Try this :P
[30/07/2015 15:49:40] Chris Denton: void whorules() {
 me.dwBase = mem.Read<DWORD>(modClient.dwBase + offLocalPlayer);
 ReadData(&me, true);
 DWORD pointerGlow = mem.Read<DWORD>(modClient.dwBase + offGlow);
 int objectCount = mem.Read<int>(modClient.dwBase + offGlow + 0x4);
 if (pointerGlow != NULL) {
  for (int i = 0; i < objectCount; i++) {
   GlowObjectDefinition_t glowObj = mem.Read<GlowObjectDefinition_t>(pointerGlow + i * sizeof(GlowObjectDefinition_t));
   if (glowObj.pEntity != NULL) {
    int team = mem.Read<int>(glowObj.pEntity + 0xF0);
    if (team == me.team) glowObj.vm = 0.0f, glowObj.vr = 0.5f, glowObj.az = 0.0f;
    else glowObj.vm = 0.5f, glowObj.vr = 0.0f, glowObj.az = 0.0f;
    glowObj.ap = 1.0f;
    glowObj.m_bRenderWhenOccluded = TRUE;
    glowObj.m_bRenderWhenUnoccluded = FALSE;
    glowObj.m_bFullBloom = FALSE;
    mem.Write<GlowObjectDefinition_t>(pointerGlow + i * sizeof(GlowObjectDefinition_t), glowObj);
   }
  }
 }
}
Then i edited it, used ClassID, did other GlowDraw, add dormant, team check using structure...
That's why your name is in the credits ¬¬' Don't blame me, you helped me...

And it is not about the glow, it is about not displaying other entitys ... The glow works totally perfect in CONSOLE, i'm trying to create the FORM APP, but when i migrate the code, just happens to display only one

PS: Sorry for the Conversation History, but don't "shoot" or say what you can't prove, and sorry again, i don't meant to be rude :/
I'm just making sure you don't forget where you got what info from, it's good to know who helped you.
Changing a Console App to a Windows Forms App with changing the Variables via Checkboxes in the Windows Form has NOTHING to do with your code. It doesn't change your code at all. If it somehow stops working, and you can't find the fix, you copy pasted something without understanding what the code does. Converting a console app with given variables (like trigger on/off) which you can change via hotkeys to a Windows Forms app where you change your variables with checkbox event handlers isn't going to interact with your code at all other than changing the variables like trigger on/off. And if you can't find the solution on why the code only displays one entity, you simply copy pasted without knowing what you are even doing.

I would suggest sitting down for a day, learning the basics of C++, and look what the code REALLY does. There are enough Source Codes out there, and every single one is doing the same thing. They follow a certain way of displaying the Glow. Understand THAT WAY, think about a method you can do it yourself, and do it. The Windows Form only changes your on/off variable.

inVincibleV2PublicReleaseⓘ is a Source Code which is commented af, where i describe almost every single line of code. Even though it is outdated and has some coding habits i woulnd't do anymore, it's very useful for beginners. If you REALLY know C++, you can follow the Source Code easily. And once again, if you really know C++, you can do your own Glow ESP just by looking at Source Codes. Otherwise, i would suggest learning C++ first.
Quote Originally Posted by WasserEsser View Post
Changing a Console App to a Windows Forms App with changing the Variables via Checkboxes in the Windows Form has NOTHING to do with your code. It doesn't change your code at all. If it somehow stops working, and you can't find the fix, you copy pasted something without understanding what the code does. Converting a console app with given variables (like trigger on/off) which you can change via hotkeys to a Windows Forms app where you change your variables with checkbox event handlers isn't going to interact with your code at all other than changing the variables like trigger on/off. And if you can't find the solution on why the code only displays one entity, you simply copy pasted without knowing what you are even doing.

I would suggest sitting down for a day, learning the basics of C++, and look what the code REALLY does. There are enough Source Codes out there, and every single one is doing the same thing. They follow a certain way of displaying the Glow. Understand THAT WAY, think about a method you can do it yourself, and do it. The Windows Form only changes your on/off variable.

inVincibleV2PublicRelease is a Source Code which is commented af, where i describe almost every single line of code. Even though it is outdated and has some coding habits i woulnd't do anymore, it's very useful for beginners. If you REALLY know C++, you can follow the Source Code easily. And once again, if you really know C++, you can do your own Glow ESP just by looking at Source Codes. Otherwise, i would suggest learning C++ first.
.--. I already solved, i can't edit the other reply dunno why, was my fault... somehow the DeBug dont show me an struct error, anyway thnx,
Eveything works correct... My Trigger, My No Flash, My Radar, My RCS, but i was wondering why only My glow ESP wasn't doing correct, stills wondering why it don't displayed the error and only 1 player, btw i got it, cyz (; and Thx
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us