HelpProblem while looking for EnemyTeamNumber.

Posts 1–5 of 5 · Page 1 of 1
Problem while looking for EnemyTeamNumber.
Hey there.

I want to find out the teamnumber a specific player is in. It is the player my crosshair is aiming at.
I do understand how to get this information - at least i think so.
But there is problem i cannot solve..
This is why i posted this here. I will first show you some of the important code - then give you its output. I really dont know what i am doing wrong here, otherwise i would not post this.
Please give me a little help

The code to (what i think) read out the enemys team.

Code:
        DWORD cLocalPlayer;
	int Team;
	ReadProcessMemory(handle, (PBYTE*)(client + SpielerBasis), &cLocalPlayer, sizeof(DWORD), NULL);
        ReadProcessMemory(handle, (PBYTE*)(cLocalPlayer + chIDOff), &value, sizeof(int), NULL);

// To read out what i am aiming at.

        ReadProcessMemory(handle, (PBYTE*)(client + entitiyBase) + ((value - 1) * entityLoopDistance), &EnemyBase, sizeof(int), NULL);
	ReadProcessMemory(handle, (PBYTE*)(EnemyBase + teamOffset), &EnemyTeam, sizeof(int), NULL);

//To read out the players team i am aiming at.

	cout << "|||||" << value << "--" << Team << "--" << EnemyTeam << "|||||";

//To output the values to help me while coding.
My own teamnumber is shown me right in output, and i think the enemys id (saved in "value") seems to be right, too.
But the output for "EnemyTeam" is always an integer with a value of 858993460. Somehow i don't know how to solve this...

Would you guys please help me out a bit

BTW, sorry for my english, i am from Germany :P

Regards,

Madretsma
If it returns 858993460, then you are doing it wrong.
From what I understand, you want to get the Team Number of a player.

To do that, you need to Read the Player Base + m_iTeamNum !
m_iTeamNum is a netvar. The value is 0xF0 - Type: DWORD
Declare it like this: const DWORD m_iTeamNum = 0xF0;

You need to get the player base at witch you are aiming, and then read it. It should return: 2 = CT ; 3 = Terrorist
Quote Originally Posted by NightDev View Post
If it returns 858993460, then you are doing it wrong.
From what I understand, you want to get the Team Number of a player.

To do that, you need to Read the Player Base + m_iTeamNum !
m_iTeamNum is a netvar. The value is 0xF0 - Type: DWORD
Declare it like this: const DWORD m_iTeamNum = 0xF0;

You need to get the player base at witch you are aiming, and then read it. It should return: 2 = CT ; 3 = Terrorist
It isn't a DWORD, it is an int.

Code:
ReadProcessMemory(handle, (PBYTE*)(client + entitiyBase) + ((value - 1) * entityLoopDistance), &EnemyBase, sizeof(int), NULL);
That is wrong, that will ready the id of the enemy.

This might be wrong:
Code:
(PBYTE*)(client + entitiyBase) + ((value - 1) * entityLoopDistance)
// should be
(PBYTE*)((client + entitiyBase) + ((value - 1) * entityLoopDistance))
I was saying that 0xF0 = DWORD ... not what it returns... Goddamnit, cant you sleep without replying to me ?

Also: I'll give you tomorrow a way to get the team, it's 1:30 AM for me now and tomorrow I have exams...
Quote Originally Posted by Merccy2 View Post
This might be wrong:
Code:
(PBYTE*)(client + entitiyBase) + ((value - 1) * entityLoopDistance)
// should be
(PBYTE*)((client + entitiyBase) + ((value - 1) * entityLoopDistance))
That helped me alot, thank you sir
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us