Originally Posted by
Saltine
According to MSDN, GetTickCount64() returns the number of milliseconds since the system was started. Thus, the first line checks if it has been 500 ms since the last time the variable dwConsoleCalled was set. If 500 ms has elapsed, it sets the variable to the current amount of ms, and allows the function to continue execution. If 500 ms has not yet passed, the function returns immediately and does not continue to run. This combined guarantees that at least 500 milliseconds will elapse between each time the code following this if statement is executed.
thanks, so how would i make it spam 1 time a second?
Code:
if(Main->Variables->iDelaySpeed)
{
if(Main->D3D->Devices->dwConsoleCalled + 1000 > GetTickCount64()) return;
else Main->D3D->Devices->dwConsoleCalled = GetTickCount64();
}