commit
deb6acbd80
@ -16,7 +16,9 @@ namespace followbot
|
|||||||
|
|
||||||
// Followed entity, externed for highlight color
|
// Followed entity, externed for highlight color
|
||||||
extern int follow_target;
|
extern int follow_target;
|
||||||
|
extern bool followcart;
|
||||||
extern CatVar followbot;
|
extern CatVar followbot;
|
||||||
|
extern CatVar roambot;
|
||||||
extern CatVar follow_steam;
|
extern CatVar follow_steam;
|
||||||
void DrawTick();
|
void DrawTick();
|
||||||
void WorldTick();
|
void WorldTick();
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
namespace re {
|
namespace re
|
||||||
|
{
|
||||||
class CTFInventoryManager
|
class CTFInventoryManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -22,11 +23,13 @@ class CEconItem
|
|||||||
public:
|
public:
|
||||||
unsigned long long uniqueid();
|
unsigned long long uniqueid();
|
||||||
};
|
};
|
||||||
class CTFPlayerInventory {
|
class CTFPlayerInventory
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
CTFPlayerInventory() = delete;
|
CTFPlayerInventory() = delete;
|
||||||
static CTFPlayerInventory *GTFPlayerInventory();
|
static CTFPlayerInventory *GTFPlayerInventory();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CEconItem *GetFirstItemOfItemDef(int id);
|
CEconItem *GetFirstItemOfItemDef(int id);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
9
src/hacks/Achievement.cpp
Executable file → Normal file
9
src/hacks/Achievement.cpp
Executable file → Normal file
@ -39,10 +39,11 @@ void Lock()
|
|||||||
|
|
||||||
void Unlock()
|
void Unlock()
|
||||||
{
|
{
|
||||||
/*auto Invmng = re::CTFInventoryManager::GTFInventoryManager();
|
/*auto Invmng = re::CTFInventoryManager::GTFInventoryManager();
|
||||||
auto Inv = re::CTFPlayerInventory::GTFPlayerInventory();
|
auto Inv = re::CTFPlayerInventory::GTFPlayerInventory();
|
||||||
auto Item = Inv->GetFirstItemOfItemDef(59);
|
auto Item = Inv->GetFirstItemOfItemDef(59);
|
||||||
Invmng->EquipItemInLoadout(0, 0, (unsigned long long int)Item->uniqueid());*/
|
Invmng->EquipItemInLoadout(0, 0, (unsigned long long
|
||||||
|
int)Item->uniqueid());*/
|
||||||
if (safety)
|
if (safety)
|
||||||
{
|
{
|
||||||
ConColorMsg(
|
ConColorMsg(
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
|
||||||
void CreateMove() {
|
void CreateMove()
|
||||||
auto preset = g_ICvar->FindCommand("load_itempreset");
|
{
|
||||||
const CCommand cmd;
|
auto preset = g_ICvar->FindCommand("load_itempreset");
|
||||||
|
const CCommand cmd;
|
||||||
}
|
}
|
||||||
|
5
src/hacks/AutoHeal.cpp
Executable file → Normal file
5
src/hacks/AutoHeal.cpp
Executable file → Normal file
@ -44,7 +44,8 @@ static CatEnum vacc_sniper_enum({ "NEVER", "ZOOM & VISIBLE", "ANY ZOOMED" });
|
|||||||
static CatVar vacc_sniper(vacc_sniper_enum, "auto_vacc_sniper_pop", "1",
|
static CatVar vacc_sniper(vacc_sniper_enum, "auto_vacc_sniper_pop", "1",
|
||||||
"Pop if Sniper",
|
"Pop if Sniper",
|
||||||
"Defines Auto-Vacc behaviour with snipers");
|
"Defines Auto-Vacc behaviour with snipers");
|
||||||
static CatVar ignore(CV_STRING, "autoheal_ignore", "", "Ignore", "Ignore people with this name");
|
static CatVar ignore(CV_STRING, "autoheal_ignore", "", "Ignore",
|
||||||
|
"Ignore people with this name");
|
||||||
|
|
||||||
int ChargeCount()
|
int ChargeCount()
|
||||||
{
|
{
|
||||||
@ -566,7 +567,7 @@ int HealingPriority(int idx)
|
|||||||
g_IEngine->GetPlayerInfo(idx, &info);
|
g_IEngine->GetPlayerInfo(idx, &info);
|
||||||
info.name[31] = 0;
|
info.name[31] = 0;
|
||||||
if (strcasestr(info.name, ignore.GetString()))
|
if (strcasestr(info.name, ignore.GetString()))
|
||||||
priority = 0.0f;
|
priority = 0.0f;
|
||||||
return priority;
|
return priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ Timer req_timer{};
|
|||||||
"Bypass Party restrictions");*/
|
"Bypass Party restrictions");*/
|
||||||
void UpdateSearch()
|
void UpdateSearch()
|
||||||
{
|
{
|
||||||
// segfaults for no reason
|
// segfaults for no reason
|
||||||
/*static bool calld = false;
|
/*static bool calld = false;
|
||||||
if (party_bypass && !calld) {
|
if (party_bypass && !calld) {
|
||||||
static unsigned char patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
|
static unsigned char patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
|
||||||
@ -90,7 +90,8 @@ void UpdateSearch()
|
|||||||
tfmm::queue_start();
|
tfmm::queue_start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (req_timer.test_and_set(1800000)) {
|
if (req_timer.test_and_set(1800000))
|
||||||
|
{
|
||||||
logging::Info("Starting queue");
|
logging::Info("Starting queue");
|
||||||
tfmm::queue_start();
|
tfmm::queue_start();
|
||||||
}
|
}
|
||||||
|
2
src/hacks/CatBot.cpp
Executable file → Normal file
2
src/hacks/CatBot.cpp
Executable file → Normal file
@ -118,7 +118,7 @@ void update_catbot_list()
|
|||||||
if (strcasestr(info.name, "cat-bot") ||
|
if (strcasestr(info.name, "cat-bot") ||
|
||||||
strcasestr(info.name, "just disable vac tf") ||
|
strcasestr(info.name, "just disable vac tf") ||
|
||||||
strcasestr(info.name, "raul.garcia") ||
|
strcasestr(info.name, "raul.garcia") ||
|
||||||
strcasestr(info.name, "zCat") ||
|
strcasestr(info.name, "zCat") ||
|
||||||
strcasestr(info.name, "lagger bot"))
|
strcasestr(info.name, "lagger bot"))
|
||||||
{
|
{
|
||||||
if (human_detecting_map.find(info.friendsID) ==
|
if (human_detecting_map.find(info.friendsID) ==
|
||||||
|
@ -17,8 +17,9 @@ namespace followbot
|
|||||||
|
|
||||||
CatVar followbot(CV_SWITCH, "fb", "0", "Followbot Switch",
|
CatVar followbot(CV_SWITCH, "fb", "0", "Followbot Switch",
|
||||||
"Set to 1 in followbots' configs");
|
"Set to 1 in followbots' configs");
|
||||||
static CatVar roambot(CV_SWITCH, "fb_roaming", "1", "Roambot",
|
bool followcart = false;
|
||||||
"Followbot will roam free, finding targets it can");
|
CatVar roambot(CV_SWITCH, "fb_roaming", "1", "Roambot",
|
||||||
|
"Followbot will roam free, finding targets it can");
|
||||||
static CatVar draw_crumb(CV_SWITCH, "fb_draw", "1", "Draw crumbs",
|
static CatVar draw_crumb(CV_SWITCH, "fb_draw", "1", "Draw crumbs",
|
||||||
"Self explanitory");
|
"Self explanitory");
|
||||||
static CatVar follow_distance(CV_INT, "fb_distance", "175", "Follow Distance",
|
static CatVar follow_distance(CV_INT, "fb_distance", "175", "Follow Distance",
|
||||||
@ -103,25 +104,38 @@ void WorldTick()
|
|||||||
if ((!follow_target || change) && roambot)
|
if ((!follow_target || change) && roambot)
|
||||||
{
|
{
|
||||||
// Try to get a new target
|
// Try to get a new target
|
||||||
auto ent_count = g_IEngine->GetMaxClients();
|
auto ent_count = HIGHEST_ENTITY;
|
||||||
for (int i = 0; i < ent_count; i++)
|
for (int i = 0; i < HIGHEST_ENTITY; i++)
|
||||||
{
|
{
|
||||||
auto entity = ENTITY(i);
|
auto entity = ENTITY(i);
|
||||||
if (CE_BAD(entity)) // Exist + dormant
|
if (CE_BAD(entity)) // Exist + dormant
|
||||||
continue;
|
continue;
|
||||||
if (entity->m_Type != ENTITY_PLAYER)
|
if (!followcart)
|
||||||
continue;
|
if (entity->m_Type != ENTITY_PLAYER)
|
||||||
|
continue;
|
||||||
if (entity == LOCAL_E) // Follow self lol
|
if (entity == LOCAL_E) // Follow self lol
|
||||||
continue;
|
continue;
|
||||||
if (!entity->m_bAlivePlayer ||
|
if (!entity->m_bAlivePlayer) // Dont follow dead players
|
||||||
entity->m_iTeam ==
|
|
||||||
LOCAL_E->m_iTeam) // Dont follow dead players
|
|
||||||
continue;
|
continue;
|
||||||
if (follow_activation &&
|
if (follow_activation &&
|
||||||
entity->m_flDistance > (float) follow_activation)
|
entity->m_flDistance > (float) follow_activation)
|
||||||
continue;
|
continue;
|
||||||
if (!VisCheckEntFromEnt(LOCAL_E, entity))
|
if (!VisCheckEntFromEnt(LOCAL_E, entity))
|
||||||
continue;
|
continue;
|
||||||
|
const model_t *model =
|
||||||
|
ENTITY(follow_target)->InternalEntity()->GetModel();
|
||||||
|
if (followcart && model &&
|
||||||
|
(lagexploit::pointarr[0] || lagexploit::pointarr[1] ||
|
||||||
|
lagexploit::pointarr[2] || lagexploit::pointarr[3] ||
|
||||||
|
lagexploit::pointarr[4]) &&
|
||||||
|
(model == lagexploit::pointarr[0] ||
|
||||||
|
model == lagexploit::pointarr[1] ||
|
||||||
|
model == lagexploit::pointarr[2] ||
|
||||||
|
model == lagexploit::pointarr[3] ||
|
||||||
|
model == lagexploit::pointarr[4]))
|
||||||
|
follow_target = entity->m_IDX;
|
||||||
|
if (entity->m_Type != ENTITY_PLAYER)
|
||||||
|
continue;
|
||||||
if (follow_target &&
|
if (follow_target &&
|
||||||
ENTITY(follow_target)->m_flDistance >
|
ENTITY(follow_target)->m_flDistance >
|
||||||
entity->m_flDistance) // favor closer entitys
|
entity->m_flDistance) // favor closer entitys
|
||||||
|
@ -355,12 +355,14 @@ void CreateMove()
|
|||||||
|
|
||||||
void DrawText()
|
void DrawText()
|
||||||
{
|
{
|
||||||
if (god_mode)
|
if (god_mode)
|
||||||
for (int i = 0; i < 40000; i++) {
|
for (int i = 0; i < 40000; i++)
|
||||||
g_ISurface->PlaySound("vo/demoman_cloakedspy03.mp3");
|
{
|
||||||
god_mode = 0;
|
g_ISurface->PlaySound("vo/demoman_cloakedspy03.mp3");
|
||||||
}
|
god_mode = 0;
|
||||||
if (!no_homo) {
|
}
|
||||||
|
if (!no_homo)
|
||||||
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
g_IEngine->GetScreenSize(width, height);
|
g_IEngine->GetScreenSize(width, height);
|
||||||
|
|
||||||
@ -368,18 +370,23 @@ void DrawText()
|
|||||||
int step = (height / 7);
|
int step = (height / 7);
|
||||||
|
|
||||||
// Go through steps creating a rainbow screen
|
// Go through steps creating a rainbow screen
|
||||||
for (int i = 1; i < 8; i++) {
|
for (int i = 1; i < 8; i++)
|
||||||
|
{
|
||||||
// Get Color and set opacity to %50
|
// Get Color and set opacity to %50
|
||||||
colors::rgba_t gaybow = colors::FromHSL(fabs(sin((g_GlobalVars->curtime / 2.0f) + (i / 1.41241))) * 360.0f, 0.85f, 0.9f);
|
colors::rgba_t gaybow = colors::FromHSL(
|
||||||
|
fabs(sin((g_GlobalVars->curtime / 2.0f) + (i / 1.41241))) *
|
||||||
|
360.0f,
|
||||||
|
0.85f, 0.9f);
|
||||||
gaybow.a = .5;
|
gaybow.a = .5;
|
||||||
// Draw next step
|
// Draw next step
|
||||||
draw_api::draw_rect(0, step * (i - 1), width, (step * i) - (step * (i - 1)), gaybow);
|
draw_api::draw_rect(0, step * (i - 1), width,
|
||||||
|
(step * i) - (step * (i - 1)), gaybow);
|
||||||
}
|
}
|
||||||
|
|
||||||
//int size_x;
|
// int size_x;
|
||||||
//FTGL_StringLength(string.data, fonts::font_main, &size_x);
|
// FTGL_StringLength(string.data, fonts::font_main, &size_x);
|
||||||
//FTGL_Draw(string.data, draw_point.x - size_x / 2, draw_point.y,fonts::font_main, color);
|
// FTGL_Draw(string.data, draw_point.x - size_x / 2,
|
||||||
|
// draw_point.y,fonts::font_main, color);
|
||||||
}
|
}
|
||||||
if (show_spectators)
|
if (show_spectators)
|
||||||
{
|
{
|
||||||
|
@ -1191,89 +1191,27 @@ void Move()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!prevlvlname)
|
prevlvlname = g_IEngine->GetLevelName();
|
||||||
prevlvlname = g_IEngine->GetLevelName();
|
|
||||||
std::string prvlvlname = format(prevlvlname);
|
std::string prvlvlname = format(prevlvlname);
|
||||||
logging::Info("%s", prevlvlname);
|
logging::Info("%s %s", prevlvlname, prvlvlname.c_str());
|
||||||
if (boost::contains(prvlvlname, "pl_"))
|
if (boost::contains(prvlvlname, "pl_") || boost::contains(prvlvlname, "cp_"))
|
||||||
{
|
{
|
||||||
|
logging::Info("1");
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if (lagexploit::pointarr[0] || lagexploit::pointarr[1] ||
|
if (lagexploit::pointarr[0] || lagexploit::pointarr[1] ||
|
||||||
lagexploit::pointarr[2] || lagexploit::pointarr[3] ||
|
lagexploit::pointarr[2] || lagexploit::pointarr[3] ||
|
||||||
lagexploit::pointarr[4])
|
lagexploit::pointarr[4])
|
||||||
for (int i = 0; i < MAX_ENTITIES; i++)
|
|
||||||
{
|
|
||||||
if (!ret)
|
|
||||||
{
|
|
||||||
CachedEntity *ent = ENTITY(i);
|
|
||||||
if (!CE_GOOD(ent))
|
|
||||||
continue;
|
|
||||||
if (ent->m_iTeam == LOCAL_E->m_iTeam)
|
|
||||||
continue;
|
|
||||||
const model_t *model = RAW_ENT(ent)->GetModel();
|
|
||||||
if (model)
|
|
||||||
{
|
|
||||||
if ((model == lagexploit::pointarr[1] ||
|
|
||||||
model == lagexploit::pointarr[2] ||
|
|
||||||
model == lagexploit::pointarr[3] ||
|
|
||||||
model == lagexploit::pointarr[4]) &&
|
|
||||||
ent->m_flDistance < 400.0f &&
|
|
||||||
IsVectorVisible(g_pLocalPlayer->v_Eye,
|
|
||||||
ent->m_vecOrigin))
|
|
||||||
{
|
|
||||||
index_t node = CreateNode(ent->m_vecOrigin);
|
|
||||||
auto &n = state::nodes[node];
|
|
||||||
if (g_pUserCmd->buttons & IN_DUCK)
|
|
||||||
n.flags |= NF_DUCK;
|
|
||||||
if (g_pUserCmd->buttons & IN_JUMP)
|
|
||||||
n.flags |= NF_JUMP;
|
|
||||||
if (state::node_good(state::active_node))
|
|
||||||
{
|
|
||||||
auto &c = state::nodes[state::active_node];
|
|
||||||
n.link(state::active_node);
|
|
||||||
c.link(node);
|
|
||||||
logging::Info("[wb] Node %u auto-linked to "
|
|
||||||
"node %u at (%.2f %.2f %.2f)",
|
|
||||||
node, state::active_node, c.x,
|
|
||||||
c.y, c.z);
|
|
||||||
}
|
|
||||||
state::last_node_buttons = g_pUserCmd->buttons;
|
|
||||||
state::active_node = node;
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (ent->m_flDistance < 500.0f &&
|
|
||||||
IsVectorVisible(g_pLocalPlayer->v_Eye,
|
|
||||||
ent->m_vecOrigin))
|
|
||||||
{
|
|
||||||
index_t node = CreateNode(ent->m_vecOrigin);
|
|
||||||
auto &n = state::nodes[node];
|
|
||||||
if (g_pUserCmd->buttons & IN_DUCK)
|
|
||||||
n.flags |= NF_DUCK;
|
|
||||||
if (g_pUserCmd->buttons & IN_JUMP)
|
|
||||||
n.flags |= NF_JUMP;
|
|
||||||
if (state::node_good(state::active_node))
|
|
||||||
{
|
|
||||||
auto &c = state::nodes[state::active_node];
|
|
||||||
n.link(state::active_node);
|
|
||||||
c.link(node);
|
|
||||||
logging::Info("[wb] Node %u auto-linked to "
|
|
||||||
"node %u at (%.2f %.2f %.2f)",
|
|
||||||
node, state::active_node, c.x,
|
|
||||||
c.y, c.z);
|
|
||||||
}
|
|
||||||
state::last_node_buttons = g_pUserCmd->buttons;
|
|
||||||
state::active_node = node;
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (erasedelay > 6 && nodes.size() > 0)
|
|
||||||
{
|
{
|
||||||
nodes.erase(nodes.begin());
|
hacks::shared::followbot::followbot = 1;
|
||||||
erasedelay = 0;
|
hacks::shared::followbot::roambot = 1;
|
||||||
|
hacks::shared::followbot::followcart = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hacks::shared::followbot::followbot = 0;
|
||||||
|
hacks::shared::followbot::roambot = 0;
|
||||||
|
hacks::shared::followbot::followcart = false;
|
||||||
}
|
}
|
||||||
erasedelay++;
|
|
||||||
}
|
}
|
||||||
if (nodes.size() == 0)
|
if (nodes.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -112,10 +112,11 @@ static CatVar debug_projectiles(CV_SWITCH, "debug_projectiles", "0",
|
|||||||
|
|
||||||
static CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag");
|
static CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag");
|
||||||
static CatVar serverlag_amount(
|
static CatVar serverlag_amount(
|
||||||
CV_INT, "serverlag", "0",
|
CV_INT, "serverlag", "0", "serverlag",
|
||||||
"serverlag", "Lag the server by spamming this many voicecommands per tick");
|
"Lag the server by spamming this many voicecommands per tick");
|
||||||
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
||||||
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers", "Crash servers by spamming signon net messages");
|
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
|
||||||
|
"Crash servers by spamming signon net messages");
|
||||||
bool *bSendPackets;
|
bool *bSendPackets;
|
||||||
bool CreateMove_hook(void *thisptr, float inputSample, CUserCmd *cmd)
|
bool CreateMove_hook(void *thisptr, float inputSample, CUserCmd *cmd)
|
||||||
{
|
{
|
||||||
@ -519,15 +520,17 @@ bool CreateMove_hook(void *thisptr, float inputSample, CUserCmd *cmd)
|
|||||||
if (cmd)
|
if (cmd)
|
||||||
g_Settings.last_angles = cmd->viewangles;
|
g_Settings.last_angles = cmd->viewangles;
|
||||||
}
|
}
|
||||||
if (serverlag_amount || votelogger::antikick_ticks) {
|
if (serverlag_amount || votelogger::antikick_ticks)
|
||||||
if (votelogger::antikick_ticks) {
|
{
|
||||||
votelogger::antikick_ticks--;
|
if (votelogger::antikick_ticks)
|
||||||
for (int i = 0; i < (int) 70; i++)
|
{
|
||||||
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
votelogger::antikick_ticks--;
|
||||||
}
|
for (int i = 0; i < (int) 70; i++)
|
||||||
else
|
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
||||||
for (int i = 0; i < (int) serverlag_amount; i++)
|
}
|
||||||
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
else
|
||||||
|
for (int i = 0; i < (int) serverlag_amount; i++)
|
||||||
|
g_IEngine->ServerCmd("use", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PROF_END("CreateMove");
|
// PROF_END("CreateMove");
|
||||||
|
@ -1041,7 +1041,7 @@ void LevelInit_hook(void *_this, const char *newmap)
|
|||||||
static const LevelInit_t original =
|
static const LevelInit_t original =
|
||||||
(LevelInit_t) hooks::clientmode.GetMethod(offsets::LevelInit());
|
(LevelInit_t) hooks::clientmode.GetMethod(offsets::LevelInit());
|
||||||
playerlist::Save();
|
playerlist::Save();
|
||||||
votelogger::antikick_ticks = 0;
|
votelogger::antikick_ticks = 0;
|
||||||
hacks::shared::lagexploit::bcalled = false;
|
hacks::shared::lagexploit::bcalled = false;
|
||||||
typedef bool *(*LoadNamedSkys_Fn)(const char *);
|
typedef bool *(*LoadNamedSkys_Fn)(const char *);
|
||||||
uintptr_t addr =
|
uintptr_t addr =
|
||||||
|
@ -7,31 +7,43 @@
|
|||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
using namespace re;
|
using namespace re;
|
||||||
|
|
||||||
CTFInventoryManager *CTFInventoryManager::GTFInventoryManager() {
|
CTFInventoryManager *CTFInventoryManager::GTFInventoryManager()
|
||||||
typedef CTFInventoryManager *(*GTFInventoryManager_t)();
|
{
|
||||||
uintptr_t address = gSignatures.GetClientSignature("55 A1 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 89 E5 56 53 83 EC ? 8B 5D ? C7 44 24 ? ? ? ? ?");
|
typedef CTFInventoryManager *(*GTFInventoryManager_t)();
|
||||||
GTFInventoryManager_t GTFInventoryManager_fn = GTFInventoryManager_t(address);
|
uintptr_t address = gSignatures.GetClientSignature(
|
||||||
return GTFInventoryManager_fn();
|
"55 A1 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 89 E5 56 53 83 EC ? 8B "
|
||||||
|
"5D ? C7 44 24 ? ? ? ? ?");
|
||||||
|
GTFInventoryManager_t GTFInventoryManager_fn =
|
||||||
|
GTFInventoryManager_t(address);
|
||||||
|
return GTFInventoryManager_fn();
|
||||||
}
|
}
|
||||||
bool CTFInventoryManager::EquipItemInLoadout(int slot, int classid, unsigned long long uniqueid) {
|
bool CTFInventoryManager::EquipItemInLoadout(int slot, int classid,
|
||||||
typedef bool (*fn_t)(void*, int, int, unsigned long long);
|
unsigned long long uniqueid)
|
||||||
return vfunc<fn_t>(
|
{
|
||||||
this, offsets::PlatformOffset(19, offsets::undefined, 19),
|
typedef bool (*fn_t)(void *, int, int, unsigned long long);
|
||||||
0)(this, slot, classid, uniqueid);
|
return vfunc<fn_t>(this,
|
||||||
|
offsets::PlatformOffset(19, offsets::undefined, 19),
|
||||||
|
0)(this, slot, classid, uniqueid);
|
||||||
}
|
}
|
||||||
unsigned long long int CEconItem::uniqueid() {
|
unsigned long long int CEconItem::uniqueid()
|
||||||
return *((unsigned long long int*) this + 36);
|
{
|
||||||
|
return *((unsigned long long int *) this + 36);
|
||||||
}
|
}
|
||||||
CTFPlayerInventory *CTFPlayerInventory::GTFPlayerInventory() {
|
CTFPlayerInventory *CTFPlayerInventory::GTFPlayerInventory()
|
||||||
typedef CTFPlayerInventory *(*GTFPlayerInventory_t)();
|
{
|
||||||
uintptr_t address = gSignatures.GetClientSignature("55 B8 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 B8 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 89 E5 57 56 53 83 EC ? 8B 45 ? 8B 5D ?");
|
typedef CTFPlayerInventory *(*GTFPlayerInventory_t)();
|
||||||
GTFPlayerInventory_t GTFPlayerInventory_fn = GTFPlayerInventory_t(address);
|
uintptr_t address = gSignatures.GetClientSignature(
|
||||||
return GTFPlayerInventory_fn();
|
"55 B8 ? ? ? ? 89 E5 5D C3 8D B6 00 00 00 00 55 B8 ? ? ? ? 89 E5 5D C3 "
|
||||||
|
"8D B6 00 00 00 00 55 89 E5 57 56 53 83 EC ? 8B 45 ? 8B 5D ?");
|
||||||
|
GTFPlayerInventory_t GTFPlayerInventory_fn = GTFPlayerInventory_t(address);
|
||||||
|
return GTFPlayerInventory_fn();
|
||||||
}
|
}
|
||||||
CEconItem *CTFPlayerInventory::GetFirstItemOfItemDef(int id) {
|
CEconItem *CTFPlayerInventory::GetFirstItemOfItemDef(int id)
|
||||||
typedef CEconItem *(*GetFirstItemOfItemDef_t)(CTFPlayerInventory*, int);
|
{
|
||||||
uintptr_t address = gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC ? 8B 4D ? 0F B7 45 ?");
|
typedef CEconItem *(*GetFirstItemOfItemDef_t)(CTFPlayerInventory *, int);
|
||||||
GetFirstItemOfItemDef_t GetFirstItemOfItemDef_fn = GetFirstItemOfItemDef_t(address);
|
uintptr_t address = gSignatures.GetClientSignature(
|
||||||
return GetFirstItemOfItemDef_fn(this, id);
|
"55 89 E5 57 56 53 83 EC ? 8B 4D ? 0F B7 45 ?");
|
||||||
|
GetFirstItemOfItemDef_t GetFirstItemOfItemDef_fn =
|
||||||
|
GetFirstItemOfItemDef_t(address);
|
||||||
|
return GetFirstItemOfItemDef_fn(this, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,9 @@ namespace votelogger
|
|||||||
static CatVar enabled(CV_SWITCH, "votelog", "0", "Log votes");
|
static CatVar enabled(CV_SWITCH, "votelog", "0", "Log votes");
|
||||||
static CatVar requeue(CV_SWITCH, "votelog_requeue", "1",
|
static CatVar requeue(CV_SWITCH, "votelog_requeue", "1",
|
||||||
"Auto requeue on vote kick", "Auto requeue on vote kick");
|
"Auto requeue on vote kick", "Auto requeue on vote kick");
|
||||||
static CatVar anti_votekick(CV_SWITCH, "anti_votekick", "0", "requires votelog", "Prevent votekicks by lagging the server in a way that every vote comes in delayed");
|
static CatVar anti_votekick(CV_SWITCH, "anti_votekick", "0", "requires votelog",
|
||||||
|
"Prevent votekicks by lagging the server in a way "
|
||||||
|
"that every vote comes in delayed");
|
||||||
int antikick_ticks = 0;
|
int antikick_ticks = 0;
|
||||||
void user_message(bf_read &buffer, int type)
|
void user_message(bf_read &buffer, int type)
|
||||||
{
|
{
|
||||||
@ -45,16 +47,17 @@ void user_message(bf_read &buffer, int type)
|
|||||||
{
|
{
|
||||||
steamID = info.friendsID;
|
steamID = info.friendsID;
|
||||||
}
|
}
|
||||||
if (eid == LOCAL_E->m_IDX) {
|
if (eid == LOCAL_E->m_IDX)
|
||||||
|
{
|
||||||
islocalplayer = true;
|
islocalplayer = true;
|
||||||
if (anti_votekick) {
|
if (anti_votekick)
|
||||||
antikick_ticks = 600;
|
{
|
||||||
|
antikick_ticks = 600;
|
||||||
for (int i = 0; i < (int) 70; i++)
|
for (int i = 0; i < (int) 70; i++)
|
||||||
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
g_IEngine->ServerCmd("voicemenu 0 0", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
logging::Info("Vote called to kick %s [U:1:%u] for %s", name, steamID,
|
logging::Info("Vote called to kick %s [U:1:%u] for %s", name, steamID,
|
||||||
reason);
|
reason);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user