Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define WINDOWS_LEAN_AND_MEAN
- #include <windows.h>
- #include <stdio.h>
- #include "Include/SDK/amx/amx.h"
- #include "Include/SDK/plugincommon.h"
- typedef void (*logprintf_t)(char* format, ...);
- logprintf_t logprintf;
- PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports()
- {
- return SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES;
- }
- PLUGIN_EXPORT bool PLUGIN_CALL Load( void **ppData )
- {
- /*
- 0045739E EB 23 JMP SHORT samp-ser.004573C3
- 0045739E EB 23 JMP SHORT samp-ser.004573C3
- */
- logprintf = (logprintf_t) ppData[PLUGIN_DATA_LOGPRINTF];
- BYTE pNewJMP[] = {0xEB ,0x23 ,0x7C ,0xFF ,0xFF ,0x90 ,0x90};
- DWORD patchPlace;
- patchPlace = (DWORD)GetModuleHandle( "samp-server.exe" ) + 0x5739e;
- DWORD orginalProt;
- VirtualProtect((PVOID)patchPlace,sizeof(pNewJMP),PAGE_EXECUTE_READWRITE,&orginalProt);
- memcpy((PVOID)patchPlace,pNewJMP,sizeof(pNewJMP));
- logprintf(" - [SA:MP 0.3x R1-2 - Incomming Connection Remover by MyU (https://forum.sa-mp.de/index.php?page=User&userID=11194) ] -");
- return true;
- }
- PLUGIN_EXPORT int PLUGIN_CALL AmxLoad( AMX *amx )
- {
- return 1;
- }
- PLUGIN_EXPORT int PLUGIN_CALL AmxUnload( AMX *amx )
- {
- return 0;
- }
- PLUGIN_EXPORT void PLUGIN_CALL Unload( )
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement