Jump to content

Question

Posted

ba am incercat sa fac un sistem de secunde langa ora, dar se updateaza odata ce se schimba si munutul, dar eu l-am pus pe tmpsecond!
 

function SyncUp() {
	new query[256], tmphour, tmpminute, tmpsecond, hour, minn, sec, Year, Month, Day;
	//GetFMembers();
	//GClanMembers();
	gettime(hour,minn,sec);
	gettime(tmphour, tmpminute, tmpsecond);
	getdate(Year, Month, Day);	
	new datestr[128], timestr[32], timestr1[32]; ----------------->> eu am adaugat timestr1[32]
	format(datestr,128,"~r~%02d ~w~~h~%02d %d", Day, Month, Year);
	format(timestr,32,"%02d~r~:~w~~h~%02d",tmphour,tmpminute);
	format(timestr1,32,"~r~:%02d",tmpsecond);   ----------------->> eu am adaugat asta (aici am pus tmpsecond)
	TextDrawSetString(txtTimeDisp[0],timestr);
	TextDrawSetString(txtTimeDisp[1],timestr1); ----------------->> eu am adaugat asta
	TextDrawSetString(txtDateDisp,datestr);

sa-mp-073.png.5ba836d78571832441d159bbc599f24b.png

5 answers to this question

Recommended Posts

  • 0
Posted
	new query[256], tmphour, tmpminute, tmpsecond, hour, minn, sec, Year, Month, Day;
	//GetFMembers();
	//GClanMembers();
	gettime(hour,minn,sec);
	gettime(tmphour, tmpminute, tmpsecond);
	getdate(Year, Month, Day);
	new datestr[128], timestr[32];
	format(datestr,128,"~r~%02d ~w~~h~%02d %d", Day, Month, Year);
	format(timestr,32,"%02d~r~:~w~~h~%02d:~w~~h~%02d",tmphour,tmpminute,tmpsecond);
	TextDrawSetString(txtTimeDisp[0],timestr);
	TextDrawSetString(txtDateDisp,datestr);

Vezi ca timer-ul sa faca update la functia SyncUp la 1 secunda.

  • 0
Posted
Acum 30 minute, andy47 a spus:

	new query[256], tmphour, tmpminute, tmpsecond, hour, minn, sec, Year, Month, Day;
	//GetFMembers();
	//GClanMembers();
	gettime(hour,minn,sec);
	gettime(tmphour, tmpminute, tmpsecond);
	getdate(Year, Month, Day);
	new datestr[128], timestr[32];
	format(datestr,128,"~r~%02d ~w~~h~%02d %d", Day, Month, Year);
	format(timestr,32,"%02d~r~:~w~~h~%02d:~w~~h~%02d",tmphour,tmpminute,tmpsecond);
	TextDrawSetString(txtTimeDisp[0],timestr);
	TextDrawSetString(txtDateDisp,datestr);

Vezi ca timer-ul sa faca update la functia SyncUp la 1 secunda.

ba da eu am alt textdraw nu e acelasi cu ala de la ora si minut! conteaza?
 

	txtTimeDisp[0] = TextDrawCreate(575.699462, 15.279924, "12~r~:~w~~h~30");
	TextDrawLetterSize(txtTimeDisp[0], 0.400000, 1.600000);
	TextDrawAlignment(txtTimeDisp[0], 2);
	TextDrawColor(txtTimeDisp[0], -1);
	TextDrawSetShadow(txtTimeDisp[0], 0);
	TextDrawSetOutline(txtTimeDisp[0], 1);
	TextDrawBackgroundColor(txtTimeDisp[0], 255);
	TextDrawFont(txtTimeDisp[0], 1);
	TextDrawSetProportional(txtTimeDisp[0], 1);
	TextDrawSetShadow(txtTimeDisp[0], 0);

	txtTimeDisp[1] = TextDrawCreate(594.799804, 19.619983, "~r~:15");
	TextDrawLetterSize(txtTimeDisp[1], 0.238001, 0.940000);
	TextDrawAlignment(txtTimeDisp[1], 1);
	TextDrawColor(txtTimeDisp[1], -1);
	TextDrawSetShadow(txtTimeDisp[1], 0);
	TextDrawSetOutline(txtTimeDisp[1], 1);
	TextDrawBackgroundColor(txtTimeDisp[1], 255);
	TextDrawFont(txtTimeDisp[1], 1);
	TextDrawSetProportional(txtTimeDisp[1], 1);
	TextDrawSetShadow(txtTimeDisp[1], 0);

 

  • 0
Posted
Acum 17 ore, andy47 a spus:

Nu vad rostul creari unui nou textdraw.

Am creat un nou td pentru ca secundele vreau sa fie mai mici ca minutul, dupa cum se vede in poza. Am vrut sa fac gen cum e pe nephrite!
Dar oricum nu mai pun secunde m-am razgandit

  • 0
Posted
1 minute ago, caltabos said:

Am creat un nou td pentru ca secundele vreau sa fie mai mici ca minutul, dupa cum se vede in poza. Am vrut sa fac gen cum e pe nephrite!
Dar oricum nu mai pun secunde m-am razgandit

Asa ti-as recomanda si eu. Problema rezolvata. T/C!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.