Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <iostream>
- void Ayam77();
- BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
- {
- if (dwReason == DLL_PROCESS_ATTACH) {
- DisableThreadLibraryCalls(hModule); //disables attach and detach notifications
- CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Ayam77, NULL, NULL, NULL); //creates a new thread and starts at function mainHack()
- }
- else if (dwReason == DLL_PROCESS_DETACH) {
- }
- return TRUE;
- }
- void Ayam77() {
- D3DXMATRIX viewmatrix = m_Scene->m_pToViewMatrix->m_pViewMatrix;
- D3DXVECTOR3 direction = D3DXVECTOR3(viewmatrix._11, viewmatrix._21, viewmatrix._31);
- if (GetAsyncKeyState(VK_RIGHT))
- {
- D3DXVECTOR3 direction = GetRight(&viewmatrix);
- pLocalPlayer->m_Position.x += direction.x * 2;
- pLocalPlayer->m_Position.y += direction.y * 2;
- pLocalPlayer->m_Position.z += direction.z * 2;
- }
- if (GetAsyncKeyState(VK_LEFT))
- {
- D3DXVECTOR3 direction = GetRight(&viewmatrix);
- direction *= -1;
- pLocalPlayer->m_Position.x += direction.x * 2;
- pLocalPlayer->m_Position.y += direction.y * 2;
- pLocalPlayer->m_Position.z += direction.z * 2;
- }
- if (GetAsyncKeyState(VK_UP))
- {
- D3DXVECTOR3 direction = GetForward(&viewmatrix);
- pLocalPlayer->m_Position.x += direction.x * 2;
- pLocalPlayer->m_Position.y += direction.y * 2;
- pLocalPlayer->m_Position.z += direction.z * 2;
- }
- if (GetAsyncKeyState(VK_DOWN))
- {
- D3DXVECTOR3 direction = GetForward(&viewmatrix);
- direction *= -1;
- pLocalPlayer->m_Position.x += direction.x * 2;
- pLocalPlayer->m_Position.y += direction.y * 2;
- pLocalPlayer->m_Position.z += direction.z * 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment