CUser * pUser = ((CUser*)this);
int i = 1;<< This should represent minutes
if(IsAfk() && GetTickCount() - pUser->m_dwLastWalkTick >= MIN( i++ ))//Set timer based on each minute or 2 or etc...Right now it is popping up constantly instead of doing it only once a minute
{
g_UserMng.UpdateAfkState(pUser);
pUser->AddText("You character is still AFK.");
return;
}
if( GetTickCount() - pUser->m_dwLastWalkTick >= MIN( 1 ) ) //hier wird die Zeit eingestellt!
{
if(!IsAfk())
{
m_bAfk = TRUE;
g_UserMng.UpdateAfkState(pUser);
pUser->AddText("You will now be displayed as AFK.");
}
}