mirror of
https://github.com/0TheSpy/Seaside.git
synced 2025-09-19 20:26:10 +08:00
Add files via upload
This commit is contained in:
@ -37,40 +37,22 @@ public:
|
||||
EventListener()
|
||||
{
|
||||
if (!iff.g_pGameEvents->AddListener(this, "bullet_impact", false))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cout << "Can't add listener bullet_impact\n";
|
||||
#endif
|
||||
}
|
||||
printfdbg("Can't add listener bullet_impact\n");
|
||||
|
||||
|
||||
if (!iff.g_pGameEvents->AddListener(this, "player_hurt", false))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cout << "Can't add listener player_hurt\n";
|
||||
#endif
|
||||
}
|
||||
printfdbg("Can't add listener player_hurt\n");
|
||||
|
||||
|
||||
if (!iff.g_pGameEvents->AddListener(this, "vote_cast", false))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cout << "Can't add listener vote_cast\n";
|
||||
#endif
|
||||
}
|
||||
printfdbg("Can't add listener vote_cast\n");
|
||||
|
||||
|
||||
if (!iff.g_pGameEvents->AddListener(this, "game_newmap", false))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::cout << "Can't add listener game_newmap\n";
|
||||
#endif
|
||||
}
|
||||
printfdbg("Can't add listener game_newmap\n");
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
std::cout << "Event Listener created\n";
|
||||
#endif
|
||||
printfdbg("Event Listener created\n");
|
||||
|
||||
}
|
||||
|
||||
@ -103,52 +85,23 @@ public:
|
||||
|
||||
if (hitgroup == 1)
|
||||
{
|
||||
bool badInput = false;
|
||||
int i_dec = 0;
|
||||
|
||||
if (*g_Options.hitsound) {
|
||||
try
|
||||
{
|
||||
i_dec = std::stoi(g_Options.hspath.value->mystring);
|
||||
//iff.g_pEngineClient->ExecuteClientCmd("play hitsound_crit.wav");
|
||||
char pathtosnd[MAX_PATH] = "play ";
|
||||
strcat(pathtosnd, g_Options.hspath.value->mystring);
|
||||
iff.g_pEngineClient->ExecuteClientCmd(pathtosnd);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
badInput = true;
|
||||
PlaySoundA(g_Options.hspath.value->mystring, NULL, SND_ASYNC);
|
||||
}
|
||||
|
||||
if (!badInput && FindResource(opt.hModuleGlobal, MAKEINTRESOURCE(i_dec), "WAVE")) {
|
||||
PlaySoundA((char*)i_dec, opt.hModuleGlobal, SND_RESOURCE | SND_ASYNC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (*g_Options.hitmarker)
|
||||
bulletdata.push_back(bullet(userid, pos, dmg_health, 1, iff.g_pGlobals->curtime));
|
||||
}
|
||||
else
|
||||
{
|
||||
bool badInput = false;
|
||||
int i_dec = 0;
|
||||
|
||||
if (*g_Options.hitsound) {
|
||||
try
|
||||
{
|
||||
i_dec = std::stoi(g_Options.obpath.value->mystring);
|
||||
char pathtosnd[MAX_PATH] = "play ";
|
||||
strcat(pathtosnd, g_Options.obpath.value->mystring);
|
||||
iff.g_pEngineClient->ExecuteClientCmd(pathtosnd);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
badInput = true;
|
||||
PlaySoundA(g_Options.obpath.value->mystring, NULL, SND_ASYNC);
|
||||
}
|
||||
|
||||
if (!badInput && FindResource(opt.hModuleGlobal, MAKEINTRESOURCE(i_dec), "WAVE")) {
|
||||
PlaySoundA((char*)i_dec, opt.hModuleGlobal, SND_RESOURCE | SND_ASYNC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (*g_Options.hitmarker)
|
||||
bulletdata.push_back(bullet(userid, pos, dmg_health, 0, iff.g_pGlobals->curtime));
|
||||
|
@ -331,6 +331,7 @@ bool __fastcall hkSendNetMsg(void* channel, uint32_t, INetMessage* msg, bool rel
|
||||
|
||||
inline void HookNetchannel()
|
||||
{
|
||||
//iff.g_pClientState->m_NetChannel
|
||||
DWORD ptrShutdown = *((DWORD*)iff.g_pEngineClient->GetNetChannelInfo()) + 36 * 4;
|
||||
DWORD addrShutdown = *(DWORD*)ptrShutdown;
|
||||
oShutdown = (pShutdown)DetourFunction(
|
||||
@ -368,13 +369,80 @@ float scaleDamageArmor(float flDamage, int armor_value)
|
||||
return flDamage;
|
||||
}
|
||||
|
||||
namespace prediction {
|
||||
void start(CUserCmd* cmd, C_BasePlayer* localplayer);
|
||||
void end(C_BasePlayer* localplayer);
|
||||
|
||||
inline CMoveData m_MoveData;
|
||||
inline float m_flOldCurtime;
|
||||
inline float m_flOldFrametime;
|
||||
inline int* m_pPredictionRandomSeed;
|
||||
};
|
||||
|
||||
void prediction::start(CUserCmd* cmd, C_BasePlayer* localplayer) {
|
||||
|
||||
//printfdbg("prediction run\n");
|
||||
|
||||
if (!m_pPredictionRandomSeed)
|
||||
m_pPredictionRandomSeed = *reinterpret_cast<int**>(FindPatternV2("client.dll", "8B 0D ? ? ? ? BA ? ? ? ? E8 ? ? ? ? 83 C4 04") + 2);
|
||||
*m_pPredictionRandomSeed = cmd->random_seed & 0x7FFFFFFF;
|
||||
m_flOldCurtime = iff.g_pGlobals->curtime;
|
||||
m_flOldFrametime = iff.g_pGlobals->frametime;
|
||||
iff.g_pGlobals->curtime = localplayer->GetTickBase() * iff.g_pGlobals->interval_per_tick;
|
||||
iff.g_pGlobals->frametime = iff.g_pGlobals->interval_per_tick;
|
||||
iff.g_pGameMovement->StartTrackPredictionErrors(localplayer);
|
||||
memset(&m_MoveData, 0, sizeof(m_MoveData));
|
||||
iff.g_pMoveHelper->SetHost_v((CBaseEntity*)localplayer);
|
||||
iff.g_pPrediction->SetupMove_v(localplayer, cmd, iff.g_pMoveHelper, &m_MoveData);
|
||||
iff.g_pGameMovement->ProcessMovement(localplayer, &m_MoveData);
|
||||
iff.g_pPrediction->FinishMove_v(localplayer, cmd, &m_MoveData);
|
||||
}
|
||||
|
||||
void prediction::end(C_BasePlayer* localplayer) {
|
||||
|
||||
//printfdbg("prediction end\n");
|
||||
|
||||
iff.g_pGameMovement->FinishTrackPredictionErrors(localplayer);
|
||||
iff.g_pMoveHelper->SetHost_v(nullptr);
|
||||
*m_pPredictionRandomSeed = -1;
|
||||
iff.g_pGlobals->curtime = m_flOldCurtime;
|
||||
iff.g_pGlobals->frametime = m_flOldFrametime;
|
||||
}
|
||||
|
||||
|
||||
void fastStop(C_BasePlayer* localplayer, int flags, CUserCmd* cmd) noexcept
|
||||
{
|
||||
if (!localplayer || localplayer->GetLifeState() != LIFE_ALIVE)
|
||||
return;
|
||||
|
||||
if (localplayer->GetMoveType() == MOVETYPE_NOCLIP || localplayer->GetMoveType() == MOVETYPE_LADDER || !(flags & FL_ONGROUND) || cmd->buttons & IN_JUMP)
|
||||
return;
|
||||
|
||||
if (cmd->buttons & (IN_MOVELEFT | IN_MOVERIGHT | IN_FORWARD | IN_BACK))
|
||||
return;
|
||||
|
||||
const auto velocity = localplayer->GetVelocity();
|
||||
const auto speed = velocity.length2D();
|
||||
if (speed < 15.0f)
|
||||
return;
|
||||
|
||||
Vector direction = velocity.toAngle();
|
||||
direction.y = cmd->viewangles.y - direction.y;
|
||||
|
||||
const auto negatedDirection = Vector::fromAngle(direction) * -speed;
|
||||
cmd->forwardmove = negatedDirection.x;
|
||||
cmd->sidemove = negatedDirection.y;
|
||||
}
|
||||
|
||||
|
||||
bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
|
||||
{
|
||||
static auto ofunc = ClientModeHook->GetOriginal<bool(__stdcall*)( float, CUserCmd*)>(24);
|
||||
|
||||
C_BasePlayer* local = static_cast<C_BasePlayer*>(iff.g_pEntityList->GetClientEntity(iff.g_pEngineClient->GetLocalPlayer()));
|
||||
const auto pre_flags = local->GetFlags();
|
||||
short localid = iff.g_pEngineClient->GetLocalPlayer();
|
||||
C_BasePlayer* localplayer = static_cast<C_BasePlayer*>(iff.g_pEntityList->GetClientEntity(localid));
|
||||
|
||||
const auto pre_flags = localplayer->GetFlags();
|
||||
|
||||
bool interval = !((pCmd->tick_count + 1) % 10);
|
||||
|
||||
@ -383,8 +451,8 @@ bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
|
||||
if (g_Options.fastduck)
|
||||
pCmd->buttons |= IN_BULLRUSH;
|
||||
|
||||
if (g_Options.bunnyhop && iff.g_pInputSystem->IsButtonDown(KEY_SPACE) && local->GetMoveType() != MOVETYPE_LADDER)
|
||||
if (!(pre_flags & (FL_ONGROUND)) && pCmd->buttons & (IN_JUMP))
|
||||
if (g_Options.bunnyhop && iff.g_pInputSystem->IsButtonDown(KEY_SPACE) && localplayer->GetMoveType() != MOVETYPE_LADDER)
|
||||
if (!(pre_flags & FL_ONGROUND) && pCmd->buttons & (IN_JUMP))
|
||||
{
|
||||
pCmd->buttons &= ~(IN_JUMP);
|
||||
|
||||
@ -397,9 +465,7 @@ bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
|
||||
}
|
||||
|
||||
|
||||
short localid = iff.g_pEngineClient->GetLocalPlayer();
|
||||
if (*g_Options.c4timer && *(C_GameRulesProxy**)iff.GameRulesProxy) {
|
||||
C_BasePlayer* localplayer = static_cast<C_BasePlayer*>(iff.g_pEntityList->GetClientEntity(localid));
|
||||
bool isbombplanted = (*(C_GameRulesProxy**)iff.GameRulesProxy)->IsBombPlanted();
|
||||
if (localplayer && isbombplanted)
|
||||
{
|
||||
@ -473,11 +539,37 @@ bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
|
||||
if (isSomeoneSpectatingYou) ShowMenu(spectatorList);
|
||||
}
|
||||
|
||||
if (g_Options.faststop)
|
||||
fastStop(localplayer, pre_flags, pCmd);
|
||||
|
||||
|
||||
/*
|
||||
if (localplayer)
|
||||
{
|
||||
prediction::start(pCmd, localplayer);
|
||||
|
||||
/*
|
||||
if (iff.g_pInputSystem->IsButtonDown(KEY_SPACE) && !(pre_flags & FL_ONGROUND) && (localplayer->GetFlags() & FL_ONGROUND))//predicting that we're gonna hit the ground
|
||||
{
|
||||
pCmd->buttons |= IN_DUCK;
|
||||
pCmd->buttons &= IN_JUMP;
|
||||
}
|
||||
|
||||
|
||||
prediction::end(localplayer);
|
||||
}
|
||||
|
||||
//*/
|
||||
|
||||
|
||||
pCmd->viewangles.Clamp();
|
||||
|
||||
return ofunc(frame_time, pCmd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
typedef const __int64(__cdecl* pDevMsg)(_In_z_ _Printf_format_string_ char const* const _Format, ...);
|
||||
pDevMsg oDevMsg; //(char* a1, int a2, char a3)
|
||||
__int64 __cdecl hkDevMsg(_In_z_ _Printf_format_string_ char const* const _Format, ...)
|
||||
@ -543,3 +635,30 @@ bool __fastcall hkDispatchUserMessage(void* thisptr, void*, int msg_type, int32
|
||||
|
||||
return ofunc(thisptr,msg_type,nFlags,size, &msg_data);
|
||||
}
|
||||
|
||||
//static auto element = FindHudElement("CCSGO_HudRadar"); //money from radarbase?
|
||||
typedef const int(__fastcall* pGetPlayerMoney)(void* _this, void* edx, int ent_index);
|
||||
pGetPlayerMoney oGetPlayerMoney;
|
||||
int __fastcall hkGetPlayerMoney(void* this_, void* edx, int ent_index)
|
||||
{
|
||||
static C_CS_PlayerResource** g_player_resource = C_CS_PlayerResource::GetPlayerResource();
|
||||
auto player = iff.g_pEntityList->GetClientEntity(ent_index);
|
||||
auto localplayer = ((C_BasePlayer*)iff.g_pEntityList->GetClientEntity(iff.g_pEngineClient->GetLocalPlayer()));
|
||||
|
||||
if (!*g_Options.moneyreveal || !player || !localplayer || !(*g_player_resource) || ((C_BasePlayer*)player)->GetTeam() == localplayer->GetTeam() ) return oGetPlayerMoney(this_, edx, ent_index);
|
||||
|
||||
if (player->IsDormant())
|
||||
{
|
||||
int money = (*g_player_resource)->GetMatchStats_CashEarned_Total()[ent_index] - (*g_player_resource)->GetTotalCashSpent()[ent_index];
|
||||
money += iff.g_pCVar->FindVar("mp_startmoney")->GetInt();
|
||||
int maxmoney = iff.g_pCVar->FindVar("mp_maxmoney")->GetInt();
|
||||
if (money > maxmoney) money = maxmoney;
|
||||
// printfdbg("Dormant %d Money %d (cash earned %d, total spent %d)\n", ent_index, money, (*g_player_resource)->GetMatchStats_CashEarned_Total()[ent_index], (*g_player_resource)->GetTotalCashSpent()[ent_index] );
|
||||
return money;
|
||||
}
|
||||
else
|
||||
{
|
||||
// printfdbg("NotDormant %d Money %d\n", ent_index, ((C_BasePlayer*)player)->GetAccount());
|
||||
return ((C_BasePlayer*)player)->GetAccount();
|
||||
}
|
||||
}
|
@ -63,7 +63,7 @@ void IF::Init()
|
||||
g_pStudioRender = (IStudioRender*)GetInterface("studiorender.dll", "VStudioRender026");
|
||||
g_pPrediction = (CPrediction*)GetInterface("client.dll", "VClientPrediction001");
|
||||
g_pGameTypes = (IGameTypes*)GetInterface("client.dll", "VENGINE_GAMETYPES_VERSION002");
|
||||
|
||||
g_pGameMovement = (IGameMovement*)GetInterface("client.dll", "GameMovement001");
|
||||
|
||||
typedef PVOID(__cdecl* oKeyValuesSystem)();
|
||||
oKeyValuesSystem pkeyValuesSystem = (oKeyValuesSystem)GetProcAddress(GetModuleHandleA("vstdlib.dll"), "KeyValuesSystem");
|
||||
@ -165,7 +165,8 @@ void IF::Init()
|
||||
HudUniqueAlerts = (CHudElement*)FindHudElement("CCSGO_HudUniqueAlerts");
|
||||
|
||||
GameRulesProxy = *(C_GameRulesProxy**)(FindPatternV2("client.dll", "A1 ? ? ? ? 85 C0 0F 84 ? ? ? ? 80 B8 ? ? ? ? ? 74 7A")+1); //C_GameRulesProxy
|
||||
dwRadarBase = FindPatternV2("client.dll", "A1 ? ? ? ? 8B 0C B0 8B 01 FF 50 ? 46 3B 35 ? ? ? ? 7C EA 8B 0D") + 1; //C_GameRulesProxy
|
||||
dwRadarBase = FindPatternV2("client.dll", "A1 ? ? ? ? 8B 0C B0 8B 01 FF 50 ? 46 3B 35 ? ? ? ? 7C EA 8B 0D") + 1;
|
||||
g_pMoveHelper = **reinterpret_cast<IMoveHelper***>(FindPatternV2("client.dll", "8B 0D ? ? ? ? 8B 46 08 68") + 2);
|
||||
}
|
||||
|
||||
|
||||
@ -278,4 +279,3 @@ void ShowMenu(std::string text)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define INTERFACES
|
||||
#pragma once
|
||||
|
||||
//#define DEBUG
|
||||
#define DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
#define printfdbg(data, ...) printf(XorStr(data), __VA_ARGS__)
|
||||
@ -71,6 +71,7 @@
|
||||
#include "sdk/isteamgamecoordinator.h"
|
||||
#include "sdk/gamerules.h"
|
||||
#include "sdk/igametypes.h"
|
||||
#include "sdk/gamemovement.h"
|
||||
|
||||
#include "XorStr.hpp"
|
||||
|
||||
@ -78,7 +79,7 @@ PVOID FindHudElement(const char* name);
|
||||
|
||||
auto is_code_ptr(void* ptr) -> bool;
|
||||
|
||||
#include "resource.h"
|
||||
//#include "resource.h"
|
||||
|
||||
class IF {
|
||||
public:
|
||||
@ -150,8 +151,14 @@ public:
|
||||
CHudElement* HudUniqueAlerts = nullptr;
|
||||
C_GameRulesProxy* GameRulesProxy = nullptr; //C_GameRulesProxy
|
||||
DWORD dwRadarBase = NULL;
|
||||
IMoveHelper* g_pMoveHelper = NULL; //CMoveHelperClient
|
||||
IGameMovement* g_pGameMovement = NULL;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
extern IF iff;
|
||||
|
||||
typedef void* (__cdecl* tCreateInterface)(const char* name, int* returnCode);
|
||||
|
@ -442,23 +442,24 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
|
||||
ImGui::Checkbox("Hit sound", g_Options.hitsound);
|
||||
DisableElements(*g_Options.hitsound, 1);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 7.0f);
|
||||
ImGui::TextInputComboBox("Head shot", g_Options.hspath.value->mystring, 255, opt.soundslist, 0);
|
||||
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 13.0f);
|
||||
ImGui::InputText("Head shot", g_Options.hspath.value->mystring, 256);
|
||||
DisableElements(*g_Options.hitsound, 0);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 13.0f);
|
||||
ImGui::Checkbox("Flashlight (L)", g_Options.flashlightON);
|
||||
DisableElements(*g_Options.flashlightON, 1);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 20.0f);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 7.0f);
|
||||
ImGui::TextInputComboBox("Path to .vmt ", g_Options.flashlightTexture.value->mystring, 255, opt.flashlightlist, 0);
|
||||
DisableElements(*g_Options.flashlightON, 0);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 13.0f);
|
||||
ImGui::Checkbox("Nightvision (N)", g_Options.nvgsON);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::Checkbox("Hit marker", g_Options.hitmarker);
|
||||
DisableElements(*g_Options.hitsound, 1);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 20.0f);
|
||||
ImGui::TextInputComboBox("Other bone", g_Options.obpath.value->mystring, 255, opt.soundslist, 0);
|
||||
ImGui::InputText("Other bone", g_Options.obpath.value->mystring, 256);
|
||||
DisableElements(*g_Options.hitsound, 0);
|
||||
DisableElements(*g_Options.flashlightON, 1);
|
||||
ImGui::Checkbox("Cast shadows", g_Options.flashlightShadows);
|
||||
@ -784,7 +785,11 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
ImGui::Checkbox("Via FindMDL hook", &g_Options.models.value->arr[selectedwep].findMDLmethode);
|
||||
DisableElements(selectedwep > 2 ? true : false, 0);
|
||||
ImGui::PushItemWidth(170.0f);
|
||||
|
||||
DisableElements(g_Options.models.value->arr[selectedwep].active,1);
|
||||
ImGui::InputText("Path to .mdl##viewmodel", g_Options.models.value->arr[selectedwep].vmodel_repl_temp, 256);
|
||||
DisableElements(g_Options.models.value->arr[selectedwep].active, 0);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::SameLine();
|
||||
@ -844,7 +849,9 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
}
|
||||
|
||||
ImGui::PushItemWidth(170.0f);
|
||||
DisableElements(g_Options.models.value->arr[selectedwep].active_w, 1);
|
||||
ImGui::InputText("Path to .mdl##worldmodel", g_Options.models.value->arr[selectedwep].wmodel_repl_temp, 256);
|
||||
DisableElements(g_Options.models.value->arr[selectedwep].active_w, 0);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::SameLine();
|
||||
@ -1820,7 +1827,6 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
@ -1854,17 +1860,21 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 10.0f);
|
||||
ImGui::Separator();
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f);
|
||||
|
||||
ImGui::Columns(3, nullptr, false);
|
||||
|
||||
ImGui::Checkbox("C4 timer", g_Options.c4timer);
|
||||
//
|
||||
style->ItemSpacing = ImVec2(7.0f, 10.0f); //10
|
||||
ImGui::Checkbox("Spectator list", g_Options.speclist);
|
||||
ImGui::Checkbox("Vote reveal", g_Options.votereveal);
|
||||
ImGui::Checkbox("Rank reveal", g_Options.rankreveal);
|
||||
ImGui::Checkbox("Spectator list", g_Options.speclist);
|
||||
ImGui::Checkbox("Money reveal", g_Options.moneyreveal);
|
||||
ImGui::Checkbox("Fast duck", g_Options.fastduck);
|
||||
ImGui::Checkbox("Fast stop", g_Options.faststop);
|
||||
ImGui::Checkbox("Slide walk", g_Options.slidewalk);
|
||||
|
||||
//ImGui::NextColumn();
|
||||
|
||||
/*
|
||||
if (ImGui::Checkbox("No postprocessing", g_Options.postproc))
|
||||
SetValueUnrestricted("mat_postprocess_enable", !g_Options.postproc);
|
||||
@ -1904,50 +1914,56 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
|
||||
ImGui::NextColumn();
|
||||
|
||||
style->ItemSpacing = ImVec2(7.0f, 10.0f);
|
||||
ImGui::Checkbox("C4 timer", g_Options.c4timer);
|
||||
ImGui::Checkbox("Bunny hop", g_Options.bunnyhop);
|
||||
style->ItemSpacing = ImVec2(7.0f, 17.0f);
|
||||
|
||||
if (ImGui::SliderFloat("Viewmodel pos X", g_Options.viewmodel_x, -90.0f, 90.0f))
|
||||
SetValueUnrestricted("viewmodel_offset_x", g_Options.viewmodel_x);
|
||||
if (ImGui::SliderFloat("Viewmodel pos Y", g_Options.viewmodel_y, -90.0f, 90.0f))
|
||||
SetValueUnrestricted("viewmodel_offset_y", g_Options.viewmodel_y);
|
||||
if (ImGui::SliderFloat("Viewmodel pos Z", g_Options.viewmodel_z, -90.0f, 90.0f))
|
||||
SetValueUnrestricted("viewmodel_offset_z", g_Options.viewmodel_z);
|
||||
ImGui::SliderFloat("Viewmodel ang X", g_Options.viewmodel_ang_x, -180.0f, 180.0f);
|
||||
ImGui::SliderFloat("Viewmodel ang Y", g_Options.viewmodel_ang_y, -180.0f, 180.0f);
|
||||
ImGui::SliderFloat("Viewmodel ang Z", g_Options.viewmodel_ang_z, -180.0f, 180.0f);
|
||||
|
||||
|
||||
ImGui::SliderFloat("FOV", g_Options.fov, 0, 360);
|
||||
|
||||
ImGui::NextColumn();
|
||||
|
||||
ImGui::Checkbox("Bunny hop", g_Options.bunnyhop);
|
||||
|
||||
style->ItemSpacing = ImVec2(7.0f, 10.0f);
|
||||
|
||||
DisableElements(*g_Options.bunnyhop, 1);
|
||||
ImGui::Checkbox("PLACEHOLDER", g_Options.jumpbug);
|
||||
ImGui::Checkbox("Auto strafe", g_Options.autostrafe);
|
||||
DisableElements(*g_Options.bunnyhop, 0);
|
||||
style->ItemSpacing = ImVec2(7.0f, 17.0f);
|
||||
|
||||
style->ItemSpacing = ImVec2(7.0f, 15.0f);
|
||||
|
||||
ImGui::SliderFloat("FOV", g_Options.fov, 0, 360);
|
||||
|
||||
if (ImGui::SliderFloat("Viewmodel FOV", g_Options.viewmodel_fov, 0, 180.0f))
|
||||
SetValueUnrestricted("viewmodel_fov", g_Options.viewmodel_fov);
|
||||
ImGui::SliderFloat("Viewmodel ang X", g_Options.viewmodel_ang_x, -180.0f, 180.0f);
|
||||
ImGui::SliderFloat("Viewmodel ang Y", g_Options.viewmodel_ang_y, -180.0f, 180.0f);
|
||||
ImGui::SliderFloat("Viewmodel ang Z", g_Options.viewmodel_ang_z, -180.0f, 180.0f);
|
||||
|
||||
|
||||
/*
|
||||
if (ImGui::SliderFloat("Aspect Ratio", g_Options.aspectratio, 0, 25.0f))
|
||||
SetValueUnrestricted("r_aspectratio", g_Options.aspectratio);
|
||||
|
||||
/*
|
||||
if (ImGui::InputFloat("Ragdoll Gravity", g_Options.ragdollgravity))
|
||||
iff.g_pCVar->FindVar("cl_ragdoll_gravity")->SetValue(g_Options.ragdollgravity);
|
||||
|
||||
if (ImGui::InputFloat("Ragdoll Timescale", g_Options.ragdolltime))
|
||||
SetValueUnrestricted("cl_phys_timescale", g_Options.ragdolltime);
|
||||
|
||||
if (ImGui::SliderFloat("Viewmodel FOV", g_Options.viewmodel_fov, 0, 180.0f))
|
||||
SetValueUnrestricted("viewmodel_fov", g_Options.viewmodel_fov);
|
||||
|
||||
*/
|
||||
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 67.0f);
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5.0f);
|
||||
if (ImGui::Button("Reset", ImVec2(70, 22)))
|
||||
ResetMisc();
|
||||
|
||||
|
||||
ImGui::Columns(1, nullptr, false);
|
||||
|
||||
ImGui::EndChild();
|
||||
@ -1962,14 +1978,10 @@ long __stdcall hkEndScene(IDirect3DDevice9* pDevice)
|
||||
style->ChildBorderSize = 0; style->WindowPadding = ImVec2(20.0f, 5.0f);
|
||||
if (ImGui::BeginChild("ChildTab", ImVec2(665, 350), true, ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_AlwaysUseWindowPadding)) {
|
||||
style->ChildBorderSize = 1; style->WindowPadding = ImVec2(20.0f, 20.0f);
|
||||
|
||||
ImGui::Columns(2, nullptr, false);
|
||||
|
||||
ImGui::NextColumn();
|
||||
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
*/
|
||||
|
@ -27,8 +27,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
class float3
|
||||
{
|
||||
public:
|
||||
@ -432,6 +430,13 @@ public:
|
||||
strcpy(this->classid, classid);
|
||||
};
|
||||
|
||||
Model(char name[32], char vmodel[32])
|
||||
{
|
||||
strcpy(this->name, name);
|
||||
strcpy(this->vmodel_repl_temp, vmodel);
|
||||
strcpy(this->vmodel_repl, vmodel);
|
||||
};
|
||||
|
||||
bool findMDLmethode = false;
|
||||
|
||||
char name[32] = "";
|
||||
@ -472,8 +477,8 @@ public:
|
||||
Models() {
|
||||
int i = 0;
|
||||
|
||||
arr[i] = Model((char*)"Agent T"); i++;
|
||||
arr[i] = Model((char*)"Agent CT"); i++;
|
||||
arr[i] = Model((char*)"Agent T", (char*)"models/player/zombie.mdl"); i++;
|
||||
arr[i] = Model((char*)"Agent CT",(char*)"models/player/zombie.mdl"); i++;
|
||||
arr[i] = Model((char*)"Arms"); i++;
|
||||
|
||||
arr[i] = Model((char*)"Knife", WEAPON_KNIFE_T, (char*)"CKnife", (char*)"models/weapons/v_knife_default_t.mdl", 1); i++;
|
||||
@ -594,8 +599,8 @@ public:
|
||||
OPTION(int, beamflags, 0x8300);
|
||||
|
||||
OPTION(bool, hitsound, false);
|
||||
OPTION(char256, hspath, char256("102"));
|
||||
OPTION(char256, obpath, char256("101"));
|
||||
OPTION(char256, hspath, char256("hitsound_crit.wav"));
|
||||
OPTION(char256, obpath, char256("hitsound_cod.wav"));
|
||||
|
||||
OPTION(bool, hitmarker, false);
|
||||
|
||||
@ -698,6 +703,10 @@ public:
|
||||
OPTION(bool, rankreveal, 0);
|
||||
OPTION(bool, speclist, 0);
|
||||
OPTION(bool, debugstuff, 0);
|
||||
OPTION(bool, faststop, 0);
|
||||
OPTION(bool, moneyreveal, 0);
|
||||
|
||||
OPTION(bool, jumpbug, 0);
|
||||
};
|
||||
|
||||
inline Options g_Options;
|
||||
@ -839,12 +848,6 @@ public:
|
||||
"sky_csgo_night_flat"
|
||||
};
|
||||
|
||||
std::vector<std::string> soundslist = {
|
||||
"101",
|
||||
"102",
|
||||
};
|
||||
|
||||
|
||||
std::vector<std::string> spriteslist = {
|
||||
"sprites/purplelaser1.vmt",
|
||||
"sprites/physbeam.vmt",
|
||||
|
@ -22,6 +22,7 @@ extern bool needupdate;
|
||||
#include "vmt_smart_hook.hpp"
|
||||
|
||||
|
||||
|
||||
struct iitem
|
||||
{
|
||||
iitem(int defindex1, std::string name1, std::string viewmodel1, std::string worldmodel1)
|
||||
|
@ -132,22 +132,28 @@ bool __fastcall hkFireEventClientSide(void* thisptr, void* edx, IGameEvent* even
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
C_CS_PlayerResource** g_player_resource;
|
||||
C_CS_PlayerResource** g_player_resource = NULL;
|
||||
|
||||
#include <array>
|
||||
bool Changer()
|
||||
{
|
||||
/*
|
||||
static bool initinterface = 0;
|
||||
if (!initinterface) {
|
||||
|
||||
const auto team_arr_prop = C_CS_PlayerResource::GetTeamProp();
|
||||
const auto team_prop = team_arr_prop->m_pDataTable->m_pProps;
|
||||
const auto proxy_addr = std::uintptr_t(team_prop->m_ProxyFn);
|
||||
g_player_resource = *reinterpret_cast<C_CS_PlayerResource***>(proxy_addr + 0x10);
|
||||
printfdbg("g_player_resource initiated %x\n", g_player_resource);
|
||||
|
||||
|
||||
//g_player_resource = C_CS_PlayerResource::GetPlayerResource();
|
||||
initinterface = 1;
|
||||
}
|
||||
*/
|
||||
|
||||
static C_CS_PlayerResource** g_player_resource = C_CS_PlayerResource::GetPlayerResource();
|
||||
|
||||
if (!iff.g_pEngineClient->IsConnected()) {
|
||||
return 0;
|
||||
@ -366,7 +372,6 @@ bool Changer()
|
||||
if (g_Options.weapons.value->arr[0].active && g_Options.weapons.value->arr[0].modelactive)
|
||||
{
|
||||
//can cause crash idk why
|
||||
/*
|
||||
static int lastmdlindex = -1;
|
||||
int curmdlindex = pViewModel->GetModelIndex();
|
||||
if (lastmdlindex != curmdlindex)
|
||||
@ -383,7 +388,6 @@ bool Changer()
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (view_model_weapon && is_knife(view_model_weapon->GetItemDefinitionIndex()))
|
||||
{
|
||||
@ -610,6 +614,10 @@ void InitSkinChanger()
|
||||
strcpy(g_Options.models.value->arr[cfgindex].vmodel_repl_temp, vmodel_orig);
|
||||
strcpy(g_Options.models.value->arr[cfgindex].vmodel_repl, vmodel_orig);
|
||||
|
||||
const char* wmodel_orig = kv->GetString("model_world");
|
||||
strcpy(g_Options.models.value->arr[cfgindex].wmodel_repl_temp, wmodel_orig);
|
||||
strcpy(g_Options.models.value->arr[cfgindex].wmodel_repl, wmodel_orig);
|
||||
|
||||
g_Options.materials.value->arr[cfgindex + 2].model_hash = fnv2::hash(vmodel_orig);
|
||||
|
||||
|
||||
|
@ -172,7 +172,7 @@
|
||||
<ClInclude Include="protobuffs.hpp" />
|
||||
<ClInclude Include="ProtoParse.h" />
|
||||
<ClInclude Include="proxies.hpp" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="resources.h" />
|
||||
<ClInclude Include="sdk\AnalogCode.h" />
|
||||
<ClInclude Include="sdk\animationlayer.h" />
|
||||
<ClInclude Include="sdk\annotations.h" />
|
||||
@ -277,6 +277,7 @@
|
||||
<ClInclude Include="sdk\gameconsole.h" />
|
||||
<ClInclude Include="sdk\GameEventListener.h" />
|
||||
<ClInclude Include="sdk\GameEventManager.h" />
|
||||
<ClInclude Include="sdk\gamemovement.h" />
|
||||
<ClInclude Include="sdk\gamerules.h" />
|
||||
<ClInclude Include="sdk\gamerules_register.h" />
|
||||
<ClInclude Include="sdk\gamestringpool.h" />
|
||||
@ -323,6 +324,7 @@
|
||||
<ClInclude Include="sdk\ifilelist.h" />
|
||||
<ClInclude Include="sdk\igameconsole.h" />
|
||||
<ClInclude Include="sdk\igameevents.h" />
|
||||
<ClInclude Include="sdk\igamemovement.h" />
|
||||
<ClInclude Include="sdk\IGameSystem.h" />
|
||||
<ClInclude Include="sdk\igametypes.h" />
|
||||
<ClInclude Include="sdk\IGameUI.h" />
|
||||
@ -591,17 +593,6 @@
|
||||
<ClCompile Include="Skinchanger.cpp" />
|
||||
<ClCompile Include="textinputcombobox.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="SpyCustom.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Media Include="cod.wav">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Media>
|
||||
<Media Include="crit.wav">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Media>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -108,9 +108,6 @@
|
||||
<ClInclude Include="detours.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="XorStr.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -1296,6 +1293,15 @@
|
||||
<ClInclude Include="sdk\worldsize.h">
|
||||
<Filter>Header Files\sdk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sdk\igamemovement.h">
|
||||
<Filter>Header Files\sdk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sdk\gamemovement.h">
|
||||
<Filter>Header Files\sdk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resources.h">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
@ -1353,17 +1359,4 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="SpyCustom.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Media Include="cod.wav">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Media>
|
||||
<Media Include="crit.wav">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Media>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -26,6 +26,7 @@ using namespace std;
|
||||
#include "Menu.hpp"
|
||||
#include "SkinChanger.hpp"
|
||||
|
||||
#include "resources.h"
|
||||
|
||||
void OnLevelInit()
|
||||
{
|
||||
@ -305,13 +306,30 @@ DWORD WINAPI HackThread(HMODULE hModule)
|
||||
}
|
||||
else
|
||||
{
|
||||
printfdbg("autoload NOT found, creatin mat\n");
|
||||
printfdbg("Autoload NOT found, creating material\n");
|
||||
g_Options.customtextures.value->arr[0].texturelink = CreateMaterial(
|
||||
string(g_Options.customtextures.value->arr[0].Name),
|
||||
string(g_Options.customtextures.value->arr[0].keyvalue));
|
||||
}
|
||||
|
||||
|
||||
ofstream loadcod("csgo/sound/hitsound_cod.wav", std::ios::binary);
|
||||
if (loadcod) {
|
||||
loadcod.write((char*)&hitsound_cod[0], sizeof(hitsound_cod));
|
||||
loadcod.close();
|
||||
}
|
||||
ofstream loadcrit("csgo/sound/hitsound_crit.wav", std::ios::binary);
|
||||
if (loadcrit) {
|
||||
loadcrit.write((char*)&hitsound_crit[0], sizeof(hitsound_crit));
|
||||
loadcrit.close();
|
||||
}
|
||||
|
||||
void* fn_getplmoney = (void*)FindPatternV2("client.dll", "55 8B EC 56 8B 75 08 83 FE 3F");
|
||||
if (fn_getplmoney)
|
||||
oGetPlayerMoney = (pGetPlayerMoney)DetourFunction(
|
||||
(PBYTE)(fn_getplmoney),
|
||||
(PBYTE)hkGetPlayerMoney);
|
||||
|
||||
while (!opt.unhook)
|
||||
{
|
||||
|
||||
@ -416,6 +434,8 @@ DWORD WINAPI HackThread(HMODULE hModule)
|
||||
if (ptrDevWarningMsg)
|
||||
DetourRemove(reinterpret_cast<BYTE*>(oDevWarningMsg), reinterpret_cast<BYTE*>(hkDevWarningMsg));
|
||||
|
||||
if (fn_getplmoney)
|
||||
DetourRemove(reinterpret_cast<BYTE*>(oGetPlayerMoney), reinterpret_cast<BYTE*>(hkGetPlayerMoney));
|
||||
|
||||
ImGui_ImplDX9_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
|
7
SpyCustom/resources.h
Normal file
7
SpyCustom/resources.h
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user