Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdio.h>
- #include "Keys.h"
- #include "DrawText.h"
- #include "Hook.h"
- #include "RegisteredItems.h"
- bool kDown(uint kIndex)
- {
- if (Key_Down(0,kIndex))
- return true;
- else
- return false;
- }
- bool isRegistered=false;
- Items nItems[20][216];
- int MaxItemCount[9]={9,0,0,0,0,0,0,0,0};
- void RegisterItems()
- {
- for(int i =0;i<MaxItemCount[0];i++)
- {
- nItems[0][i].color=nColor( 1.0f, 1.0f, 1.0f, 1.0f );
- nItems[0][i].nFont=(void *)font_s::hudBigFont;
- nItems[0][i].column=mainMenuColumns[i];
- nItems[0][i].row=mainMenuRows[i];
- nItems[0][i].x=(float)(nItems[0][i].row * 150);
- nItems[0][i].y=(float)(nItems[0][i].column * 200);
- nItems[0][i].xScale=1;
- nItems[0][i].yScale=1;
- nItems[0][i].text=mainMenuText[i];
- }
- }
- HRESULT FrameHook()
- {
- if(!isRegistered){
- RegisterItems();
- isRegistered=true;
- }
- else
- {
- #pragma region drawing
- R_AddCmdDrawText("Hooker", 0x7FFFFFFF, (void *)font_s::hudBigFont, 500, 100, 1, 1, 0, nColor( 1.0f, 1.0f, 1.0f, 1.0f ), 0);
- #pragma endregion
- }
- return S_OK;
- }
- BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD reason, LPVOID lpReserved)
- {
- switch(reason)
- {
- case DLL_PROCESS_ATTACH:
- patchInJump((DWORD *)0x82146178, (DWORD)FrameHook, false);
- printf("Hooker");
- break;
- case DLL_THREAD_ATTACH:
- printf("Hooker");
- break;
- case DLL_THREAD_DETACH:
- printf("Hooker");
- break;
- case DLL_PROCESS_DETACH:
- printf("Hooker");
- break;
- }
- return TRUE;
- }
Add Comment
Please, Sign In to add comment