Data, Horario, FPS

Posts 1–15 of 38 · Page 1 of 3
Data, Horario, FPS

Bom Galera, Achei essas Funções em uma Base, então quero compartilhar com quem nao teve a oportunidade de encontra - las

Code:
CHAR *cFunctions::D3DFps()
{
	static char FrameRate[50] = "";
	static float myFPS, LastCount, CurrentCount;

	CurrentCount = clock() * 0.001f;
	++myFPS;
	if((CurrentCount - LastCount) > 1.0f) {
		LastCount = CurrentCount;
		sprintf(FrameRate, "[Game FPS: %d]", INT(myFPS));
		myFPS = NULL;
	}
	return FrameRate;
}

CHAR *cFunctions::Date(VOID)
{
	static CHAR cdate[1524] = "";
	struct tm * current_tm;
	time_t current_time;
	time (&current_time);
	current_tm = localtime (&current_time);
	sprintf(cdate, "Dia: %02d / %d / %d", current_tm->tm_mday, current_tm->tm_mon + 1, current_tm->tm_year - 100 + 2000);
	return cdate;
}

CHAR *cFunctions::Time(VOID)
{
	static CHAR ctime[1524] = "";
	struct tm *current_tm;
	time_t current_time;
	time (&current_time);
	current_tm = localtime (&current_time);
	if(current_tm->tm_hour>12)
		sprintf(ctime, "Horario: %d:%02d:%02d PM", current_tm->tm_hour - 12, current_tm->tm_min, current_tm->tm_sec);
	else
		sprintf(ctime, "Horario: %d:%02d:%02d AM", current_tm->tm_hour, current_tm->tm_min, current_tm->tm_sec);
	return ctime;
}
Code:
	if(Var.Folder[5]) {
		DrawBox(PosX + 167, PosY, 120, 40, TBlack, Black, pDevice);
		        DrawText(pDevice, PosX + 175, PosY + 03, Red, Functions->D3DFps()) // FPS
			DrawText(pDevice, PosX + 175, PosY + 15, Red, Functions->Date()); // Data
			DrawText(pDevice, PosX + 175, PosY + 25, Red, Functions->Time()); // Hórario
		}
	}
Depois de Pronto Ficara assim:


Créditos:
@Qmo


BASE4STUDY posted by BioHuman
Quote Originally Posted by FR1GHT View Post
BASE4STUDY posted by BioHuman
Sim, Postei Porque tinha algumas Pessoas me Pedindo
Quote Originally Posted by luizimloko View Post


Sim, Postei Porque tinha algumas Pessoas me Pedindo
Eu se fosse querer data, queria as que mostram as strings
Quote Originally Posted by FR1GHT View Post


Eu se fosse querer data, queria as que mostram as strings
Code:
sprintf(cdate, "Dia: %02d / %d / %d", current_tm->tm_wday, current_tm->tm_mday + 1, current_tm->tm_year - 100 + 2000);
Dia: Segunda / Agosto / 2012
Quote Originally Posted by FR1GHT View Post


Eu se fosse querer data, queria as que mostram as strings
é mole, mesma lógica do esp rank...
Procurei isto ontem e não achei, obrigado por compartilhar.
Good Job Mano !
Parabéns cara muito bom rs
AWM One Hit KIll? vc deve ta brincando com minha face né?




AWM tem 390 de dano, Sendo que o jogador tem 100 de vida
Quote Originally Posted by BACKD00R View Post
AWM One Hit KIll? vc deve ta brincando com minha face né?




AWM tem 390 de dano, Sendo que o jogador tem 100 de vida
Acho que era Sniper One Hit Killl ,
E você nem entra mais no skype cleiton ,
Quote Originally Posted by ronaldo159BB View Post


Acho que era Sniper One Hit Killl ,
E você nem entra mais no skype cleiton ,
Foda foi o eduardo casas ondem o cara tem maior voz fina KKKKKKKKKKKKKKKKKKKKKK
Quote Originally Posted by TokolocoSK View Post


Foda foi o eduardo casas ondem o cara tem maior voz fina KKKKKKKKKKKKKKKKKKKKKK
Nem entrei ontem,hoje talvez eu entre !
Apesar de estar postada naquela base, pra quem não sabia retirar aí está bem simplificado é só dar C&P.
Posts 1–15 of 38 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?