Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #ifndef PROCMEM_H
- #define PROCMEM_H
- #include <Windows.h>
- #include <stdbool.h>
- typedef struct
- {
- float flMatrix[4][4];
- }WorldToScreenMatrix_t;
- float Get3dDistance(float * myCoords, float * enemyCoords)
- {}
- bool WorldToScreen(float * from, float * to)
- {
- WorldToScreenMatrix_t WorldToScreenMatrix;
- float w = 0.0f;
- to[0] = WorldToScreenMatrix.flMatrix[0][0] * from[0] + WorldToScreenMatrix.flMatrix[0][1] * from[1] + WorldToScreenMatrix.flMatrix[0][2] * from[2] + WorldToScreenMatrix.flMatrix[0][3];
- to[1] = WorldToScreenMatrix.flMatrix[1][0] * from[0] + WorldToScreenMatrix.flMatrix[1][1] * from[1] + WorldToScreenMatrix.flMatrix[1][2] * from[2] + WorldToScreenMatrix.flMatrix[1][3];
- w = WorldToScreenMatrix.flMatrix[3][0] * from[0] + WorldToScreenMatrix.flMatrix[3][1] * from[1] + WorldToScreenMatrix.flMatrix[3][2] * from[2] + WorldToScreenMatrix.flMatrix[3][3];
- if (w < 0.01f)
- return false;
- float invw = 1.0f / w;
- to[0] *= invw;
- to[1] *= invw;
- int width = (int) (rc.right - rc.left);
- int height = (int) (rc.bottom - rc.top);
- float x = width / 2;
- float y = height / 2;
- x += 0.5 * to[0] * width + 0.5;
- y -= 0.5 * to[1] * height + 0.5;
- to[0] = x + rc.left;
- to[1] = y + rc.top;
- return true;
- }
- void DrawBone(int bone1, int bone2)
- {
- float Bone1[3];
- float W2S_Bone1[3];
- ;
- float Bone2[3];
- float W2S_Bone2[3];
- if (WorldToScreen(Bone2, W2S_Bone2) && WorldToScreen(Bone1, W2S_Bone1))
- (W2S_Bone1[0], W2S_Bone1[1], W2S_Bone2[0], W2S_Bone2[1], 255, 255, 255, 255);
- }
- bool ESP = true;
- bool callOnce = false;
- int Render()
- {
- if (!callOnce)
- {
- callOnce = true;
- }
- int tWnd;
- float GetForegroundWindow;
- if (tWnd == ESP())
- {
- char * value = "RainbowSixGame";
- HWND newhwnd = FindWindow(NULL, value);
- if (newhwnd != NULL) {
- }
- else {
- }
- for (int i = 0; i < 64; i++)
- {
- pEntity->ReadData(i);
- float W2S[3];
- float W2S_Head[3];
- if (WorldToScreen(pEntity->Pos, W2S) && WorldToScreen(pEntity->HeadPos, W2S_Head));
- {
- int height = abs(W2S[1] - W2S_Head[1]);
- int width = height / 2;
- if (pEntity->isAlive && pLocal->Player != pEntity->Player)
- {
- //Check if the player is in our team
- if (pEntity->Team == pLocal->Team)
- DrawBox(W2S[0] - (width / 2), W2S[1] - height, width, height, 1, 0, 0, 255, 255);
- else//Check if the player is not in our team
- DrawBox(W2S[0] - (width / 2), W2S[1] - height, width, height, 1, 255, 0, 0, 255);
- //Outline and inline boxes
- DrawBox(W2S[0] - (width / 2) - 1, W2S[1] - height - 1, width + 2, height + 2, 1, 0, 0, 0, 255);
- DrawBox(W2S[0] - (width / 2) + 1, W2S[1] - height + 1, width - 2, height - 2, 1, 0, 0, 0, 255);
- }
- }
- }
- p_Device->EndScene();
- p_Device->PresentEx(0, 0, 0, 0, 0);
- return 0;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement