Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
  2. #include <windows.h>
  3. #include <string>
  4. #include <assert.h>
  5. #include <process.h>
  6.  
  7. #include "SAMPFUNCS_API.h"
  8. #include "game_api\game_api.h"
  9.  
  10.  
  11. SAMPFUNCS *SF = new SAMPFUNCS();
  12.  
  13. void CALLBACK mainloop()
  14. {
  15. static bool init = false;
  16. if (!init)
  17. {
  18. if (GAME == nullptr)
  19. return;
  20. if (GAME->GetSystemState() != eSystemState::GS_PLAYING_GAME)
  21. return;
  22. if (!SF->getSAMP()->IsInitialized())
  23. return;
  24. SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0xAA, 0), "1");
  25. init = true;
  26. }
  27. if (SF->getGame()->isKeyDown(VK_F4))
  28. {
  29. stOnFootData OF;
  30. OF = SF->getSAMP()->getPlayers()->pLocalPlayer->onFootData;
  31. OF.sKeys = 1024;
  32. BitStream OFsync;
  33. OFsync.Write((BYTE)ID_PLAYER_SYNC);
  34. OFsync.Write((PCHAR)&OF, sizeof(stOnFootData));
  35. SF->getRakNet()->SendPacket(&OFsync);
  36. SF->getSAMP()->getChat()->AddChatMessage(-1, "Типо флуууууууд");
  37. }
  38. };
  39.  
  40. BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReasonForCall, LPVOID lpReserved)
  41. {
  42. switch (dwReasonForCall)
  43. {
  44. case DLL_PROCESS_ATTACH:
  45. SF->initPlugin(mainloop, hModule);
  46. break;
  47. case DLL_THREAD_ATTACH:
  48. case DLL_THREAD_DETACH:
  49. case DLL_PROCESS_DETACH:
  50. break;
  51. }
  52. return TRUE;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement