Question How to fix it please help

TreeV2

Member
Member
Member
Member
Status
Offline
Joined
Nov 16, 2019
Messages
93
Reaction score
72
How i can fix this error :
1617985770553.png
pls help idk coding here my code:

namespace variables { bool thirdperson; } if (variables ::thirdperson) { if (Interfaces::Engine->IsInGame()) { if (hackManager.pLocal()) { //Vector vecAngles; Interfaces::Engine->GetViewAngles(qLastTickAngles); if (Menu::Window.VisualsTab.EffectThirdPerson.GetState() && hackManager.pLocal()->IsAlive()) { if (!Interfaces::pInput->m_fCameraInThirdPerson) { Interfaces::pInput->m_fCameraInThirdPerson = true; Interfaces::pInput->m_vecCameraOffset = Vector(qLastTickAngles.x, qLastTickAngles.y, 40); } } else { Interfaces::pInput->m_fCameraInThirdPerson = false; Interfaces::pInput->m_vecCameraOffset = Vector(qLastTickAngles.x, qLastTickAngles.y, 0); } } } }
 

Di1do

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Mar 17, 2021
Messages
54
Reaction score
7
Consider declare namespace in a header file, not in a source file. You need to use one of your .hpp file (for example, visuals.hpp). Also, you need to make a function from it, not a variable:

C++:
namespace variables
{
    bool thirdperson()
    {
        if (Interfaces::Engine->IsInGame())
        {
            if (hackManager.pLocal())
            {
                //Vector vecAngles;
                Interfaces::Engine->GetViewAngles(qLastTickAngles);
                if (Menu::Window.VisualsTab.EffectThirdPerson.GetState() && hackManager.pLocal()->IsAlive())
                {

                    if (!Interfaces::pInput->m_fCameraInThirdPerson)
                    {

                        Interfaces::pInput->m_fCameraInThirdPerson = true;

                        Interfaces::pInput->m_vecCameraOffset = Vector(qLastTickAngles.x, qLastTickAngles.y, 40);
                    }
                }
                else
                {
                    Interfaces::pInput->m_fCameraInThirdPerson = false;

                    Interfaces::pInput->m_vecCameraOffset = Vector(qLastTickAngles.x, qLastTickAngles.y, 0);
                }
            }
        }
    }
}

Then call it in your .cpp file...
 
Top