Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. /* void Gameplay::Hotkeys()
  2. {
  3. while (true)
  4. {
  5. if (GetAsyncKeyState(VK_INSERT))
  6. {
  7. bool bFreezeCamera = false;
  8.  
  9. if (CL::IsDriving())
  10. {
  11. bFreezeCamera = !bFreezeCamera;
  12.  
  13. FreezeCamera(bFreezeCamera);
  14. }
  15. }
  16.  
  17. if (GetAsyncKeyState(VK_F1))
  18. {
  19. bool bAutoDrive = false;
  20.  
  21. if (CL::IsDriving())
  22. {
  23. bAutoDrive = !bAutoDrive;
  24.  
  25. Utils::Hook::Set<bool>((*(DWORD*)0xA9FFF8) + 0x8, bAutoDrive);
  26. }
  27. }
  28.  
  29. if (GetAsyncKeyState(VK_F2))
  30. {
  31. bool bCopLights = false;
  32.  
  33. if (CL::IsDriving())
  34. {
  35. bCopLights = !bCopLights;
  36.  
  37. Utils::Hook::Set<float>(0x7CBED9, bCopLights);
  38. Utils::Hook::Set<float>(0x7CBEE1, bCopLights);
  39. Utils::Hook::Set<float>(0x7CBEE9, bCopLights);
  40. }
  41. }
  42.  
  43. if (GetAsyncKeyState(VK_F4))
  44. {
  45. bool bCamera = false;
  46.  
  47. if (CL::IsDriving())
  48. {
  49. bCamera = !bCamera;
  50.  
  51. if (!bCamera)
  52. {
  53. SetAction(1, "CDActionDrive");
  54. }
  55.  
  56. if (bCamera)
  57. {
  58. SetAction(1, "CDActionDebug");
  59. }
  60. }
  61. }
  62.  
  63. // Save .hot position.
  64. if (GetAsyncKeyState(VK_LCONTROL) && GetAsyncKeyState(0x31))
  65. {
  66. Utils::Hook::Set<unsigned char>(0xB74BF8, 0x01);
  67. }
  68. if (GetAsyncKeyState(VK_LCONTROL) && GetAsyncKeyState(0x32))
  69. {
  70. Utils::Hook::Set<unsigned char>(0xB74BF8, 0x02);
  71. }
  72. if (GetAsyncKeyState(VK_LCONTROL) && GetAsyncKeyState(0x33))
  73. {
  74. Utils::Hook::Set<unsigned char>(0xB74BF8, 0x03);
  75. }
  76. if (GetAsyncKeyState(VK_LCONTROL) && GetAsyncKeyState(0x34))
  77. {
  78. Utils::Hook::Set<unsigned char>(0xB74BF8, 0x04);
  79. }
  80. if (GetAsyncKeyState(VK_LCONTROL) && GetAsyncKeyState(0x35))
  81. {
  82. Utils::Hook::Set<unsigned char>(0xB74BF8, 0x05);
  83. }
  84.  
  85. // Load .hot position.
  86. if (GetAsyncKeyState(VK_LMENU) && GetAsyncKeyState(0x31))
  87. {
  88. Utils::Hook::Set<unsigned char>(0xB74BFC, 0x01);
  89. }
  90. if (GetAsyncKeyState(VK_LMENU) && GetAsyncKeyState(0x32))
  91. {
  92. Utils::Hook::Set<unsigned char>(0xB74BFC, 0x02);
  93. }
  94. if (GetAsyncKeyState(VK_LMENU) && GetAsyncKeyState(0x33))
  95. {
  96. Utils::Hook::Set<unsigned char>(0xB74BFC, 0x03);
  97. }
  98. if (GetAsyncKeyState(VK_LMENU) && GetAsyncKeyState(0x34))
  99. {
  100. Utils::Hook::Set<unsigned char>(0xB74BFC, 0x04);
  101. }
  102. if (GetAsyncKeyState(VK_LMENU) && GetAsyncKeyState(0x35))
  103. {
  104. Utils::Hook::Set<unsigned char>(0xB74BFC, 0x05);
  105. }
  106.  
  107. Sleep(100);
  108. }
  109. } */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement