CSGO: Drawing Money on scoreboard
I found code and slightly edited it for my phook godlike paste. basically, i want to draw enemy team money when i press tab. My code does nothing. Any ideas why it is not working?
P.s This is not a rage feature, but a legit.
Here is my code
void misc::MoneyReveal(CInput::CUserCmd* cmd, C_BaseEntity *local)
{
//if (GetAsyncKeyState(VK_TAB)) {
if (cmd->buttons & IN_SCORE && g_Options.Misc.MoneyReveal) {
static int y = 350;
for (int i = 1; i <= 64; i++) {
C_BaseEntity *pEntity = g_EntityList->GetClientEntity(i);
player_info_t Info;
if (!g_Engine->GetPlayerInfo(i, &Info))
continue;
if (pEntity == nullptr || Info.fakeplayer)
continue;
if (pEntity->GetTeamNum() == local->GetTeamNum())
continue;
if (local->GetTeamNum() == TEAM_CS_T) {
// 1030, 354 when localp is on t side.
//g_Render->DrawString2(1030, y, Color::Blue(), ALIGN_RIGHT, "$%i", pEntity->GetMoney());
g_Render->DrawString2(g_Render->font.Money, 1030, y, Color::Red(), FONT_CENTER, "$%i", pEntity->GetMoney());
}
else if (local->GetTeamNum() == TEAM_CS_CT) {
// 1030, 604 when localp is on ct side.
g_Render->DrawString2(g_Render->font.Money, 1030, y + 250, Color::Red(), FONT_RIGHT, "$%i", pEntity->GetMoney());
}
y += 28;
}
y = 350;
}
}
and
void MoneyReveal(CInput::CUserCmd* cmd, C_BaseEntity *local);
also, not quite sure but i am calling from misc CreateMove
if (g_Options.Misc.MoneyReveal)
MoneyReveal(cmd, local);
Edit1: Not CreateMove.h. it is misc createmove. but it doesn’t really matter.
|