Guest User

Untitled

a guest
Aug 8th, 2016
925
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. /*
  2. Syn's AYYWAREFramework 2015
  3. */
  4.  
  5. #pragma once
  6.  
  7. #include "MiscDefinitions.h"
  8. #include "ClientRecvProps.h"
  9. #include "offsets.h"
  10. #include "Vector.h"
  11.  
  12. // EngineClient
  13. class IVEngineClient
  14. {
  15. public:
  16. void GetScreenSize(int& width, int& height)
  17. {
  18. typedef void(__thiscall* oGetScreenSize)(PVOID, int&, int&);
  19. return call_vfunc< oGetScreenSize >(this, Offsets::VMT::Engine_GetScreenSize)(this, width, height);
  20. }
  21. bool GetPlayerInfo(int ent_num, player_info_t *pinfo)
  22. {
  23. typedef bool(__thiscall* oGetPlayerInfo)(PVOID, int, player_info_t*);
  24. return call_vfunc< oGetPlayerInfo >(this, Offsets::VMT::Engine_GetPlayerInfo)(this, ent_num, pinfo);
  25. }
  26. int GetLocalPlayer()
  27. {
  28. typedef int(__thiscall* oLocal)(PVOID);
  29. return call_vfunc< oLocal >(this, Offsets::VMT::Engine_GetLocalPlayer)(this);
  30. }
  31. float Time()
  32. {
  33. typedef float(__thiscall* oTime)(PVOID);
  34. return call_vfunc< oTime >(this, Offsets::VMT::Engine_Time)(this);
  35. }
  36. void GetViewAngles(Vector& vAngles)
  37. {
  38. typedef void(__thiscall* oSetViewAngles)(PVOID, Vector&);
  39. return call_vfunc< oSetViewAngles >(this, Offsets::VMT::Engine_GetViewAngles)(this, vAngles);
  40. }
  41. void SetViewAngles(Vector& vAngles)
  42. {
  43. typedef void(__thiscall* oSetViewAngles)(PVOID, Vector&);
  44. return call_vfunc< oSetViewAngles >(this, Offsets::VMT::Engine_SetViewAngles)(this, vAngles);
  45. }
  46. int GetMaxClients()
  47. {
  48. typedef bool(__thiscall* oGetMaxClients)(PVOID);
  49. return call_vfunc< oGetMaxClients >(this, Offsets::VMT::Engine_GetMaxClients)(this);
  50. }
  51. bool IsConnected()
  52. {
  53. typedef bool(__thiscall* oGetScreenSize)(PVOID);
  54. return call_vfunc< oGetScreenSize >(this, Offsets::VMT::Engine_IsConnected)(this);
  55. }
  56. bool IsInGame()
  57. {
  58. typedef bool(__thiscall* oLocal)(PVOID);
  59. return call_vfunc< oLocal >(this, Offsets::VMT::Engine_IsInGame)(this);
  60. }
  61. const matrix3x4& WorldToScreenMatrix()
  62. {
  63. typedef const matrix3x4& (__thiscall* oWorldToScreenMatrix)(PVOID);
  64. return call_vfunc< oWorldToScreenMatrix >(this, Offsets::VMT::Engine_WorldToScreenMatrix)(this);
  65. }
  66. void IVEngineClient::ClientCmd_Unrestricted(char const* cmd)
  67. {
  68. typedef void(__thiscall* oClientCmdUnres)(PVOID, const char*, char);
  69. return call_vfunc<oClientCmdUnres>(antiPasta, Offsets::VMT::Engine_ClientCmd_Unrestricted)(this, cmd, 0);
  70. }
  71. };
Add Comment
Please, Sign In to add comment