Skip to content

Commit

Permalink
team switch (with keyboard)
Browse files Browse the repository at this point in the history
  • Loading branch information
Izocel committed Jan 22, 2025
1 parent d800090 commit 91b5d7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Application/Instances/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ class Player
lifeState = ReadEntity<int>(m_lifeState);
isAlive = lifeState == 256;

isLocalPlayer = GetLocalPlayer_T() == entity;
isTeammate = isLocalPlayer || ReadLocalPlayer<int>(m_iTeamNum) == team;
isLocalPlayer = name == "⭕⃤ ~Izo~ ⭕⃤";
isLocalPlayer = isLocalPlayer || (GetLocalPlayer_T() == entity);
crossIndex = isLocalPlayer ? ReadLocalPlayer<int>(m_iIDEntIndex) : -1;
isTeammate = isLocalPlayer || ReadLocalPlayer<int>(m_iTeamNum) == team;

sceneNode = ReadEntity<uintptr_t>(m_pGameSceneNode);
boneMatrix = Read<uintptr_t>(sceneNode + m_modelState + 0x80);
Expand Down
9 changes: 9 additions & 0 deletions Application/Modules/RootModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class RootModule : public Module
{
EspModule *Esp;
AimBotModule *AimBot;
int MY_TEAM = 1;

void Init() override
{
Expand All @@ -24,6 +25,12 @@ class RootModule : public Module

void Execute() override
{
// uses numpad-0 to toggle teams
if (GetAsyncKeyState(VK_NUMPAD0) & 1)
{
MY_TEAM = MY_TEAM + 1 > 3 ? 1 : MY_TEAM + 1;
}

ClientDimension = GetClientDimension();
ClientCenterPosition = GetClientCenterPosition();
VM = ReadClient<ViewMatrix>(dwViewMatrix);
Expand All @@ -46,6 +53,8 @@ class RootModule : public Module
if (!player.isInitialized)
continue;

player.isTeammate = player.isTeammate || player.team == MY_TEAM;

if (player.isLocalPlayer)
MyLocalPlayer = player;

Expand Down

0 comments on commit 91b5d7e

Please sign in to comment.