[Pomoc] Sat


Započeo Lekac, Septembar 09, 2016, 21:28:10 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja
Detaljan opis problema: Moze mi ko pomoci kako da stavim vrjeme i datum??
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://noobot.info/uploader/image.php?di=5ETE

koristis da se vrijeme update na svakih 1 sec i koristis gettime i getdate funkcije
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Jednostavno definises textdraw sata i datuma i pocnimo

Ispod OnGameModeInit stavljas Timer
SetTimer("VremeTimer",1000,true); //Naravno ti mozes definisat kako oos ali kod mene je VremeTimer

i onda pravimo funkciju i public sa istim nazivom VremeTimer

forward VremeTimer(playerid);
public VremeTimer(playerid)
{
        new string[128],godina,mjesec,dan,sati,minute;
        getdate(godina, mjesec, dan), gettime(sati, minute);
        format(string, sizeof string, "%d/%s%d/%s%d", dan, ((mjesec < 10) ? ("0") : ("")), mjesec, (godina < 10) ? ("0") : (""), godina);
        TextDrawSetString(ImeTdeZaDatum, string);
        format(string, sizeof string, "%s%d:%s%d", (sati < 10) ? ("0") : (""), sati, (minute < 10) ? ("0") : (""), minute);
        TextDrawSetString(ImeTdeZaVreme, string);
}
I to je to  :D ako bude kakih problema javi se
• G A M E M O D E •
• F I L T E R S C R I P T •
• T U T O R I A L •


Citat
You are what you believe yoursefl to be.

Ovo bi ti trebalo raditi 100 % ali moras rijesiti TDE prvo da ti radi ovo
FUNCTION: SekundTimer()
{
    //print("SekundTimer TIMER pozvan!");

	new string[256];
	//new xrr[200];

	new hou,mou;
	gettime(hou,mou);
	new srk[64];
	format(srk, 64, "~w~%02d~w~:~w~%02d",hou,mou);
	TextDrawSetString(vremebrt, srk);
}

@Kirali jel tu moram naci samo stavit sat i minute?