Kann mir einer, das datum über die uhr machen?
Bekomme das nicht hin...
/*
.:: Homer's REAL Clock 1.2 ::.
.:: All Rights Reserved ::.
.:: PAWNTeam™ 2008 ::.
*/
#include <a_samp>
new Text:HClock;
new Text:HClock2;
new Text:HClock3;
new TimeTimer;
forward TimeUpdate();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Homer's REAL Clock 1.2 - PAWNTeam 2008");
print("--------------------------------------\n");
TimeTimer = SetTimer("TimeUpdate",1000,1);
HClock = TextDrawCreate(547, 40, "--:--");
TextDrawLetterSize(HClock, 0.5, 1.5);
TextDrawFont(HClock, 2);
TextDrawSetShadow(HClock, 2);
TextDrawSetOutline(HClock,2);
HClock2 = TextDrawCreate(607, 40, "--");
TextDrawLetterSize(HClock2, 0.4, 1.1);
TextDrawFont(HClock2, 2);
TextDrawSetShadow(HClock2, 2);
TextDrawSetOutline(HClock2,2);
HClock3 = TextDrawCreate(520, 105, "--/--/----");
TextDrawLetterSize(HClock3, 0.4, 1.1);
TextDrawFont(HClock3, 2);
TextDrawSetShadow(HClock3, 2);
TextDrawSetOutline(HClock3,2);
return 1;
}
public OnFilterScriptExit()
{
KillTimer(TimeTimer);
TextDrawDestroy(HClock);
TextDrawDestroy(HClock2);
TextDrawDestroy(HClock3);
return 1;
}
public TimeUpdate()
{
new Hour, Min, Sec, Day, Month, Year;
new TimeString[256], TimeString2[256], TimeString3[256];
gettime(Hour, Min, Sec);
getdate(Year, Month, Day);
if(Min <= 9)
{
format(TimeString,25,"%d:0%d",Hour, Min);
}else{
format(TimeString,25,"%d:%d",Hour, Min);
}
if(Sec <= 9)
{
format(TimeString2,25,"0%d", Sec);
}else{
format(TimeString2,25,"%d", Sec);
}
if(Day <= 9)
{
format(TimeString3,25,"0%d/%d/%d", Day, Month, Year);
}else{
format(TimeString3,25,"%d/%d/%d", Day, Month, Year);
}
TextDrawSetString(HClock,TimeString);
TextDrawShowForAll(HClock);
TextDrawSetString(HClock2,TimeString2);
TextDrawShowForAll(HClock2);
TextDrawSetString(HClock3,TimeString3);
TextDrawShowForAll(HClock3);
return 1;
}