Advertisement
chochygraphics

Untitled

Feb 22nd, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.55 KB | None | 0 0
  1. #include "Cheat.h"
  2.  
  3. void CConfig::Setup()
  4. {
  5. SetupValue( Vars.Ragebot.Enabled, false, strenc( "Ragebot" ), strenc( "Enabled" ) );
  6. SetupValue( Vars.Ragebot.AutoFire, false, strenc( "Ragebot" ), strenc( "AutoFire" ) );
  7. SetupValue( Vars.Ragebot.Hold, false, strenc( "Ragebot" ), strenc( "Hold" ) );
  8. SetupValue( Vars.Ragebot.HoldKey, 0, strenc( "Ragebot" ), strenc( "HoldKey" ) );
  9. SetupValue( Vars.Ragebot.FOV, 180.f, strenc( "Ragebot" ), strenc( "FOV" ) );
  10. SetupValue( Vars.Ragebot.Silent, true, strenc( "Ragebot" ), strenc( "Silent" ) );
  11. SetupValue( Vars.Ragebot.TargetMethod, 0, strenc( "Ragebot" ), strenc( "TargetMethod" ) );
  12. SetupValue( Vars.Ragebot.Hitbox, 6, strenc( "Ragebot" ), strenc( "Hitbox" ) );
  13. SetupValue( Vars.Ragebot.FriendlyFire, false, strenc( "Ragebot" ), strenc( "FriendlyFire" ) );
  14. SetupValue( Vars.Ragebot.AutoStop, false, strenc( "Ragebot" ), strenc( "AutoStop" ) );
  15. SetupValue( Vars.Ragebot.AutoCrouch, false, strenc( "Ragebot" ), strenc( "AutoCrouch" ) );
  16. SetupValue( Vars.Ragebot.AutoWall, true, strenc( "Ragebot" ), strenc( "AutoWall" ) );
  17. SetupValue( Vars.Ragebot.AutoWallDmg, 10.f, strenc( "Ragebot" ), strenc( "AutoWallDamage" ) );
  18. SetupValue( Vars.Ragebot.HitChance, false, strenc( "Ragebot" ), strenc( "HitChance" ) );
  19. SetupValue( Vars.Ragebot.HitChanceAmt, 50.f, strenc( "Ragebot" ), strenc( "HitChanceAmount" ) );
  20. SetupValue( Vars.Ragebot.Aimstep, false, strenc( "Ragebot" ), strenc( "Aimstep" ) );
  21. SetupValue( Vars.Ragebot.AimstepAmount, 15.f, strenc( "Ragebot" ), strenc( "AimstepAmount" ) );
  22. SetupValue( Vars.Ragebot.HitScanAll, false, strenc( "Ragebot" ), strenc( "HitScanAll" ) );
  23. SetupValue( Vars.Ragebot.HitScanHitbox, false, strenc( "Ragebot" ), strenc( "HitScanHitbox" ) );
  24. SetupValue( Vars.Ragebot.UntrustedCheck, true, strenc( "Ragebot" ), strenc( "Anti-Untrust" ) );
  25. SetupValue( Vars.Ragebot.Antiaim.Enabled, false, strenc( "Ragebot" ), strenc( "AntiaimEnabled" ) );
  26. SetupValue( Vars.Ragebot.Antiaim.Pitch, 0, strenc( "Ragebot" ), strenc( "AntiaimPitch" ) );
  27. SetupValue( Vars.Ragebot.Antiaim.Yaw, 0, strenc( "Ragebot" ), strenc( "AntiaimYaw" ) );
  28. SetupValue( Vars.Ragebot.Antiaim.PSilent, true, strenc( "Ragebot" ), strenc( "AntiaimYaw" ) );
  29.  
  30.  
  31. SetupValue( Vars.Legitbot.Aimbot.Enabled, false, strenc( "Legitbot" ), strenc( "Enabled" ) );
  32. SetupValue( Vars.Legitbot.Aimbot.AlwaysOn, false, strenc( "Legitbot" ), strenc( "AlwaysOn" ) );
  33. SetupValue( Vars.Legitbot.Aimbot.Key, 0, strenc( "Legitbot" ), strenc( "Key" ) );
  34. SetupValue( Vars.Legitbot.Aimbot.OnKey, false, strenc( "Legitbot" ), strenc( "OnKey" ) );
  35. SetupValue( Vars.Legitbot.Aimbot.FriendlyFire, false, strenc( "Legitbot" ), strenc( "FriendlyFire" ) );
  36. SetupValue( Vars.Legitbot.Aimbot.Hitbox, 6, strenc( "Legitbot" ), strenc( "Hitbox" ) );
  37. SetupValue( Vars.Legitbot.Aimbot.FOV, 10.f, strenc( "Legitbot" ), strenc( "FOV" ) );
  38. SetupValue( Vars.Legitbot.Aimbot.Speed, 5.f, strenc( "Legitbot" ), strenc( "Speed" ) );
  39. SetupValue( Vars.Legitbot.Aimbot.RCS, true, strenc( "Legitbot" ), strenc( "RCS" ) );
  40. SetupValue( Vars.Legitbot.Aimbot.RCSAmount, 100.f, strenc( "Legitbot" ), strenc( "RCSAmount" ) );
  41.  
  42. SetupValue( Vars.Legitbot.Triggerbot.Enabled, false, strenc( "Triggerbot" ), strenc( "Enabled" ) );
  43. SetupValue( Vars.Legitbot.Triggerbot.AutoFire, false, strenc( "Triggerbot" ), strenc( "AutoFire" ) );
  44. SetupValue( Vars.Legitbot.Triggerbot.Key, 0, strenc( "Triggerbot" ), strenc( "Key" ) );
  45. SetupValue( Vars.Legitbot.Triggerbot.HitChance, false, strenc( "Triggerbot" ), strenc( "HitChance" ) );
  46. SetupValue( Vars.Legitbot.Triggerbot.HitChanceAmt, 60.f, strenc( "Triggerbot" ), strenc( "HitChanceAmt" ) );
  47. SetupValue( Vars.Legitbot.Triggerbot.Filter.Head, false, strenc( "Triggerbot" ), strenc( "FilterHead" ) );
  48. SetupValue( Vars.Legitbot.Triggerbot.Filter.Chest, false, strenc( "Triggerbot" ), strenc( "FilterChest" ) );
  49. SetupValue( Vars.Legitbot.Triggerbot.Filter.Stomach, false, strenc( "Triggerbot" ), strenc( "FilterStomach" ) );
  50. SetupValue( Vars.Legitbot.Triggerbot.Filter.Arms, false, strenc( "Triggerbot" ), strenc( "FilterArms" ) );
  51. SetupValue( Vars.Legitbot.Triggerbot.Filter.Legs, false, strenc( "Triggerbot" ), strenc( "FilterLegs" ) );
  52. SetupValue( Vars.Legitbot.Triggerbot.Filter.Friendly, false, strenc( "Triggerbot" ), strenc( "FilterFriendly" ) );
  53.  
  54. SetupValue( Vars.Visuals.Enabled, true, strenc( "Visuals" ), strenc( "Enabled" ) );
  55. SetupValue( Vars.Visuals.Box, true, strenc( "Visuals" ), strenc( "Box" ) );
  56. SetupValue( Vars.Visuals.Skeleton, false, strenc( "Visuals" ), strenc( "Skeleton" ) );
  57. SetupValue( Vars.Visuals.BulletTrace, false, strenc( "Visuals" ), strenc( "BulletTrace" ) );
  58. SetupValue( Vars.Visuals.BulletTraceLength, 200.f, strenc( "Visuals" ), strenc( "BulletTraceLength" ) );
  59. SetupValue( Vars.Visuals.Glow, true, strenc( "Visuals" ), strenc( "Glow" ) );
  60. SetupValue( Vars.Visuals.CrosshairOn, true, strenc( "Visuals" ), strenc( "CrosshairOn" ) );
  61. SetupValue( Vars.Visuals.CrosshairType, 0, strenc( "Visuals" ), strenc( "CrosshairType" ) );
  62. SetupValue( Vars.Visuals.CrosshairStyle, 0, strenc( "Visuals" ), strenc( "CrosshairStyle" ) );
  63. SetupValue( Vars.Visuals.Info.Name, true, strenc( "Visuals" ), strenc( "InfoName" ) );
  64. SetupValue( Vars.Visuals.Info.Health, true, strenc( "Visuals" ), strenc( "InfoHealth" ) );
  65. SetupValue( Vars.Visuals.Info.Weapon, true, strenc( "Visuals" ), strenc( "InfoWeapon" ) );
  66. SetupValue( Vars.Visuals.Info.Flashed, true, strenc( "Visuals" ), strenc( "InfoFlashed" ) );
  67. SetupValue( Vars.Visuals.Filter.Enemies, true, strenc( "Visuals" ), strenc( "FilterEnemies" ) );
  68. SetupValue( Vars.Visuals.Filter.Friendlies, true, strenc( "Visuals" ), strenc( "FilterFriendlies" ) );
  69. SetupValue( Vars.Visuals.Filter.Weapons, true, strenc( "Visuals" ), strenc( "FilterWeapons" ) );
  70. SetupValue( Vars.Visuals.Filter.Decoy, true, strenc( "Visuals" ), strenc( "FilterDecoy" ) );
  71. SetupValue( Vars.Visuals.Filter.C4, true, strenc( "Visuals" ), strenc( "FilterC4" ) );
  72. SetupValue( Vars.Visuals.Chams.Enabled, true, strenc( "Visuals" ), strenc( "ChamsEnabled" ) );
  73. SetupValue( Vars.Visuals.Chams.Mode, 0, strenc( "Visuals" ), strenc( "ChamsMode" ) );
  74. SetupValue( Vars.Visuals.Chams.XQZ, true, strenc( "Visuals" ), strenc( "ChamsXQZ" ) );
  75. SetupValue( Vars.Visuals.Chams.Wireframe, true, strenc( "Visuals" ), strenc( "ChamsWireframe" ) );
  76. SetupValue( Vars.Visuals.Removals.Hands, false, strenc( "Visuals" ), strenc( "RemoveHands" ) );
  77. SetupValue( Vars.Visuals.Removals.Weapon, false, strenc( "Visuals" ), strenc( "RemoveWeapon" ) );
  78. SetupValue( Vars.Visuals.Removals.VisualRecoil, true, strenc( "Visuals" ), strenc( "RemoveRecoil" ) );
  79. SetupValue( Vars.Visuals.Removals.Flash, true, strenc( "Visuals" ), strenc( "RemoveFlash" ) );
  80.  
  81. SetupValue( Vars.Misc.Bhop, true, strenc( "Misc" ), strenc( "Bhop" ) );
  82. SetupValue( Vars.Misc.AutoStrafe, false, strenc( "Misc" ), strenc( "AutoStrafe" ) );
  83. SetupValue( Vars.Misc.Watermark, true, strenc( "Misc" ), strenc( "Watermark" ) );
  84. SetupValue( Vars.Misc.Ranks, true, strenc( "Misc" ), strenc( "Ranks" ) );
  85. SetupValue( Vars.Misc.AutoAccept, true, strenc( "Misc" ), strenc( "AutoAccept" ) );
  86. SetupValue( Vars.Misc.AirStuck, false, strenc( "Misc" ), strenc( "AirStuck" ) );
  87. SetupValue( Vars.Misc.AirStuckKey, 0, strenc( "Misc" ), strenc( "AirStuckKey" ) );
  88. }
  89.  
  90. void CConfig::SetupValue( int &value, int def, std::string category, std::string name )
  91. {
  92. value = def;
  93. ints.push_back( new ConfigValue<int>( category, name, &value ) );
  94. }
  95.  
  96. void CConfig::SetupValue( float &value, float def, std::string category, std::string name )
  97. {
  98. value = def;
  99. floats.push_back( new ConfigValue<float>( category, name, &value ) );
  100. }
  101.  
  102. void CConfig::SetupValue( bool &value, bool def, std::string category, std::string name )
  103. {
  104. value = def;
  105. bools.push_back( new ConfigValue<bool>( category, name, &value ) );
  106. }
  107.  
  108. void CConfig::Save()
  109. {
  110. static TCHAR path[ MAX_PATH ];
  111. std::string folder, file;
  112.  
  113. if( SUCCEEDED( SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, path ) ) )
  114. {
  115. folder = std::string( path ) + strenc( "\\notacheat\\" );
  116. file = std::string( path ) + strenc( "\\notacheat\\gamerfood.ini" );
  117. }
  118.  
  119. CreateDirectory( folder.c_str(), NULL );
  120.  
  121. for ( auto value : ints )
  122. WritePrivateProfileString( value->category.c_str(), value->name.c_str(), std::to_string( *value->value ).c_str(), file.c_str() );
  123.  
  124. for ( auto value : floats )
  125. WritePrivateProfileString( value->category.c_str(), value->name.c_str(), std::to_string( *value->value ).c_str(), file.c_str() );
  126.  
  127. for ( auto value : bools )
  128. WritePrivateProfileString( value->category.c_str(), value->name.c_str(), *value->value ? "true" : "false", file.c_str() );
  129. }
  130.  
  131. void CConfig::Load()
  132. {
  133. static TCHAR path[MAX_PATH];
  134. std::string folder, file;
  135.  
  136. if ( SUCCEEDED( SHGetFolderPath( NULL, CSIDL_APPDATA, NULL, 0, path ) ) )
  137. {
  138. folder = std::string( path ) + strenc( "\\notacheat\\" );
  139. file = std::string( path ) + strenc( "\\notacheat\\gamerfood.ini" );
  140. }
  141.  
  142. CreateDirectory( folder.c_str(), NULL );
  143.  
  144. char value_l[32] = { '\0' };
  145.  
  146. for ( auto value : ints )
  147. {
  148. GetPrivateProfileString( value->category.c_str(), value->name.c_str(), "", value_l, 32, file.c_str() );
  149. *value->value = atoi( value_l );
  150. }
  151.  
  152. for ( auto value : floats )
  153. {
  154. GetPrivateProfileString( value->category.c_str(), value->name.c_str(), "", value_l, 32, file.c_str() );
  155. *value->value = atof( value_l );
  156. }
  157.  
  158. for ( auto value : bools )
  159. {
  160. GetPrivateProfileString( value->category.c_str(), value->name.c_str(), "", value_l, 32, file.c_str() );
  161. *value->value = !strcmp( value_l, "true" );
  162. }
  163. }
  164.  
  165. CConfig* Config = new CConfig();
  166. Variables Vars;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement