Advertisement
Guest User

Untitled

a guest
Feb 10th, 2017
735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.14 KB | None | 0 0
  1. //
  2. // Syn's "Storm" Cheat
  3. // Started October 2015
  4. //
  5.  
  6. #pragma once
  7.  
  8. #include "Valve/MiscDefinitions.h"
  9. #include "Valve/ClientRecvProps.h"
  10. #include "Valve/Vector.h"
  11. #include "SmallClasses.h"
  12. #include "VFuncs.h"
  13. #include "NetVars.h"
  14. #include "Utilities.h"
  15. #include "Offsets.h"
  16.  
  17. #define TEAM_CS_T 2
  18. #define TEAM_CS_CT 3
  19.  
  20. #define BONE_USED_BY_HITBOX 0x00000100
  21.  
  22. class IClientRenderable;
  23. class IClientNetworkable;
  24. class IClientUnknown;
  25. class IClientThinkable;
  26. class IClientEntity;
  27. class CSWeaponInfo;
  28.  
  29. class CSWeaponInfo
  30. {
  31. public:
  32. virtual void Function0(); //
  33. virtual void Function1(); //
  34. virtual void Parse(KeyValues *pKeyValuesData, const char *szWeaponName); //
  35. virtual void RefreshDynamicParameters(void); //
  36. virtual void Function4(); //
  37. virtual void Function5(); //
  38. virtual void Function6(); //
  39. virtual void Function7(); //
  40. virtual void Function8(); //
  41.  
  42. char pad_0x0004[0x2]; //0x0004
  43. char m_pszName[32]; //0x0006
  44. char pad_0x0026[0x7E]; //0x0026
  45. __int16 N0000002E; //0x00A4
  46. char m_pszModelName[32]; //0x00A6
  47. char pad_0x00C6[0x6DE]; //0x00C6
  48. BYTE m_IsFullAuto; //0x07A4
  49. char pad_0x07A5[0x7]; //0x07A5
  50. __int32 m_iPrice; //0x07AC
  51. float m_flArmorRatio; //0x07B0
  52. char pad_0x07B4[0x10]; //0x07B4
  53. float m_flPenetration; //0x07C4
  54. __int32 m_iDamage; //0x07C8
  55. float m_flRange; //0x07CC
  56. float m_flRangeModifier; //0x07D0
  57. char pad_0x07D4[0x4]; //0x07D4
  58. float m_flCycleTime; //0x07D8
  59.  
  60. };
  61.  
  62. enum class CSGOClassID
  63. {
  64. CAK47 = 1,
  65. CBaseAnimating,
  66. CBaseAnimatingOverlay,
  67. CBaseAttributableItem,
  68. CBaseButton,
  69. CBaseCombatCharacter,
  70. CBaseCombatWeapons,
  71. CBaseCSGrenade,
  72. CBaseCSGrenadeProjectile,
  73. CBaseDoor,
  74. CBaseEntity,
  75. CBaseFlex,
  76. CBaseGrenade,
  77. CBaseParticleEntity,
  78. CBasePlayer,
  79. CBasePropDoor,
  80. CBaseTeamObjectiveResource,
  81. CBaseTempEntity,
  82. CBaseToggle,
  83. CBaseTrigger,
  84. CBaseViewModels,
  85. CBaseVPhysicsTrigger,
  86. CBaseWeaponWorldModel,
  87. CBeam,
  88. CBeamSpotlight,
  89. CBoneFollower,
  90. CBreakableProp,
  91. CBreakableSurface,
  92. CC4,
  93. CCascadeLight,
  94. CChicken,
  95. CColorCorrection,
  96. CColorCorrectionVolume,
  97. CCSGameRulesProxy,
  98. CCSPlayer,
  99. CCSPlayerResource,
  100. CCSRagdoll,
  101. CCSTeam,
  102. CDEagle,
  103. CDecoyGrenade,
  104. CDecoyProjectile,
  105. CDynamicLight,
  106. CDynamicProp,
  107. CEconEntity,
  108. CEconWearable,
  109. CEmbers,
  110. CEntityDissolve,
  111. CEntityFlame,
  112. CEntityFreezing,
  113. CEntityParticleTrail,
  114. CEnvAmbientLight,
  115. CEnvDetailController,
  116. CEnvDOFController,
  117. CEnvParticleScript,
  118. CEnvProjectedTexture,
  119. CEnvQuadraticBeam,
  120. CEnvScreenEffect,
  121. CEnvScreenOverlay,
  122. CEnvTonemapController,
  123. CEnvWind,
  124. CFEPlayerDecal,
  125. CFireCrackerBlast,
  126. CFireSmoke,
  127. CFireTrail,
  128. CFish,
  129. CFlashbang,
  130. CFogController,
  131. CFootstepControl,
  132. CFunc_Dust,
  133. CFunc_LOD,
  134. CFuncAreaPortalWindow,
  135. CFuncBrush,
  136. CFuncConveyor,
  137. CFuncLadder,
  138. CFuncMonitor,
  139. CFuncMoveLinear,
  140. CFuncOccluder,
  141. CFuncReflectiveGlass,
  142. CFuncRotating,
  143. CFuncSmokeVolume,
  144. CFuncTrackTrain,
  145. CGameRulesProxy,
  146. CHandleTest,
  147. CHEGrenade,
  148. CHostage,
  149. CHostageCarriableProp,
  150. CIncendiaryGrenade,
  151. CInferno,
  152. CInfoLadderDismount,
  153. CInfoOverlayAccessor,
  154. CItem_Healthshot,
  155. CKnife,
  156. CKnifeGG,
  157. CLightGlow,
  158. CMaterialModifyControl,
  159. CMolotovGrenade,
  160. CMolotovProjectile,
  161. CMovieDisplay,
  162. CParticleFire,
  163. CParticlePerformanceMonitor,
  164. CParticleSystem,
  165. CPhysBox,
  166. CPhysBoxMultiplayer,
  167. CPhysicsProp,
  168. CPhysicsPropMultiplayer,
  169. CPhysMagnet,
  170. CPlantedC4,
  171. CPlasma,
  172. CPlayerResource,
  173. CPointCamera,
  174. CPointCommentaryNode,
  175. CPoseController,
  176. CPostProcessController,
  177. CPrecipitation,
  178. CPrecipitationBlocker,
  179. CPredictedViewModel,
  180. CProp_Hallucination,
  181. CPropDoorRotating,
  182. CPropJeep,
  183. CPropVehicleDriveable,
  184. CRagdollManager,
  185. CRagdollProp,
  186. CRagdollPropAttached,
  187. CRopeKeyframe,
  188. CSCAR17,
  189. CSceneEntity,
  190. CSensorGrenade,
  191. CSensorGrenadeProjectile,
  192. CShadowControl,
  193. CSlideshowDisplay,
  194. CSmokeGrenade,
  195. CSmokeGrenadeProjectile,
  196. CSmokeStack,
  197. CSpatialEntity,
  198. CSpotlightEnd,
  199. CSprite,
  200. CSpriteOriented,
  201. CSpriteTrail,
  202. CStatueProp,
  203. CSteamJet,
  204. CSun,
  205. CSunlightShadowControl,
  206. CTeam,
  207. CTeamplayRoundBasedRulesProxy,
  208. CTEArmorRicochet,
  209. CTEBaseBeam,
  210. CTEBeamEntPoint,
  211. CTEBeamEnts,
  212. CTEBeamFollow,
  213. CTEBeamLaser,
  214. CTEBeamPoints,
  215. CTEBeamRing,
  216. CTEBeamRingPoint,
  217. CTEBeamSpline,
  218. CTEBloodSprite,
  219. CTEBloodStream,
  220. CTEBreakModel,
  221. CTEBSPDecal,
  222. CTEBubbles,
  223. CTEBubbleTrail,
  224. CTEClientProjectile,
  225. CTEDecal,
  226. CTEDust,
  227. CTEDynamicLight,
  228. CTEEffectDispatch,
  229. CTEEnergySplash,
  230. CTEExplosion,
  231. CTEFireBullets,
  232. CTEFizz,
  233. CTEFootprintDecal,
  234. CTEFoundryHelpers,
  235. CTEGaussExplosion,
  236. CTEGlowSprite,
  237. CTEImpact,
  238. CTEKillPlayerAttachments,
  239. CTELargeFunnel,
  240. CTEMetalSparks,
  241. CTEMuzzleFlash,
  242. CTEParticleSystem,
  243. CTEPhysicsProp,
  244. CTEPlantBomb,
  245. CTEPlayerAnimEvent,
  246. CTEPlayerDecal,
  247. CTEProjectedDecal,
  248. CTERadioIcon,
  249. CTEShatterSurface,
  250. CTEShowLine,
  251. CTesla,
  252. CTESmoke,
  253. CTESparks,
  254. CTESprite,
  255. CTESpriteSpray,
  256. CTest_ProxyToggle_Networkabl,
  257. CTestTraceline,
  258. CTEWorldDecal,
  259. CTriggerPlayerMovement,
  260. CTriggerSoundOperator,
  261. CVGuiScreen,
  262. CVoteController,
  263. CWaterBullet,
  264. CWaterLODControl,
  265. CWeaponAug,
  266. CWeaponAWP,
  267. CWeaponBaseItem,
  268. CWeaponBizon,
  269. CWeaponCSBase,
  270. CWeaponCSBaseGun,
  271. CWeaponCycler,
  272. CWeaponElite,
  273. CWeaponFamas,
  274. CWeaponFiveSeven,
  275. CWeaponG3SG1,
  276. CWeaponGalil,
  277. CWeaponGalilAR,
  278. CWeaponGlock,
  279. CWeaponHKP2000,
  280. CWeaponM249,
  281. CWeaponM3,
  282. CWeaponM4A1,
  283. CWeaponMAC10,
  284. CWeaponMag7,
  285. CWeaponMP5Navy,
  286. CWeaponMP7,
  287. CWeaponMP9,
  288. CWeaponNegev,
  289. CWeaponNOVA,
  290. CWeaponP228,
  291. CWeaponP250,
  292. CWeaponP90,
  293. CWeaponSawedoff,
  294. CWeaponSCAR20,
  295. CWeaponScout,
  296. CWeaponSG550,
  297. CWeaponSG552,
  298. CWeaponSG556,
  299. CWeaponSSG08,
  300. CWeaponTaser,
  301. CWeaponTec9,
  302. CWeaponTMP,
  303. CWeaponUMP45,
  304. CWeaponUSP,
  305. CWeaponXM1014,
  306. CWorld,
  307. DustTrail,
  308. MovieExplosion,
  309. ParticleSmokeGrenade,
  310. RocketTrail,
  311. SmokeTrail,
  312. SporeExplosion,
  313. SporeTrail,
  314. };
  315.  
  316. enum class CSGOHitboxID
  317. {
  318. Head = 0,
  319. Neck,
  320. NeckLower,
  321. Pelvis,
  322. Stomach,
  323. LowerChest,
  324. Chest,
  325. UpperChest,
  326. RightThigh,
  327. LeftThigh,
  328. RightShin,
  329. LeftShin,
  330. RightFoot,
  331. LeftFoot,
  332. RightHand,
  333. LeftHand,
  334. RightUpperArm,
  335. RightLowerArm,
  336. LeftUpperArm,
  337. LeftLowerArm
  338. };
  339.  
  340. class ScriptCreatedItem
  341. {
  342. public:
  343. CPNETVAR_FUNC(int*, ItemDefinitionIndex, 0xE67AB3B8); //m_iItemDefinitionIndex
  344. CPNETVAR_FUNC(int*, AccountID, 0x24abbea8); //m_iAccountID
  345. CPNETVAR_FUNC(int*, ItemIDHigh, 0x714778A); //m_iItemIDHigh
  346. CPNETVAR_FUNC(int*, ItemIDLow, 0x3A3DFC74); //m_iItemIDLow
  347. CPNETVAR_FUNC(char**, szCustomName, 0x13285ad9); //m_szCustomName
  348. CPNETVAR_FUNC(int*, EntityQuality, 0x110be6fe); //m_iEntityQuality
  349. };
  350.  
  351. class AttributeContainer
  352. {
  353. public:
  354. CPNETVAR_FUNC(ScriptCreatedItem*, m_Item, 0x7E029CE5);
  355. };
  356.  
  357. class CBaseCombatWeapon : public Interface
  358. {
  359. public:
  360. CNETVAR_FUNC(float, GetNextPrimaryAttack, 0xDB7B106E); //m_flNextPrimaryAttack
  361. CNETVAR_FUNC(int, GetAmmoInClip, 0x97B6F70C); //m_iClip1
  362. CNETVAR_FUNC(HANDLE, GetOwnerHandle, 0xC32DF98D); //m_hOwner
  363. CNETVAR_FUNC(Vector, GetOrigin, 0x1231CE10); //m_vecOrigin
  364.  
  365. CPNETVAR_FUNC(int*, FallbackPaintKit, 0xADE4C870); // m_nFallbackPaintKit
  366. CPNETVAR_FUNC(int*, FallbackSeed, 0xC2D0683D); // m_nFallbackSeed
  367. CPNETVAR_FUNC(float*, FallbackWear, 0xA263576C); //m_flFallbackWear
  368. CPNETVAR_FUNC(int*, FallbackStatTrak, 0x1ED78768); //m_nFallbackStatTrak
  369. CPNETVAR_FUNC(int*, OriginalOwnerXuidLow, 0xd7bd6be2); //m_OriginalOwnerXuidLow
  370. CPNETVAR_FUNC(int*, OriginalOwnerXuidHigh, 0x1e95c16c); //m_OriginalOwnerXuidHigh
  371.  
  372. CPNETVAR_FUNC(AttributeContainer*, m_AttributeManager, 0xCFFCE089);
  373.  
  374. float GetInaccuracy()
  375. {
  376. typedef float(__thiscall* oGetSpread)(PVOID);
  377. return VFunc< oGetSpread>(Offsets::SigScans::dwSpreadVmt)(this);
  378. }
  379.  
  380. float GetSpread()
  381. {
  382. typedef float(__thiscall* oGetInac)(PVOID);
  383. return VFunc< oGetInac>(Offsets::SigScans::dwSpreadVmt + 1)(this);
  384. }
  385.  
  386. void UpdateAccuracyPenalty()
  387. {
  388. typedef void(__thiscall* oUpdateAccuracyPenalty)(PVOID);
  389. return VFunc< oUpdateAccuracyPenalty>(Offsets::SigScans::dwSpreadVmt + 2)(this);
  390. }
  391.  
  392. CSWeaponInfo* GetCSWpnData()
  393. {
  394. DWORD GetCSWpnDataAddr = Offsets::SigScans::dwGetCSWpnData;
  395. if (GetCSWpnDataAddr)
  396. {
  397. CSWeaponInfo* retData;
  398. __asm
  399. {
  400. mov ecx, this
  401. call GetCSWpnDataAddr
  402. mov retData, eax
  403. }
  404. return retData;
  405. }
  406. else
  407. {
  408. return nullptr;
  409. }
  410. }
  411. };
  412.  
  413. class CCSBomb
  414. {
  415. public:
  416. CNETVAR_FUNC(HANDLE, GetOwnerHandle, 0xC32DF98D); //m_hOwner
  417. CNETVAR_FUNC(float, GetC4BlowTime, 0xB5E0CA1C); //m_flC4Blow
  418. CNETVAR_FUNC(float, GetC4DefuseCountDown, 0xB959B4A6); //m_flDefuseCountDown
  419. };
  420.  
  421. class CLocalPlayerExclusive
  422. {
  423. public:
  424. CNETVAR_FUNC(Vector, GetViewPunchAngle, 0x68F014C0);//m_viewPunchAngle
  425. CNETVAR_FUNC(Vector, GetAimPunchAngle, 0xBF25C290);//m_aimPunchAngle
  426. CNETVAR_FUNC(Vector, GetAimPunchAngleVel, 0x8425E045);//m_aimPunchAngleVel
  427. };
  428.  
  429. class CollisionProperty
  430. {
  431. public:
  432. CNETVAR_FUNC(Vector, GetMins, 0xF6F78BAB);//m_vecMins
  433. CNETVAR_FUNC(Vector, GetMaxs, 0xE47C6FC4);//m_vecMaxs
  434. CNETVAR_FUNC(unsigned char, GetSolidType, 0xB86722A1);//m_nSolidType
  435. CNETVAR_FUNC(unsigned short, GetSolidFlags, 0x63BB24C1);//m_usSolidFlags
  436. CNETVAR_FUNC(int, GetSurroundsType, 0xB677A0BB); //m_nSurroundType
  437.  
  438. bool IsSolid()
  439. {
  440. return (GetSolidType() != SOLID_NONE) && ((GetSolidFlags() & FSOLID_NOT_SOLID) == 0);
  441. }
  442. };
  443.  
  444. class IClientRenderable
  445. {
  446. public:
  447. //virtual void* GetIClientUnknown() = 0;
  448. virtual Vector const& GetRenderOrigin(void) = 0;
  449. virtual Vector const& GetRenderAngles(void) = 0;
  450. virtual bool ShouldDraw(void) = 0;
  451. virtual bool IsTransparent(void) = 0;
  452. virtual bool UsesPowerOfTwoFrameBufferTexture() = 0;
  453. virtual bool UsesFullFrameBufferTexture() = 0;
  454. virtual void GetShadowHandle() const = 0;
  455. virtual void* RenderHandle() = 0;
  456. virtual const model_t* GetModel() const = 0;
  457. virtual int DrawModel(int flags) = 0;
  458. virtual int GetBody() = 0;
  459. virtual void ComputeFxBlend() = 0;
  460.  
  461. bool SetupBones(matrix3x4 *pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime)
  462. {
  463. typedef bool(__thiscall* oSetupBones)(PVOID, matrix3x4*, int, int, float);
  464. return call_vfunc< oSetupBones>(this, 13)(this, pBoneToWorldOut, nMaxBones, boneMask, currentTime);
  465. }
  466. };
  467.  
  468. class IClientNetworkable
  469. {
  470. public:
  471. virtual IClientUnknown* GetIClientUnknown() = 0;
  472. virtual void Release() = 0;
  473. virtual ClientClass* GetClientClass() = 0;// FOR NETVARS FIND YOURSELF ClientClass* stuffs
  474. virtual void NotifyShouldTransmit( /* ShouldTransmitState_t state*/) = 0;
  475. virtual void OnPreDataChanged( /*DataUpdateType_t updateType*/) = 0;
  476. virtual void OnDataChanged( /*DataUpdateType_t updateType*/) = 0;
  477. virtual void PreDataUpdate( /*DataUpdateType_t updateType*/) = 0;
  478. virtual void PostDataUpdate( /*DataUpdateType_t updateType*/) = 0;
  479. virtual void unknown() = 0;
  480. virtual bool IsDormant(void) = 0;
  481. virtual int GetIndex(void) const = 0;
  482. virtual void ReceiveMessage(int classID /*, bf_read &msg*/) = 0;
  483. virtual void* GetDataTableBasePtr() = 0;
  484. virtual void SetDestroyedOnRecreateEntities(void) = 0;
  485. };
  486.  
  487. class IClientUnknown
  488. {
  489. public:
  490. virtual void* GetCollideable() = 0;
  491. virtual IClientNetworkable* GetClientNetworkable() = 0;
  492. virtual IClientRenderable* GetClientRenderable() = 0;
  493. virtual IClientEntity* GetIClientEntity() = 0;
  494. virtual IClientEntity* GetBaseEntity() = 0;
  495. virtual IClientThinkable* GetClientThinkable() = 0;
  496. };
  497.  
  498. class IClientThinkable
  499. {
  500. public:
  501. virtual IClientUnknown* GetIClientUnknown() = 0;
  502. virtual void ClientThink() = 0;
  503. virtual void* GetThinkHandle() = 0;
  504. virtual void SetThinkHandle(void* hThink) = 0;
  505. virtual void Release() = 0;
  506. };
  507.  
  508. class __declspec (novtable)IClientEntity : public IClientUnknown, public IClientRenderable, public IClientNetworkable, public IClientThinkable
  509. {
  510. public:
  511. public:
  512. virtual void Release(void) = 0;
  513. virtual void blahblahpad(void) = 0;
  514. virtual Vector& GetAbsOrigin(void) const = 0;//in broken place use GetOrigin Below
  515. virtual const Vector& GetAbsAngles(void) const = 0;
  516.  
  517. //--- NetVars ---//
  518.  
  519. CPNETVAR_FUNC(CLocalPlayerExclusive*, localPlayerExclusive, 0x7177BC3E);// m_Local
  520. CPNETVAR_FUNC(CollisionProperty*, collisionProperty, 0xE477CBD0);//m_Collision
  521.  
  522. CNETVAR_FUNC(int, GetFlags, 0xE456D580); //m_fFlags
  523. CPNETVAR_FUNC(int*, GetPointerFlags, 0xE456D580); //m_fFlags
  524.  
  525. CNETVAR_FUNC(Vector, GetOrigin, 0x1231CE10); //m_vecOrigin
  526. CNETVAR_FUNC(Vector, GetRotation, 0x6BEA197A); //m_angRotation
  527. CNETVAR_FUNC(int, GetTeamNum, 0xC08B6C6E); //m_iTeamNum
  528. CNETVAR_FUNC(int, GetMaxHealth, 0xC52E1C28); //m_iMaxHealth
  529. CNETVAR_FUNC(int, GetHealth, 0xA93054E3); //m_iHealth
  530. CNETVAR_FUNC(unsigned char, GetLifeState, 0xD795CCFC); //m_lifeState
  531. CNETVAR_FUNC(HANDLE, GetActiveWeaponHandle, 0xB4FECDA3); //m_hActiveWeapon
  532. CNETVAR_FUNC(int, GetTickBase, 0xD472B079); //m_nTickBase
  533. CNETVAR_FUNC(Vector, GetViewOffset, 0xA9F74931); //m_vecViewOffset[0]
  534. CNETVAR_FUNC(Vector, GetVelocity, 0x40C1CA24); //m_vecVelocity[0]
  535. CNETVAR_FUNC(bool, HasGunGameImmunity, 0x6AD6FA0D); //m_bGunGameImmunity
  536. CNETVAR_FUNC(bool, IsDefusing, 0xA2C14106); //m_bIsDefusing
  537. CNETVAR_FUNC(int, ArmorValue, 0x3898634); //m_ArmorValue
  538. CNETVAR_FUNC(bool, HasHelmet, 0x7B97F18A); //m_bHasHelmet
  539. CNETVAR_FUNC(bool, IsScoped, 0x61B9C22C); //m_bIsScoped
  540. CNETVAR_FUNC(int, GetMoney, 0xF4B3E183); //m_iAccount
  541. CNETVAR_FUNC(HANDLE, GetObserverTargetHandle, 0x8660FD83); //m_hObserverTarget
  542. CPNETVAR_FUNC(char*, GetLastPlaceName, 0x9911c2d7);
  543. CNETVAR_FUNC(DWORD, LowerBodyYaw, 0xe6996ccf);
  544. CNETVAR_FUNC(DWORD, EyeAnglesX, 0xa6f17f3a);
  545. CNETVAR_FUNC(DWORD, EyeAnglesY, 0xbfea4e7b);
  546. CNETVAR_FUNC(Vector, GetEyeAngles, 0xbfea4e7b);
  547. // ----------------------------------------------//
  548.  
  549. bool IsAlive()
  550. {
  551. return (GetLifeState() == LIFE_ALIVE && GetHealth() > 0);
  552. }
  553.  
  554. Vector GetBonePos(int i)
  555. {
  556. matrix3x4 boneMatrix[128];
  557. if (SetupBones(boneMatrix, 128, BONE_USED_BY_HITBOX, GetTickCount64()))
  558. {
  559. return Vector(boneMatrix[i][0][3], boneMatrix[i][1][3], boneMatrix[i][2][3]);
  560. }
  561. return Vector(0, 0, 0);
  562. }
  563.  
  564. Vector GetHeadPos()
  565. {
  566. return this->GetBonePos(6);
  567. }
  568.  
  569. bool IsPlayer()
  570. {
  571. return GetClientClass()->m_ClassID == (int)CSGOClassID::CCSPlayer;
  572. }
  573.  
  574. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement