Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
- #include <windows.h>
- #include <string>
- #include <assert.h>
- #include <process.h>
- #include "SAMPFUNCS_API.h"
- #include "game_api\game_api.h"
- SAMPFUNCS *SF = new SAMPFUNCS();
- void CALLBACK mainloop()
- {
- static bool init = false;
- if (!init)
- {
- if (GAME == nullptr)
- return;
- if (GAME->GetSystemState() != eSystemState::GS_PLAYING_GAME)
- return;
- if (!SF->getSAMP()->IsInitialized())
- return;
- SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0xAA, 0), "1");
- init = true;
- }
- if (SF->getGame()->isKeyDown(VK_F4))
- {
- stOnFootData OF;
- OF = SF->getSAMP()->getPlayers()->pLocalPlayer->onFootData;
- OF.sKeys = 1024;
- BitStream OFsync;
- OFsync.Write((BYTE)ID_PLAYER_SYNC);
- OFsync.Write((PCHAR)&OF, sizeof(stOnFootData));
- SF->getRakNet()->SendPacket(&OFsync);
- SF->getSAMP()->getChat()->AddChatMessage(-1, "Типо флуууууууд");
- }
- };
- BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReasonForCall, LPVOID lpReserved)
- {
- switch (dwReasonForCall)
- {
- case DLL_PROCESS_ATTACH:
- SF->initPlugin(mainloop, hModule);
- break;
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement