Class Error
Hi,
So, The problem is I can use it freely like, i include the header (#include "MManagerLocal.h") and i can use the Me->GetPlayerBase(); and every function, but when i try to compile is giving errors, most of variables and offset names saying:
In my main.cpp i include the header too, but in Variable.h and Offsets.h i don't, but is giving me that "i'm trying to re-declare them (variables/offsets) again"
Searched for every error, re-wrote everything and nothing, maybe is something simple in front of my eyes that i can't see (dunno why), anyway thanks if anyone can help!
So, The problem is I can use it freely like, i include the header (#include "MManagerLocal.h") and i can use the Me->GetPlayerBase(); and every function, but when i try to compile is giving errors, most of variables and offset names saying:
Code:
...already defined in main.obj
Searched for every error, re-wrote everything and nothing, maybe is something simple in front of my eyes that i can't see (dunno why), anyway thanks if anyone can help!
MManagerLocal.cpp
Code:
#include "MemoryManagerLocalPlayer.h"
#include <stdarg.h>
#include <ios>
#include <iostream>
#include <string>
#include <time.h>
#include <Windows.h>
MManagerLocalPlayer* Me = new MManagerLocalPlayer;
MManagerLocalPlayer::MManagerLocalPlayer() {};
MManagerLocalPlayer::~MManagerLocalPlayer() {};
//---------------------------------------------------------------------------------------------------
// READING MEMORY
//---------------------------------------------------------------------------------------------------
/* DWORD */
DWORD MManagerLocalPlayer::GetPlayerBase() {
return mem.Read<DWORD>(modClient.dwBase + offLocalPlayer);
}
DWORD MManagerLocalPlayer::GetEngineBase() {
return mem.Read<DWORD>(modEngine.dwBase + offEnginePointer);
}
/* BYTE */
BYTE MManagerLocalPlayer::GetFlag() {
//FUNCTION
}
/* FLOAT */
float MManagerLocalPlayer::GetFlash() {
//FUNCTION
}
/* BOOL */
bool MManagerLocalPlayer::GetScopped() {
//FUNCTION
}
/* INT */
int MManagerLocalPlayer::GetShotsFired() {
//FUNCTION
}
int MManagerLocalPlayer::InGame() {
//FUNCTION
}
int MManagerLocalPlayer::GetTeam() {
//FUNCTION
}
int MManagerLocalPlayer::GetCrosshairId() {
//FUNCTION
}
/* VECTOR */
Vector MManagerLocalPlayer::GetVelocity() {
//FUNCTION
}
Vector MManagerLocalPlayer::GetViewOrigin() {
//FUNCTION
}
Vector MManagerLocalPlayer::GetPosition() {
//FUNCTION
}
Vector MManagerLocalPlayer::GetPunch() {
//FUNCTION
}
Vector MManagerLocalPlayer::GetAngles() {
//FUNCTION
}
Vector MManagerLocalPlayer::GetEyesPos() {
//FUNCTION
}
Vector MManagerLocalPlayer::NormalizeAngles(Vector angle) {
//FUNCTION
}
//---------------------------------------------------------------------------------------------------
// WRITING MEMORY
//---------------------------------------------------------------------------------------------------
void MManagerLocalPlayer::Jump(BYTE fFlag) {
//FUNCTION
}
void MManagerLocalPlayer::SetFlash(float value) {
//FUNCTION
}
void MManagerLocalPlayer::SetAngles(Vector value) {
//FUNCTION
}
void MManagerLocalPlayer::SetSensitive(float value) {
//FUNCTION
}
void MManagerLocalPlayer::Click() {
//FUNCTION
}
MManagerLocal.h
Code:
#ifndef MEMORYPLAYER_H
#define MEMORYPLAYER_H
#include "PMemory.h"
#include "Variables.h"
#include "Offsets.h"
#include <string>
#include <fstream>
class MManagerLocalPlayer {
public:
MManagerLocalPlayer();
~MManagerLocalPlayer();
//---------------------------------------------------------------------------------------------------
// READING MEMORY
//---------------------------------------------------------------------------------------------------
DWORD GetPlayerBase();
DWORD GetEngineBase();
/* BYTE */
BYTE GetFlag();
/* FLOAT */
float GetFlash();
/* BOOL */
bool GetScopped();
/* INT */
int GetShotsFired();
int InGame();
int GetTeam();
int GetCrosshairId();
/* VECTOR */
Vector GetVelocity();
Vector GetViewOrigin();
Vector GetPosition();
Vector GetPunch();
Vector GetAngles();
Vector GetEyesPos();
Vector NormalizeAngles(Vector angle);
//---------------------------------------------------------------------------------------------------
// WRITING MEMORY
//---------------------------------------------------------------------------------------------------
void Jump(BYTE fFlag);
void SetFlash(float value);
void SetAngles(Vector value);
void SetSensitive(float value);
void Click();
};
extern MManagerLocalPlayer* Me;
#endif
