Add files via upload

This commit is contained in:
0TheSpy
2022-11-12 14:23:45 +03:00
committed by GitHub
parent bf98c803f5
commit f2a6cb14d4
18 changed files with 761 additions and 127 deletions

View File

@ -368,7 +368,7 @@ public:
int vote = event->GetInt("vote_option");
int id = event->GetInt("entityid");
short team = event->GetInt("team");
if (iff.g_pChatElement)
if (iff.g_ClientMode->m_pChatElement)
{
player_info_t pinfo;
iff.g_pEngineClient->GetPlayerInfo(id, &pinfo);
@ -382,7 +382,7 @@ public:
memcpy(team_byte, " \x08", 3); //gray
printfdbg("%d %s voted %d\n", team, pinfo.name, vote);
iff.g_pChatElement->ChatPrintf2(0, 0, std::string("").
iff.g_ClientMode->m_pChatElement->ChatPrintf_v(0, 0, std::string("").
//append(" \x06").
append(team_byte).
append(pinfo.name).

View File

@ -48,6 +48,7 @@ inline char* MakeControlChars(char str[1024]) {
if (name[i] == 0x0)
break;
}
return name;
}

View File

@ -1,6 +1,7 @@
#pragma once
#include "sdk/particles.h"
#include "ProtobuffMessages.h"
VMTHook* SoundHook = nullptr;
void __fastcall hkEmitSound1(void* _this, int edx, IRecipientFilter& filter, int iEntIndex, int iChannel, char* pSoundEntry, unsigned int nSoundEntryHash, const char* pSample, float flVolume, int nSeed, float flAttenuation, int iFlags, int iPitch, const Vector* pOrigin, const Vector* pDirection, void* pUtlVecOrigins, bool bUpdatePositions, float soundtime, int speakerentity, int unk) {
@ -306,11 +307,13 @@ typedef const bool(__thiscall* pSendNetMsg)(void*, INetMessage*, bool, bool);
pSendNetMsg oSendNetMsg;
bool __fastcall hkSendNetMsg(void* channel, uint32_t, INetMessage* msg, bool reliable, bool voice)
{
#ifdef DEBUG
if (*g_Options.debugstuff)
{
int type = msg->GetType();
if (type != net_Tick && type != svc_SendTable)
printfdbg("Packet %s %s\n", msg->GetName(), msg->ToString());
#endif
//printfdbg("NetMessage %s %s\n", msg->GetName(), msg->ToString());
iff.myConMsg("[Seaside] NetMessage %s %s\n", msg->GetName(), msg->ToString());
}
if (*g_Options.changing_name && msg->GetType() == net_SetConVar)
{
@ -345,6 +348,26 @@ inline void HookNetchannel()
opt.netchannedlhooked = 1;
}
float oldtick = 0; int c4id = 0;
float scaleDamageArmor(float flDamage, int armor_value)
{
float flArmorRatio = 0.5f;
float flArmorBonus = 0.5f;
if (armor_value > 0) {
float flNew = flDamage * flArmorRatio;
float flArmor = (flDamage - flNew) * flArmorBonus;
if (flArmor > static_cast<float>(armor_value)) {
flArmor = static_cast<float>(armor_value) * (1.f / flArmorBonus);
flNew = flDamage - flArmor;
}
flDamage = flNew;
}
return flDamage;
}
bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
{
@ -353,6 +376,8 @@ bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
C_BasePlayer* local = static_cast<C_BasePlayer*>(iff.g_pEntityList->GetClientEntity(iff.g_pEngineClient->GetLocalPlayer()));
const auto pre_flags = local->GetFlags();
bool interval = (pCmd->tick_count + 1) % 23 == 0;
if (g_Options.slidewalk)
pCmd->buttons ^= IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT;
if (g_Options.fastduck)
@ -364,7 +389,149 @@ bool __stdcall hkCreateMove(float frame_time, CUserCmd* pCmd)
pCmd->buttons &= ~(IN_JUMP);
}
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)
{
float tick = localplayer->GetTickBase() * iff.g_pGlobals->interval_per_tick;
if (!c4id)
for (int i = iff.g_pEngineClient->GetMaxClients() + 1; i <= iff.g_pEntityList->GetHighestEntityIndex() + 1; i++)
{
auto entityList = iff.g_pEntityList->GetClientEntity(i);
if (entityList && _tcsstr(entityList->GetClientClass()->GetName(), "CPlantedC4") != NULL && tick < ((CPlantedC4*)entityList)->GetC4Blow())
{
printfdbg("Found PlantedC4 %d (%f %f)\n", i, tick, ((CPlantedC4*)entityList)->GetC4Blow());
c4id = i;
break;
}
}
if (c4id) {
float C4Blow = ((CPlantedC4*)iff.g_pEntityList->GetClientEntity(c4id))->GetC4Blow();
if (interval)
{
//calc damage
const auto damagePercentage = 1.0f;
auto flDamage = 500.f; // 500 - default, if radius is not written on the map https://i.imgur.com/mUSaTHj.png
auto flBombRadius = flDamage * 3.5f;
auto flDistanceToLocalPlayer = (
(iff.g_pEntityList->GetClientEntity(c4id)->GetAbsOrigin() + ((C_BaseEntity*)iff.g_pEntityList->GetClientEntity(c4id))->GetViewOffset()) -
(localplayer->GetAbsOrigin() + localplayer->GetViewOffset()) ).Length();//
auto fSigma = flBombRadius / 3.0f;
auto fGaussianFalloff = exp(-flDistanceToLocalPlayer * flDistanceToLocalPlayer / (2.0f * fSigma * fSigma));
auto flAdjustedDamage = flDamage * fGaussianFalloff * damagePercentage;
flAdjustedDamage = scaleDamageArmor(flAdjustedDamage, localplayer->GetArmorValue());
int healthleft = localplayer->GetHealth() - flAdjustedDamage;
char str[0x100] = "";
//snprintf(str, 0x100, "C4 <font color=\"#ffff00\">%d</font> HP <font color=\"#%s\">%d</font>", (int)(C4Blow - tick), healthleft < 1 ? "ff0000" : "00ff00", healthleft);
//iff.HudUniqueAlerts->GetPanel2D()->ShowAlert_v(str, false);
snprintf(str, 0x100, "C4 explode in <font color=\"#%s\">%.*f</font> sec\x0", healthleft < 1 ? "ff0000" : "ffff00", 1, C4Blow - tick);
TextMsg(str);
}
}
}
else if (c4id) c4id = 0;
}
if (*g_Options.rankreveal && (pCmd->buttons & IN_SCORE) != 0) {
//credits https://www.unknowncheats.me/forum/counterstrike-global-offensive/331059-rank-reveal-sig-scanning.html
iff.g_pClient->DispatchUserMessage(CS_UM_ServerRankRevealAll, 0, 0, nullptr);
}
if (g_Options.speclist && interval)
{
string spectatorList = "Spectating you:\n \n";
bool isSomeoneSpectatingYou = false;
for (short i = 1; i < iff.g_pEngineClient->GetMaxClients() + 1; i++)
{
if (i == localid) continue;
C_BasePlayer* Entity = (C_BasePlayer*)iff.g_pEntityList->GetClientEntity(i);
if (Entity && Entity->GetLifeState() == LIFE_DEAD && Entity->GetObserverTarget() == localid)
{
isSomeoneSpectatingYou = true;
player_info_t pinfo;
iff.g_pEngineClient->GetPlayerInfo(i, &pinfo);
spectatorList.append(pinfo.name).append("\n");
}
}
if (isSomeoneSpectatingYou) ShowMenu(spectatorList);
}
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, ...)
{
int _Result;
va_list _ArgList;
__crt_va_start(_ArgList, _Format);
if (*g_Options.debugstuff) {
iff.myConMsg("[Seaside] DevMsg: ");
iff.myConMsg(_Format, _ArgList);
}
printfdbg("DevMsg: ");
_Result = _vfprintf_l(stdout, _Format, NULL, _ArgList);
__crt_va_end(_ArgList);
return oDevMsg(_Format, NULL, _ArgList);
}
typedef const __int64(__cdecl* pDevWarningMsg)(_In_z_ _Printf_format_string_ char const* const _Format, ...);
pDevMsg oDevWarningMsg;
__int64 __cdecl hkDevWarningMsg(_In_z_ _Printf_format_string_ char const* const _Format, ...)
{
int _Result;
va_list _ArgList;
__crt_va_start(_ArgList, _Format);
if (*g_Options.debugstuff) {
iff.myConMsg("[Seaside] DevWarningMsg: ");
iff.myConMsg(_Format, _ArgList);
}
printfdbg("DevWarningMsg: ");
_Result = _vfprintf_l(stdout, _Format, NULL, _ArgList);
__crt_va_end(_ArgList);
return oDevWarningMsg(_Format, NULL, _ArgList);
}
int msgcount = 0;
//sv_show_usermessage 2 //https://www.unknowncheats.me/forum/counterstrike-global-offensive/492173-dispatchusermessage-client-call.html
bool __fastcall hkDispatchUserMessage(void* thisptr, void*, int msg_type, int32 nFlags, int size, bf_read& msg_data)
{
printfdbg("DispatchUserMessage %d %d %d %x\n", msg_type, nFlags, size, &msg_data);
static auto ofunc = ClientHook->GetOriginal<bool(__thiscall*)(void*, int, int32, int, const void*)>(38);
/* //read chat example
if (msg_type == CS_UM_SayText2)
{
bf_read read = bf_read(reinterpret_cast<const void*>(&msg_data), size);
auto unk1 = read.ReadByte();
auto ent_index = read.ReadByte();
char databuf[1024];
read.ReadBytes(databuf, 3);
char msg_name[1024] = "";
read.ReadBytes(msg_name, read.ReadByte());
read.ReadByte(); // \"
char player_name[1024] = "";
read.ReadBytes(player_name, read.ReadByte());
read.ReadByte(); // \"
char message[1024] = "";
read.ReadBytes(message, read.ReadByte());
}
*/
return ofunc(thisptr,msg_type,nFlags,size, &msg_data);
}

View File

@ -9,7 +9,7 @@ void* IF::GetInterface(const char* dllname, const char* interfacename)
tCreateInterface CreateInterface = (tCreateInterface)GetProcAddress(GetModuleHandleA(dllname), "CreateInterface");
int returnCode = 0;
void* ointerface = CreateInterface(interfacename, &returnCode);
printfdbg("%s = %x\n", interfacename, ointerface);
printfdbg("Interface %s: %x\n", interfacename, ointerface);
return ointerface;
}
@ -22,7 +22,10 @@ PVOID FindHudElement(const char* name)
= reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(
pointer2
);
return (void*)find_hud_element(pThis, name);
void* ret = (void*)find_hud_element(pThis, name);
printfdbg("HUD Element %s: %x\n", name, ret);
return ret;
}
@ -59,6 +62,8 @@ void IF::Init()
g_pEffects = (IEffects*)GetInterface("client.dll", "IEffects001");
g_pStudioRender = (IStudioRender*)GetInterface("studiorender.dll", "VStudioRender026");
g_pPrediction = (CPrediction*)GetInterface("client.dll", "VClientPrediction001");
g_pGameTypes = (IGameTypes*)GetInterface("client.dll", "VENGINE_GAMETYPES_VERSION002");
typedef PVOID(__cdecl* oKeyValuesSystem)();
oKeyValuesSystem pkeyValuesSystem = (oKeyValuesSystem)GetProcAddress(GetModuleHandleA("vstdlib.dll"), "KeyValuesSystem");
@ -114,8 +119,8 @@ void IF::Init()
printfdbg("Hud element %x\n", g_pHudElement);
auto SteamClient = ((ISteamClient * (__cdecl*)(void))GetProcAddress(GetModuleHandleA("steam_api.dll"), "SteamClient"))();
g_SteamGameCoordinator = (ISteamGameCoordinator*)SteamClient->GetISteamGenericInterface((void*)1, (void*)1, "SteamGameCoordinator001");
g_SteamUser = SteamClient->GetISteamUser((void*)1, (void*)1, "SteamUser019");
g_SteamGameCoordinator = (ISteamGameCoordinator*)SteamClient->GetISteamGenericInterface((HSteamUser)1, (HSteamPipe)1, "SteamGameCoordinator001");
g_SteamUser = SteamClient->GetISteamUser((HSteamUser)1, (HSteamPipe)1, "SteamUser019");
printfdbg("SteamClient %X\n", SteamClient);
printfdbg("g_SteamGameCoordinator %X\n", g_SteamGameCoordinator);
@ -142,7 +147,7 @@ void IF::Init()
printfdbg("g_ViewRender %x\n", g_ViewRender);
g_ClientMode = **(IClientMode***)((*(DWORD**)g_pClient)[10] + 0x5);
g_ClientMode = **(ClientModeShared***)((*(DWORD**)g_pClient)[10] + 0x5);
printfdbg("g_ClientMode %x\n", g_ClientMode);
@ -157,7 +162,10 @@ void IF::Init()
printfdbg("ParticleCollectionSimulateAdr %x\n", ParticleCollectionSimulateAdr);
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
}
@ -246,3 +254,28 @@ void NETSetConVar(const char* cvarname, const char* cvarvalue)
//__asm popad
}
void TextMsg(std::string text)
{
if (iff.g_pClient) {
char message[0x100] = "\x08\x04\x1A";
BYTE textsize = (BYTE)text.length();
memcpy(&message[3], &textsize, 1);
memcpy(&message[4], text.c_str(), textsize);
memcpy(&message[4 + textsize], "\x1A\x00\x1A\x00\x1A\x00\x1A\x00", 8);
iff.g_pClient->DispatchUserMessage(CS_UM_TextMsg, 0, textsize + 12, &message);
}
}
void ShowMenu(std::string text)
{
if (iff.g_pClient) {
char message[0x1000] = "\x08\x80\x02\x10\x0A\x1A";
text.append("\x0A \x0A->\x00");
BYTE textsize = (BYTE)text.length();
memcpy(&message[6], &textsize, 1);
memcpy(&message[7], text.c_str(), textsize);
iff.g_pClient->DispatchUserMessage(CS_UM_ShowMenu, 0, textsize + 7, &message);
}
}

View File

@ -48,7 +48,6 @@
#include "imgui/imgui_impl_dx9.h"
#include "sdk/flashlighteffect.h"
#include "sdk/inetchannel.h"
#include "sdk/steam.h"
#include "sdk/animationlayer.h"
#include "sdk/clientleafsystem.h"
#include "sdk/filesystem.h"
@ -67,6 +66,11 @@
#include "sdk/iprediction.h"
#include "sdk/inetmessage.h"
#include "sdk/ClientNetMessage.h"
#include "sdk/clientmode_shared.h"
#include "sdk/isteamclient.h"
#include "sdk/isteamgamecoordinator.h"
#include "sdk/gamerules.h"
#include "sdk/igametypes.h"
#include "XorStr.hpp"
@ -137,13 +141,15 @@ public:
IEngineSound* g_pEngineSound = nullptr;
IClientShadowMgr* g_pClientShadowMgr = nullptr;
CCSViewRender* g_ViewRender = nullptr;
IClientMode* g_ClientMode = nullptr;
CGlobalVarsBase* g_Globals = nullptr;
ClientModeShared* g_ClientMode = nullptr;
IInputSystem* g_pInputSystem = nullptr;
ITempEnts* g_pTempEnts = nullptr;
DWORD ParticleCollectionSimulateAdr = 0;
CPrediction* g_pPrediction = nullptr;
IGameTypes* g_pGameTypes = nullptr;
CHudElement* HudUniqueAlerts = nullptr;
C_GameRulesProxy* GameRulesProxy = nullptr; //C_GameRulesProxy
DWORD dwRadarBase = NULL;
};
extern IF iff;
@ -359,5 +365,8 @@ static __declspec(naked) void __cdecl Invoke_NET_SetConVar(void* pfn, const char
void NETSetConVar(const char* name, const char* value);
void TextMsg(std::string text);
void ShowMenu(std::string text);
std::string GetName(int id);
#endif

View File

@ -693,6 +693,10 @@ public:
OPTION(bool, slidewalk, 0);
OPTION(bool, fastduck, 0);
OPTION(int, changing_name, 0);
OPTION(bool, c4timer, 0);
OPTION(bool, rankreveal, 0);
OPTION(bool, speclist, 0);
OPTION(bool, debugstuff, 0);
};
inline Options g_Options;

View File

@ -93,7 +93,7 @@ void AngleVectors(const Vector& angles, Vector* forward, Vector* right, Vector*
}
static bool ToggleButton(ButtonCode_t code)
static bool ssToggleButton(ButtonCode_t code)
{
static int buttonPressedTick = 0;
if (iff.g_pInputSystem->IsButtonDown(code) && (GetTickCount64() - buttonPressedTick) > 300)
@ -115,7 +115,7 @@ void FlashlightRun(C_BasePlayer* local)
opt.disconnected = 0;
}
if (ToggleButton(KEY_L))
if (ssToggleButton(KEY_L))
{
if (!pFlashLight)
{
@ -170,7 +170,7 @@ void NightvisionRun(C_BasePlayer* local) {
static int m_flNightVisionAlpha = NetvarSys::Get().GetOffset("DT_CSPlayer", "m_flFlashDuration") - 0x1C;
if (ToggleButton(KEY_N) )
if (ssToggleButton(KEY_N) )
{
if (!local->GetNightvision())
{

View File

@ -110,7 +110,7 @@ private:
WIRETYPE_FIXED32 = 5,
};
constexpr static WireType kWireTypeForFieldType[MAX_FIELD_TYPE + 1] = {
constexpr static WireType kWireTypeForFieldType[FieldType::MAX_FIELD_TYPE + 1] = {
static_cast<WireType>(-1),
WIRETYPE_FIXED64,
WIRETYPE_FIXED32,

View File

@ -1,6 +1,8 @@
#pragma once
#include "pbwrap.hpp"
//https://github.com/SteamDatabase/Protobufs/blob/master/csgo/cstrike15_gcmessages.proto
#define k_EMsgGCCStrike15_v2_MatchmakingGC2ClientReserve 9107
#define k_EMsgGCClientWelcome 4004
#define k_EMsgGCClientHello 4006
@ -103,3 +105,203 @@ struct CMsgAdjustItemEquippedState : pbmsg<4> {
PBFIELD(3, types::Uint32, new_slot);
PBFIELD(4, types::Bool, swap);
};
// https://github.com/SteamDatabase/Protobufs/blob/master/csgo/cstrike15_usermessages.proto
struct CCSUsrMsg_HintText : pbmsg<1> {
PBMSG_CTOR;
PBFIELD(1, types::String, text);
};
struct CCSUsrMsg_KeyHintText : pbmsg<1> {
PBMSG_CTOR;
PBFIELD(1, types::String, hints);
};
struct CCSUsrMsg_HudText : pbmsg<1> {
PBMSG_CTOR;
PBFIELD(1, types::String, text);
};
struct CCSUsrMsg_TextMsg : pbmsg<3> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, msg_dst);
PBFIELD(3, types::String, params);
};
struct CCSUsrMsg_SayText : pbmsg<4> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, ent_idx);
PBFIELD(2, types::String, text);
PBFIELD(3, types::Bool, chat);
PBFIELD(4, types::Bool, textallchat);
};
struct CCSUsrMsg_SayText2 : pbmsg<5> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, ent_idx);
PBFIELD(2, types::Bool, chat);
PBFIELD(3, types::String, msg_name);
PBFIELD(4, types::String, params);
PBFIELD(5, types::Bool, textallchat);
};
struct CCSUsrMsg_RadioText : pbmsg<4> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, msg_dst);
PBFIELD(2, types::Int32, client);
PBFIELD(3, types::String, msg_name);
PBFIELD(4, types::String, params);
};
struct CMsgRGBA : pbmsg<4> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, r);
PBFIELD(2, types::Int32, g);
PBFIELD(3, types::Int32, b);
PBFIELD(4, types::Int32, a);
};
struct CMsgVector2D : pbmsg<2> {
PBMSG_CTOR;
PBFIELD(1, types::Float, x);
PBFIELD(2, types::Float, y);
};
struct CCSUsrMsg_HudMsg : pbmsg<11> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, channel);
PBFIELD(2, CMsgVector2D, pos);
PBFIELD(3, CMsgRGBA, clr1);
PBFIELD(4, CMsgRGBA, clr2);
PBFIELD(5, types::Int32, effect);
PBFIELD(6, types::Float, fade_in_time);
PBFIELD(7, types::Float, fade_out_time);
PBFIELD(9, types::Float, hold_time);
PBFIELD(10, types::Float, fx_time);
PBFIELD(11, types::String, text);
};
struct CCSUsrMsg_SendAudio : pbmsg<1> {
PBMSG_CTOR;
PBFIELD(1, types::String, radio_sound);
};
struct CMsgPlayerInfo : pbmsg<6> {
PBMSG_CTOR;
PBFIELD(1, types::String, name);
PBFIELD(2, types::Fixed64, xuid);
PBFIELD(3, types::Int32, userid);
PBFIELD(4, types::Fixed64, steamid);
PBFIELD(5, types::Bool, fakeplayer);
PBFIELD(6, types::Bool, ishltv);
};
struct CMsg_CVars : pbmsg<2> {
PBMSG_CTOR;
struct CVar : pbmsg<2> {
PBMSG_CTOR;
PBFIELD(1, types::String, name);
PBFIELD(2, types::String, value);
};
PBFIELD(1, CMsg_CVars::CVar, cvars);
};
struct CNETMsg_SetConVar : pbmsg<1> {
PBMSG_CTOR;
PBFIELD(1, CMsg_CVars, convars);
};
struct CCSUsrMsg_ShowMenu : pbmsg<3> {
PBMSG_CTOR;
PBFIELD(1, types::Int32, bits_valid_slots);
PBFIELD(2, types::Int32, display_time);
PBFIELD(3, types::String, menu_string);
};
enum ECstrike15UserMessages {
CS_UM_VGUIMenu = 1,
CS_UM_Geiger = 2,
CS_UM_Train = 3,
CS_UM_HudText = 4,
CS_UM_SayText = 5,
CS_UM_SayText2 = 6,
CS_UM_TextMsg = 7,
CS_UM_HudMsg = 8,
CS_UM_ResetHud = 9,
CS_UM_GameTitle = 10,
CS_UM_Shake = 12,
CS_UM_Fade = 13,
CS_UM_Rumble = 14,
CS_UM_CloseCaption = 15,
CS_UM_CloseCaptionDirect = 16,
CS_UM_SendAudio = 17,
CS_UM_RawAudio = 18,
CS_UM_VoiceMask = 19,
CS_UM_RequestState = 20,
CS_UM_Damage = 21,
CS_UM_RadioText = 22,
CS_UM_HintText = 23,
CS_UM_KeyHintText = 24,
CS_UM_ProcessSpottedEntityUpdate = 25,
CS_UM_ReloadEffect = 26,
CS_UM_AdjustMoney = 27,
CS_UM_UpdateTeamMoney = 28,
CS_UM_StopSpectatorMode = 29,
CS_UM_KillCam = 30,
CS_UM_DesiredTimescale = 31,
CS_UM_CurrentTimescale = 32,
CS_UM_AchievementEvent = 33,
CS_UM_MatchEndConditions = 34,
CS_UM_DisconnectToLobby = 35,
CS_UM_PlayerStatsUpdate = 36,
CS_UM_DisplayInventory = 37,
CS_UM_WarmupHasEnded = 38,
CS_UM_ClientInfo = 39,
CS_UM_XRankGet = 40,
CS_UM_XRankUpd = 41,
CS_UM_CallVoteFailed = 45,
CS_UM_VoteStart = 46,
CS_UM_VotePass = 47,
CS_UM_VoteFailed = 48,
CS_UM_VoteSetup = 49,
CS_UM_ServerRankRevealAll = 50,
CS_UM_SendLastKillerDamageToClient = 51,
CS_UM_ServerRankUpdate = 52,
CS_UM_ItemPickup = 53,
CS_UM_ShowMenu = 54,
CS_UM_BarTime = 55,
CS_UM_AmmoDenied = 56,
CS_UM_MarkAchievement = 57,
CS_UM_MatchStatsUpdate = 58,
CS_UM_ItemDrop = 59,
CS_UM_GlowPropTurnOff = 60,
CS_UM_SendPlayerItemDrops = 61,
CS_UM_RoundBackupFilenames = 62,
CS_UM_SendPlayerItemFound = 63,
CS_UM_ReportHit = 64,
CS_UM_XpUpdate = 65,
CS_UM_QuestProgress = 66,
CS_UM_ScoreLeaderboardData = 67,
CS_UM_PlayerDecalDigitalSignature = 68,
CS_UM_WeaponSound = 69,
CS_UM_UpdateScreenHealthBar = 70,
CS_UM_EntityOutlineHighlight = 71,
CS_UM_SSUI = 72,
CS_UM_SurvivalStats = 73,
CS_UM_DisconnectToLobby2 = 74,
CS_UM_EndOfMatchAllPlayersData = 75,
CS_UM_RoundImpactScoreData = 79,
CS_UM_CurrentRoundOdds = 80,
CS_UM_DeepStats = 81,
CS_UM_UtilMsg = 82
};
enum ECSUsrMsg_DisconnectToLobby_Action {
k_ECSUsrMsg_DisconnectToLobby_Action_Default = 0,
k_ECSUsrMsg_DisconnectToLobby_Action_GoQueue = 1
};

