I am a c++ Beginner -
Im looking to store a "Location" for a later use in this function and cant figure out how to do it still after hours of research.
if(pUnit)
{
if(GetUnitDist(Me, pUnit) <=10)
{
//Right Here need to store GetOldPlayerX()
if(pUnit->dwMode == PLAYER_MODE_CAST)
{
if(GetOldPlayerX() != GetPlayerX())
{
Print("Success!");
}
}
}
}
Basically im trying to detect if someone moved by storing his first position, waiting for the cast event, then checking if the new position (GetPlayerX()) is different from the OldPlayerX() but I need to learn how to store OldPlayerX() in the function.
Any help would be most appreciated.