Hallo Community,
Habe ein Problem mit meinem Tacho und Uhrzeit textdraw.
Habe gerade aus meinem altem Script meine Uhr und Datum mal in mein Script rein gemacht und irgenwie vertragen sich die Zwei Textdraw's nicht
Sobald ich die Uhr und Datum eingefügt habe steht die nicht oben wo sie sein sollte sondern im Tacho O.o
Hier sind die codes
Tacho Textdraw:Inhalt anzeigen
{
TBox[i] = TextDrawCreate(690.000000, 340.000000, "I");
TextDrawBackgroundColor(TBox[i], 255);
TextDrawFont(TBox[i], 1);
TextDrawLetterSize(TBox[i], 0.500000, 4.000000);
TextDrawColor(TBox[i], -1);
TextDrawSetOutline(TBox[i], 0);
TextDrawSetProportional(TBox[i], 1);
TextDrawSetShadow(TBox[i], 1);
TextDrawUseBox(TBox[i], 1);
TextDrawBoxColor(TBox[i], 150);
TextDrawTextSize(TBox[i], 531.000000, 0.000000);
TextDrawSetSelectable(TBox[i], 0);
Inhalt anzeigen
Inhalt anzeigen
TextDrawBackgroundColor(Tempo[i], 255);
TextDrawFont(Tempo[i], 1);
TextDrawLetterSize(Tempo[i], 0.210000, 0.899999);
TextDrawColor(Tempo[i], -16776961);
TextDrawSetOutline(Tempo[i], 1);
TextDrawSetProportional(Tempo[i], 1);
TextDrawSetSelectable(Tempo[i], 0);
Inhalt anzeigen
Inhalt anzeigen
TextDrawBackgroundColor(Model[i], 255);
TextDrawFont(Model[i], 1);
TextDrawLetterSize(Model[i], 0.210000, 0.899999);
TextDrawColor(Model[i], -16776961);
TextDrawSetOutline(Model[i], 1);
TextDrawSetProportional(Model[i], 1);
TextDrawSetSelectable(Model[i], 0);
Inhalt anzeigen
Inhalt anzeigen
TextDrawBackgroundColor(Schaden[i], 255);
TextDrawFont(Schaden[i], 1);
TextDrawLetterSize(Schaden[i], 0.210000, 0.899999);
TextDrawColor(Schaden[i], 931594495);
TextDrawSetOutline(Schaden[i], 1);
TextDrawSetProportional(Schaden[i], 1);
TextDrawSetSelectable(Schaden[i], 0);
Inhalt anzeigen
Inhalt anzeigen
TextDrawBackgroundColor(Tankl[i], 255);
TextDrawFont(Tankl[i], 1);
TextDrawLetterSize(Tankl[i], 0.210000, 0.899999);
TextDrawColor(Tankl[i], 931594495);
TextDrawSetOutline(Tankl[i], 1);
TextDrawSetProportional(Tankl[i], 1);
TextDrawSetSelectable(Tankl[i], 0);
}
SetTimer("TachoUpdate",100,true);
Inhalt anzeigen
Inhalt anzeigen
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
Inhalt anzeigen
Inhalt anzeigen
Inhalt anzeigen
Inhalt anzeigen
TextDrawSetString(Tempo[i],_str);
TextDrawShowForPlayer(i,Tempo[i]);
Inhalt anzeigen
Inhalt anzeigen
TextDrawSetString(Model[i],_str);
TextDrawShowForPlayer(i,Model[i]);
Inhalt anzeigen
Inhalt anzeigen
new string[126];
GetVehicleHealth(GetPlayerVehicleID(i),vHealth);
if(vHealth >= 999.0)
{
format(string, sizeof(string), "~g~Schaden:~g~%.1f", vHealth);
TextDrawSetString(Schaden[i],string);
TextDrawShowForPlayer(i,Schaden[i]);
}
else if(vHealth >= 750.0 && vHealth < 999.0)
{
format(string, sizeof(string), "~g~Schaden:~g~%.1f", vHealth);
TextDrawSetString(Schaden[i],string);
TextDrawShowForPlayer(i,Schaden[i]);
}
else if(vHealth >= 375.0 && vHealth < 750.0)
{
format(string, sizeof(string), "~g~Schaden:~y~%.1f", vHealth);
TextDrawSetString(Schaden[i],string);
TextDrawShowForPlayer(i,Schaden[i]);
}
else if(vHealth < 375.0)
{
format(string, sizeof(string), "~g~Schaden:~r~%.1f", vHealth);
TextDrawSetString(Schaden[i],string);
TextDrawShowForPlayer(i,Schaden[i]);
}
}
else
{
TextDrawHideForPlayer(i,TBox[i]);
TextDrawHideForPlayer(i,Tempo[i]);
TextDrawHideForPlayer(i,Model[i]);
TextDrawHideForPlayer(i,Schaden[i]);
TextDrawHideForPlayer(i,Tankl[i]);
}
}
}
return 1;
}
Und hier die Uhr und DatumInhalt anzeigen
{
new Text:Clock;
new hour,minute,second;
gettime(hour,minute,second);
new string[256];
new string2[256];
if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}
else {format(string,25,"%d:%d",hour,minute);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(549,24,string);
TextDrawLetterSize(Clock,0.55,2);
TextDrawFont(Clock,3);
TextDrawBackgroundColor(Clock,0x000000AA);
TextDrawSetOutline(Clock,2);
TextDrawShowForAll(Clock);
SetTimer("time",30000,0);
if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}
Inhalt anzeigen
Inhalt anzeigen
new day,month,year;
getdate(day,month,year);
if (day <= 9){format(string2,25,"0%d.%d.%d",year,month,day);}
else if (month <= 9 && day >= 9) {format(string2,25,"%d.0%d.%d",year,month,day);}
else {format(string2,25,"%d.%d.%d",year,month,day);}
TextDrawHideForAll(Datum);
Datum=TextDrawCreate(500,3,string2);
TextDrawLetterSize(Datum,0.55,2);
TextDrawFont(Datum,3);
TextDrawBackgroundColor(Datum,0x000000AA);
TextDrawSetOutline(Datum,2);
TextDrawShowForAll(Datum);
return 1;
}
Hier auch ein Screen
http://prntscr.com/7tbdx1
Uhr ist da im kasten Obwohl der kasten eig nur dann ersteint wen man im auto ist ![]()
Uhr sollte dann oben sein.
Hoffe mir kann da einer Helfen ![]()