View File

@ -214,7 +214,6 @@ bool Changer()
}
const auto m_hRagdoll = (C_BaseEntity*)iff.g_pEntityList->GetClientEntityFromHandle(localplayer->Ragdoll());
if (m_hRagdoll)
m_hRagdoll->GetModelIndex() = iff.g_pMdlInfo->GetModelIndex(model);
@ -240,7 +239,9 @@ bool Changer()
return 0;
CBaseHandle viewmodelHandle = localplayer->GetViewModel();
C_BaseViewModel* pViewModel = (C_BaseViewModel*)iff.g_pEntityList->GetClientEntityFromHandle(viewmodelHandle);
const auto view_model_weapon = (C_BaseAttributableItem*)iff.g_pEntityList->GetClientEntityFromHandle(pViewModel->GetWeapon());
int idi = view_model_weapon->GetItemDefinitionIndex();
@ -307,24 +308,34 @@ bool Changer()
createWearable = []() -> decltype(createWearable)
{
for (auto clientClass = iff.g_pClient->GetAllClasses(); clientClass; clientClass = clientClass->m_pNext)
if (clientClass->m_ClassID == 54)
//if (clientClass->m_ClassID == 54)
if (_tcsstr(clientClass->GetName(), _T("CEconWearable")) != NULL) {
printfdbg("CEconWearable found\n");
return (std::add_pointer_t<C_BaseEntity* __cdecl(int, int)>)clientClass->m_pCreateFn;
}
return nullptr;
}();
}
const auto serial = rand() % 0x1000;
auto entry = iff.g_pEntityList->GetHighestEntityIndex() + 1;
for (int i = 65; i < iff.g_pEntityList->GetHighestEntityIndex(); i++)
{
auto pEntity = iff.g_pEntityList->GetClientEntity(i);
if (pEntity && pEntity->GetClientClass()->m_ClassID == 70)
if (pEntity && _tcsstr(pEntity->GetClientClass()->GetName(), _T("CRopeKeyframe")) != NULL)
{
printfdbg("CRopeKeyframe found %d\n", i);
entry = i;
break;
}
}
createWearable(entry, serial);
glove = (C_BaseAttributableItem*)iff.g_pEntityList->GetClientEntity(entry);
glove->initialized() = true;
@ -345,14 +356,15 @@ bool Changer()
glove->GetFallbackPaintKit() = g_Options.weapons.value->arr[1].skinid;
glove->GetFallbackSeed() = g_Options.weapons.value->arr[1].seed;
glove->GetFallbackWear() = g_Options.weapons.value->arr[1].wear;
static int(__thiscall* fnInitializeAttributes)(void* wearable) = reinterpret_cast<decltype(fnInitializeAttributes)>(FindPatternV2("client.dll", "55 8B EC 83 E4 F8 83 EC 0C 53 56 8B F1 8B 86"));
fnInitializeAttributes(glove);
//iff.g_pClientLeafSystem->CreateRenderableHandle(glove);
//https://www.unknowncheats.me/forum/counterstrike-global-offensive/312102-itemschema-skins-glove-changer-stickers.html
}
}
if (g_Options.weapons.value->arr[0].active && g_Options.weapons.value->arr[0].modelactive)
{
//can cause crash idk why
/*
static int lastmdlindex = -1;
@ -373,7 +385,6 @@ bool Changer()
}
*/
if (view_model_weapon && is_knife(view_model_weapon->GetItemDefinitionIndex()))
{
const auto override_model_index = iff.g_pMdlInfo->GetModelIndex(g_Options.weapons.value->arr[0].model);
@ -382,7 +393,6 @@ bool Changer()
}
}
auto& weapons = localplayer->GetWeapons();
for (auto weapon_handle : weapons)
@ -402,8 +412,6 @@ bool Changer()
if (item_definition_index == 42) item_definition_index = 59;
int configindex = GetCfgIndex(item_definition_index);
if (configindex == -1) continue;
@ -413,9 +421,11 @@ bool Changer()
{
weapon->GetItemDefinitionIndex() = g_Options.weapons.value->arr[0].modeldefindex;
short mdlindex = iff.g_pMdlInfo->GetModelIndex(g_Options.weapons.value->arr[0].model);
if (mdlindex) {
weapon->GetModelIndex() = mdlindex;
auto m_pWorld = (C_BaseEntity*)iff.g_pEntityList->GetClientEntityFromHandle(weapon->GetWeaponWorldModel());
m_pWorld->GetModelIndex() = mdlindex+1;
//auto m_pWorld = (C_BaseEntity*)iff.g_pEntityList->GetClientEntityFromHandle(weapon->GetWeaponWorldModel());
//m_pWorld->GetModelIndex() = mdlindex + 1;
}
}
weapon->GetItemIDHigh() = -1;
@ -431,14 +441,10 @@ bool Changer()
ApplyStickers(weapon);
}
}
if (*g_Options.nvgsON)
NightvisionRun(localplayer);
@ -509,11 +515,8 @@ void __fastcall hkFrameStageNotify(IBaseClientDLL* thisptr, void* edx, ClientFra
auto element = FindHudElement("CCSGO_HudWeaponSelection");
auto hud_weapons = reinterpret_cast<int32_t*>(std::uintptr_t(element) - 0xA0);
printfdbg("p clearHudWeapon %x hud_weapons %x c %d\n", clearHudWeapon, hud_weapons, *(hud_weapons + 32));
if (hud_weapons) {
for (int i = 0; i < *(hud_weapons + 32); i++) {
printfdbg("hud_weapons %d\n", i);
i = clearHudWeapon(hud_weapons, i);
}
}

Binary file not shown.

View File

@ -24,7 +24,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
@ -168,7 +168,6 @@
<ClInclude Include="Other.hpp" />
<ClInclude Include="PatternScan.hpp" />
<ClInclude Include="pbwrap.hpp" />
<ClInclude Include="PlayerInventory.hpp" />
<ClInclude Include="ProtobuffMessages.h" />
<ClInclude Include="protobuffs.hpp" />
<ClInclude Include="ProtoParse.h" />
@ -182,6 +181,7 @@
<ClInclude Include="sdk\baseentity_shared.h" />
<ClInclude Include="sdk\basehandle.h" />
<ClInclude Include="sdk\basetypes.h" />
<ClInclude Include="sdk\baseviewport.h" />
<ClInclude Include="sdk\beam_flags.h" />
<ClInclude Include="sdk\bitbuf.h" />
<ClInclude Include="sdk\bittools.h" />
@ -204,6 +204,7 @@
<ClInclude Include="sdk\checksum_md5.h" />
<ClInclude Include="sdk\cliententitylist.h" />
<ClInclude Include="sdk\clientleafsystem.h" />
<ClInclude Include="sdk\clientmode_shared.h" />
<ClInclude Include="sdk\ClientNetMessage.h" />
<ClInclude Include="sdk\client_class.h" />
<ClInclude Include="sdk\client_render_handle.h" />
@ -212,12 +213,14 @@
<ClInclude Include="sdk\cmodel.h" />
<ClInclude Include="sdk\collisionproperty.h" />
<ClInclude Include="sdk\Color.h" />
<ClInclude Include="sdk\commandmenu.h" />
<ClInclude Include="sdk\commonmacros.h" />
<ClInclude Include="sdk\compressed_light_cube.h" />
<ClInclude Include="sdk\compressed_vector.h" />
<ClInclude Include="sdk\const.h" />
<ClInclude Include="sdk\Controls.h" />
<ClInclude Include="sdk\convar.h" />
<ClInclude Include="sdk\coordsize.h" />
<ClInclude Include="sdk\cs_achievementdefs.h" />
<ClInclude Include="sdk\cs_shareddefs.h" />
<ClInclude Include="sdk\cs_view_scene.h" />
@ -262,6 +265,7 @@
<ClInclude Include="sdk\expressioncalculator.h" />
<ClInclude Include="sdk\exprevaluator.h" />
<ClInclude Include="sdk\fasttimer.h" />
<ClInclude Include="sdk\FileOpenDialog.h" />
<ClInclude Include="sdk\filesystem.h" />
<ClInclude Include="sdk\filesystem_passthru.h" />
<ClInclude Include="sdk\flashlighteffect.h" />
@ -273,12 +277,15 @@
<ClInclude Include="sdk\gameconsole.h" />
<ClInclude Include="sdk\GameEventListener.h" />
<ClInclude Include="sdk\GameEventManager.h" />
<ClInclude Include="sdk\gamerules.h" />
<ClInclude Include="sdk\gamerules_register.h" />
<ClInclude Include="sdk\gamestringpool.h" />
<ClInclude Include="sdk\gametrace.h" />
<ClInclude Include="sdk\game_item_schema.h" />
<ClInclude Include="sdk\generichash.h" />
<ClInclude Include="sdk\globalvars_base.h" />
<ClInclude Include="sdk\groundlink.h" />
<ClInclude Include="sdk\HTML.h" />
<ClInclude Include="sdk\htmlmessages.h" />
<ClInclude Include="sdk\hud.h" />
<ClInclude Include="sdk\hudelement.h" />
@ -317,6 +324,7 @@
<ClInclude Include="sdk\igameconsole.h" />
<ClInclude Include="sdk\igameevents.h" />
<ClInclude Include="sdk\IGameSystem.h" />
<ClInclude Include="sdk\igametypes.h" />
<ClInclude Include="sdk\IGameUI.h" />
<ClInclude Include="sdk\iglobalvarsbase.h" />
<ClInclude Include="sdk\ihandleentity.h" />
@ -338,6 +346,7 @@
<ClInclude Include="sdk\inetchannelinfo.h" />
<ClInclude Include="sdk\inetmessage.h" />
<ClInclude Include="sdk\inetmsghandler.h" />
<ClInclude Include="sdk\inetworksystem.h" />
<ClInclude Include="sdk\InputEnums.h" />
<ClInclude Include="sdk\interface.h" />
<ClInclude Include="sdk\interpolatedvar.h" />
@ -353,6 +362,27 @@
<ClInclude Include="sdk\iserverunknown.h" />
<ClInclude Include="sdk\ishadowmgr.h" />
<ClInclude Include="sdk\ispatialpartition.h" />
<ClInclude Include="sdk\isteamapplist.h" />
<ClInclude Include="sdk\isteamapps.h" />
<ClInclude Include="sdk\isteamclient.h" />
<ClInclude Include="sdk\isteamcontroller.h" />
<ClInclude Include="sdk\isteamfriends.h" />
<ClInclude Include="sdk\isteamgamecoordinator.h" />
<ClInclude Include="sdk\isteamhtmlsurface.h" />
<ClInclude Include="sdk\isteamhttp.h" />
<ClInclude Include="sdk\isteaminventory.h" />
<ClInclude Include="sdk\isteammatchmaking.h" />
<ClInclude Include="sdk\isteammusic.h" />
<ClInclude Include="sdk\isteammusicremote.h" />
<ClInclude Include="sdk\isteamnetworking.h" />
<ClInclude Include="sdk\isteamremotestorage.h" />
<ClInclude Include="sdk\isteamscreenshots.h" />
<ClInclude Include="sdk\isteamugc.h" />
<ClInclude Include="sdk\isteamunifiedmessages.h" />
<ClInclude Include="sdk\isteamuser.h" />
<ClInclude Include="sdk\isteamuserstats.h" />
<ClInclude Include="sdk\isteamutils.h" />
<ClInclude Include="sdk\isteamvideo.h" />
<ClInclude Include="sdk\istudiorender.h" />
<ClInclude Include="sdk\ISurface.h" />
<ClInclude Include="sdk\ISystem.h" />
@ -364,6 +394,7 @@
<ClInclude Include="sdk\IVGUI.h" />
<ClInclude Include="sdk\IVguiMatInfo.h" />
<ClInclude Include="sdk\IVguiMatInfoVar.h" />
<ClInclude Include="sdk\iviewport.h" />
<ClInclude Include="sdk\iviewrender.h" />
<ClInclude Include="sdk\iviewrender_beams.h" />
<ClInclude Include="sdk\ivmodelinfo.h" />
@ -380,6 +411,7 @@
<ClInclude Include="sdk\ListPanel.h" />
<ClInclude Include="sdk\localflexcontroller.h" />
<ClInclude Include="sdk\logging.h" />
<ClInclude Include="sdk\matchmakingtypes.h" />
<ClInclude Include="sdk\MaterialSystemUtil.h" />
<ClInclude Include="sdk\mathlib.h" />
<ClInclude Include="sdk\math_pfns.h" />
@ -399,9 +431,11 @@
<ClInclude Include="sdk\modes.h" />
<ClInclude Include="sdk\MouseCode.h" />
<ClInclude Include="sdk\mouthinfo.h" />
<ClInclude Include="sdk\netmessages.h" />
<ClInclude Include="sdk\networkstringtabledefs.h" />
<ClInclude Include="sdk\networkvar.h" />
<ClInclude Include="sdk\Panel.h" />
<ClInclude Include="sdk\panel2d.h" />
<ClInclude Include="sdk\PanelAnimationVar.h" />
<ClInclude Include="sdk\particledraw.h" />
<ClInclude Include="sdk\particlemgr.h" />
@ -422,6 +456,7 @@
<ClInclude Include="sdk\predictable_entity.h" />
<ClInclude Include="sdk\predictioncopy.h" />
<ClInclude Include="sdk\protocol.h" />
<ClInclude Include="sdk\qlimits.h" />
<ClInclude Include="sdk\ragdoll.h" />
<ClInclude Include="sdk\ragdoll_shared.h" />
<ClInclude Include="sdk\random.h" />
@ -442,9 +477,13 @@
<ClInclude Include="sdk\SndInfo.h" />
<ClInclude Include="sdk\soundflags.h" />
<ClInclude Include="sdk\ssemath.h" />
<ClInclude Include="sdk\steam.h" />
<ClInclude Include="sdk\steamclientpublic.h" />
<ClInclude Include="sdk\SteamCommon.h" />
<ClInclude Include="sdk\steamhttpenums.h" />
<ClInclude Include="sdk\steamtypes.h" />
<ClInclude Include="sdk\steamuniverse.h" />
<ClInclude Include="sdk\steam_api.h" />
<ClInclude Include="sdk\steam_api_internal.h" />
<ClInclude Include="sdk\stringpool.h" />
<ClInclude Include="sdk\string_t.h" />
<ClInclude Include="sdk\strtools.h" />
@ -461,6 +500,7 @@
<ClInclude Include="sdk\timedevent.h" />
<ClInclude Include="sdk\timeutils.h" />
<ClInclude Include="sdk\ToggleButton.h" />
<ClInclude Include="sdk\tokenset.h" />
<ClInclude Include="sdk\Tooltip.h" />
<ClInclude Include="sdk\touchlink.h" />
<ClInclude Include="sdk\trace.h" />
@ -470,6 +510,7 @@
<ClInclude Include="sdk\userid.h" />
<ClInclude Include="sdk\utlblockmemory.h" />
<ClInclude Include="sdk\utlbuffer.h" />
<ClInclude Include="sdk\utldelegate.h" />
<ClInclude Include="sdk\utldict.h" />
<ClInclude Include="sdk\utlenvelope.h" />
<ClInclude Include="sdk\utlfixedmemory.h" />
@ -503,7 +544,9 @@
<ClInclude Include="sdk\vector4d.h" />
<ClInclude Include="sdk\vertexcolor.h" />
<ClInclude Include="sdk\VGUI.h" />
<ClInclude Include="sdk\vguitextwindow.h" />
<ClInclude Include="sdk\vgui_basepanel.h" />
<ClInclude Include="sdk\viewport_panel_names.h" />
<ClInclude Include="sdk\viewrender.h" />
<ClInclude Include="sdk\view_shared.h" />
<ClInclude Include="sdk\vmatrix.h" />
@ -519,6 +562,7 @@
<ClInclude Include="sdk\wchartypes.h" />
<ClInclude Include="sdk\weapon_parse.h" />
<ClInclude Include="sdk\win32consoleio.h" />
<ClInclude Include="sdk\worldsize.h" />
<ClInclude Include="sdk\xboxstubs.h" />
<ClInclude Include="sdk\zip_uncompressed.h" />
<ClInclude Include="Singleton.hpp" />
@ -543,7 +587,6 @@
<ClCompile Include="netvars.cpp" />
<ClCompile Include="Other.cpp" />
<ClCompile Include="PatternScan.cpp" />
<ClCompile Include="PlayerInventory.cpp" />
<ClCompile Include="protobuffs.cpp" />
<ClCompile Include="Skinchanger.cpp" />
<ClCompile Include="textinputcombobox.cpp" />

View File

@ -39,9 +39,6 @@
<ClInclude Include="Interfaces.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PlayerInventory.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GetVfunc.hpp">
<Filter>Header Files</Filter>
</ClInclude>
@ -921,9 +918,6 @@
<ClInclude Include="sdk\ssemath.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\steam.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\SteamCommon.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
@ -1164,6 +1158,144 @@
<ClInclude Include="sdk\protocol.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\clientmode_shared.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\baseviewport.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\iviewport.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\vguitextwindow.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\viewport_panel_names.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\HTML.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\FileOpenDialog.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\steam_api.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\steam_api_internal.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamclient.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamuser.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamfriends.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamutils.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteammatchmaking.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamuserstats.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamapps.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamnetworking.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamremotestorage.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamscreenshots.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteammusic.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteammusicremote.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamhttp.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamunifiedmessages.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamcontroller.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamugc.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamapplist.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamhtmlsurface.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteaminventory.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamvideo.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\steamclientpublic.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\steamhttpenums.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\steamuniverse.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\matchmakingtypes.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\commandmenu.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\isteamgamecoordinator.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\gamerules.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\gamerules_register.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\igametypes.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\panel2d.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\netmessages.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\qlimits.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\inetworksystem.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\tokenset.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\utldelegate.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\coordsize.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
<ClInclude Include="sdk\worldsize.h">
<Filter>Header Files\sdk</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
@ -1178,9 +1310,6 @@
<ClCompile Include="NetVarManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PlayerInventory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PatternScan.cpp">
<Filter>Source Files</Filter>
</ClCompile>

View File

@ -34,7 +34,7 @@ public:
{
printfdbg("Swapping pointer 0x%X to 0x%X\n", new_table_pointer[index], reinterpret_cast<uintptr_t>(new_function));
new_table_pointer[index] = reinterpret_cast<uintptr_t>(new_function);
printfdbg("Swapped pointer!\n");
//printfdbg("Swapped pointer!\n");
}
@ -42,14 +42,14 @@ public:
{
printfdbg("Applying new table... (0x%X to 0x%X)\n", reinterpret_cast<uintptr_t>(*class_pointer), reinterpret_cast<uintptr_t>(new_table_pointer));
* class_pointer = new_table_pointer;
printfdbg("New table applyed!\n");
//printfdbg("New table applyed!\n");
}
void RestoreOldTable()
{
printfdbg("Restoring old table... (0x%X to 0x%X)\n", reinterpret_cast<uintptr_t>(*class_pointer), reinterpret_cast<uintptr_t>(original_pointer));
* class_pointer = original_pointer;
printfdbg("Old table restored!\n");
//printfdbg("Old table restored!\n");
}
template<typename T>

View File

@ -153,6 +153,7 @@ void OnLoadCfg()
}
DWORD WINAPI HackThread(HMODULE hModule)
{
@ -172,6 +173,22 @@ DWORD WINAPI HackThread(HMODULE hModule)
NetvarSys::Get().Initialize();
void* ptrDevMsg = GetProcAddress(GetModuleHandleA("tier0.dll"), "?DevMsg@@YAXPBDZZ");
printfdbg("DevMsg %x\n", ptrDevMsg);
if (ptrDevMsg)
oDevMsg = (pDevMsg)DetourFunction(
(PBYTE)(ptrDevMsg),
(PBYTE)hkDevMsg);
void* ptrDevWarningMsg = GetProcAddress(GetModuleHandleA("tier0.dll"), "?DevWarning@@YAXPBDZZ");
printfdbg("DevWarningMsg %x\n", ptrDevWarningMsg);
if (ptrDevWarningMsg)
oDevWarningMsg = (pDevWarningMsg)DetourFunction(
(PBYTE)(ptrDevWarningMsg),
(PBYTE)hkDevWarningMsg);
DMEHook = new VMTHook(iff.g_pMdlRender);
DMEHook->SwapPointer(21, reinterpret_cast<void*>(DrawModelExecute));
DMEHook->ApplyNewTable();
@ -226,6 +243,7 @@ DWORD WINAPI HackThread(HMODULE hModule)
ClientHook = new VMTHook(iff.g_pClient);
ClientHook->SwapPointer(37, reinterpret_cast<void*>(hkFrameStageNotify));
ClientHook->SwapPointer(38, reinterpret_cast<void*>(hkDispatchUserMessage));
ClientHook->ApplyNewTable();
iff.g_pGameConsole->Clear();
@ -233,11 +251,27 @@ DWORD WINAPI HackThread(HMODULE hModule)
EventListener* eventListener = new EventListener();
Color color = { 255,255,0,255 };
iff.g_pCVar->ConsoleColorPrintf(color, "zdarova\n");
iff.g_pCVar->ConsoleColorPrintf(color, "Seaside loaded!\n");
//testing stuff
auto hudradio = FindHudElement("CCSGO_HudRadio");
printfdbg("hudradio %x\n", hudradio);
//static CGameRules* g_pGameRules = nullptr;
//if (!g_pGameRules)
// g_pGameRules = *(CGameRules**)(FindPatternV2("client.dll", "8B 0D ?? ?? ?? ?? FF B3 70 04 ?? ?? FF 77 08 + 0x2") + 0x1);
//if (g_pGameRules)
// printf("g_pGameRules %x\n", g_pGameRules);
//
//
ConVar* sv_skyname = iff.g_pCVar->FindVar("sv_skyname");
int proxyindex = 0;
for (ClientClass* pClass = iff.g_pClient->GetAllClasses(); pClass; pClass = pClass->m_pNext) {
if (!strcmp(pClass->m_pNetworkName, "CBaseViewModel")) {
@ -302,7 +336,7 @@ DWORD WINAPI HackThread(HMODULE hModule)
{
opt.show = !opt.show;
#ifdef DEBUG
cout << "Show " << opt.show << endl;
cout << "Show Menu: " << opt.show << endl;
#endif
if (!opt.show)
iff.g_pInputSystem->EnableInput(1);
@ -332,6 +366,9 @@ DWORD WINAPI HackThread(HMODULE hModule)
printfdbg("Model materials dumped\n");
*g_Options.dme_gettextures = true;
}
}
else
{
@ -368,8 +405,10 @@ DWORD WINAPI HackThread(HMODULE hModule)
iff.g_pCVar->FindVar("fog_override")->SetValue(0);
iff.g_pCVar->FindVar("mat_force_tonemap_scale")->SetValue(0.0f);
ResetMisc();
SetValueUnrestricted("developer", 0);
SetValueUnrestricted("sv_show_usermessage", 0);
ResetMisc();
DMEHook->RestoreOldTable();
D3DHook->RestoreOldTable();
@ -389,6 +428,12 @@ DWORD WINAPI HackThread(HMODULE hModule)
DetourRemove(reinterpret_cast<BYTE*>(oGetAccountData), reinterpret_cast<BYTE*>(hkGetAccountData));
DetourRemove(reinterpret_cast<BYTE*>(oParticleCollectionSimulate), reinterpret_cast<BYTE*>(hkParticleCollectionSimulate));
if (ptrDevMsg)
DetourRemove(reinterpret_cast<BYTE*>(oDevMsg), reinterpret_cast<BYTE*>(hkDevMsg));
if (ptrDevWarningMsg)
DetourRemove(reinterpret_cast<BYTE*>(oDevWarningMsg), reinterpret_cast<BYTE*>(hkDevWarningMsg));
ImGui_ImplDX9_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();

View File

@ -131,7 +131,7 @@ bool Protobuffs::SendClientHello()
((uint32_t*)ptr)[1] = 0;
memcpy((void*)((DWORD)ptr + 8), (void*)packet.data(), packet.size());
bool result = iff.g_SteamGameCoordinator->GCSendMessage(k_EMsgGCClientHello | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
bool result = iff.g_SteamGameCoordinator->SendMessage(k_EMsgGCClientHello | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
free(ptr);
return result;
@ -150,7 +150,7 @@ bool Protobuffs::SendMatchmakingClient2GCHello()
((uint32_t*)ptr)[1] = 0;
memcpy((void*)((DWORD)ptr + 8), (void*)packet.data(), packet.size());
bool result = iff.g_SteamGameCoordinator->GCSendMessage(k_EMsgGCCStrike15_v2_MatchmakingClient2GCHello | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
bool result = iff.g_SteamGameCoordinator->SendMessage(k_EMsgGCCStrike15_v2_MatchmakingClient2GCHello | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
free(ptr);
return result;
@ -175,7 +175,7 @@ bool Protobuffs::SendClientGcRankUpdate()
((uint32_t*)ptr)[1] = 0;
memcpy((void*)((DWORD)ptr + 8), (void*)packet.data(), packet.size());
bool result = iff.g_SteamGameCoordinator->GCSendMessage(k_EMsgGCCStrike15_v2_ClientGCRankUpdate | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
bool result = iff.g_SteamGameCoordinator->SendMessage(k_EMsgGCCStrike15_v2_ClientGCRankUpdate | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
free(ptr);
return result;
@ -199,7 +199,7 @@ bool Protobuffs::EquipWeapon(int weaponid, int classid, int slotid)
((uint32_t*)ptr)[1] = 0;
memcpy((void*)((DWORD)ptr + 8), (void*)packet.data(), packet.size());
bool result = iff.g_SteamGameCoordinator->GCSendMessage(k_EMsgGCAdjustItemEquippedState | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
bool result = iff.g_SteamGameCoordinator->SendMessage(k_EMsgGCAdjustItemEquippedState | ((DWORD)1 << 31), ptr, packet.size() + 8) == k_EGCResultOK;
free(ptr);
return result;
@ -214,9 +214,9 @@ Protobuffs ProtoFeatures;
EGCResult __fastcall hkGCRetrieveMessage(void* ecx, void*, uint32_t* punMsgType, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize)
EGCResults __fastcall hkGCRetrieveMessage(void* ecx, void*, uint32_t* punMsgType, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize)
{
static auto oGCRetrieveMessage = ProtoHook->GetOriginal<EGCResult(__thiscall*)(void*, uint32_t* punMsgType, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize)>(2);
static auto oGCRetrieveMessage = ProtoHook->GetOriginal<EGCResults(__thiscall*)(void*, uint32_t* punMsgType, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize)>(2);
auto status = oGCRetrieveMessage(ecx, punMsgType, pubDest, cubDest, pcubMsgSize);
@ -235,9 +235,9 @@ EGCResult __fastcall hkGCRetrieveMessage(void* ecx, void*, uint32_t* punMsgType,
return status;
}
EGCResult __fastcall hkGCSendMessage(void* ecx, void*, uint32_t unMsgType, const void* pubData, uint32_t cubData)
EGCResults __fastcall hkGCSendMessage(void* ecx, void*, uint32_t unMsgType, const void* pubData, uint32_t cubData)
{
static auto oGCSendMessage = ProtoHook->GetOriginal<EGCResult(__thiscall*)(void*, uint32_t unMsgType, const void* pubData, uint32_t cubData)>(0);
static auto oGCSendMessage = ProtoHook->GetOriginal<EGCResults(__thiscall*)(void*, uint32_t unMsgType, const void* pubData, uint32_t cubData)>(0);
bool sendMessage = ProtoFeatures.PreSendMessage(unMsgType, const_cast<void*>(pubData), cubData);

View File

@ -4,7 +4,9 @@
#include "VMT.hpp"
#include "sdk/steam.h"
//#include "sdk/steam.h"
#include "sdk/steam_api.h"
#include "sdk/isteamgamecoordinator.h"
#include "intrin.h"
extern VMTHook* ProtoHook;
@ -24,7 +26,7 @@ public:
extern Protobuffs ProtoFeatures;
EGCResult __fastcall hkGCRetrieveMessage(void* ecx, void*, uint32_t* punMsgType, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize);
EGCResult __fastcall hkGCSendMessage(void* ecx, void*, uint32_t unMsgType, const void* pubData, uint32_t cubData);
EGCResults __fastcall hkGCRetrieveMessage(void* ecx, void*, uint32_t* punMsgType, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize);
EGCResults __fastcall hkGCSendMessage(void* ecx, void*, uint32_t unMsgType, const void* pubData, uint32_t cubData);

View File

@ -181,11 +181,7 @@ void SetViewModelSequence(const CRecvProxyData* pDataConst, void* pStruct, void*
}
#ifdef DEBUG
cout << "active " << (char*)pViewModel->GetSequenceActivity(m_nSequence);
printf(" ~new seq %d (%s)\n ", m_nSequence, szModel);
#endif
printfdbg("Sequence %s %d (%s)\n", (char*)pViewModel->GetSequenceActivity(m_nSequence), m_nSequence, szModel);
pData->m_Value.m_Int = m_nSequence;
}