Jump to content
  • 0

problema timer


caltabos

Question

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
	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.

Link to comment
Share on other sites

  • 0
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);

 

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.