KOSTENLOSE REGISTRIERUNG - FREE REGISTER
  • Willkommen, Gast!
  • Samstag, 28. Februar 2026, 22:06:24
Position: Home » Grand Theft Auto: San Andreas » Multiplayer » Realtime Uhr

Willkommen im GTAvision.com Forum

Du bist noch nicht bei uns angemeldet. Wenn das dein erster Besuch bei uns ist, so kannst du die wichtigsten Funktionen des Boards in der FAQ nachlesen. Um Beiträge zu schreiben oder neue Themen zu erstellen musst du in fast jedem Forum registriert und eingeloggt sein. Dies gilt nicht bei den Newskommentaren, dort können auch Gäste etwas schreiben ohne sich vorher registrieren zu müssen. Damit du Beiträge lesen kannst, musst du dir erst ein Forum aussuchen welches dich interessiert, z.B. GTA V - Allgemeines, dann klickst du auf ein Thema das dich interessiert z.B. "Allgemeine GTA V Plauderecke" und schon kannst du die Beiträge lesen. Um im genannten Thema zu antworten, musst du dich allerdings vorher eingeloggt haben. Viel Spaß in unserem Forum, wünscht das gesamte GTAvision.com Team.

Follow @GTAvision
Grand Theft Auto: San Andreas
Thema: Realtime Uhr [Seite 1 ]  

Kein neuer Beitrag 13.07.2009, 18:02
Beitrag #1   

Robdeflop1
Obergangster
* * * * * * O O O O O
Registrierung: 13.07.2009, 17:51
Script Editor: Pawno
Beiträge: 197

Hi

Ich habe ein Problem.
Unzwar habe ich jetzt eine Realtime Uhr eingebaut.
Aber die Alte Uhr, die auch im SP is, ist jetzt noch im Hintergrund. Wie bekomme ich die weg?
Ich bin noch kein geübter scripter.

MFG, RoB

Kein neuer Beitrag 13.07.2009, 18:06
Beitrag #2   

Recycler
Vize-Boss
* * * * * * * * * O O
Registrierung: 29.12.2006, 11:54
User-Info: nicht mehr da
Beiträge: 2146

http://wiki.sa-mp.com/wiki/TogglePlayerClock

MfG
Recycler

Kein neuer Beitrag 13.07.2009, 18:17
Beitrag #3   

FloRaX
BANNED
* * * * * * * * * * O
Registrierung: 22.08.2007, 21:05
User-Info: It´s over 9000!!!!!!!!!!!
Homepage: http://www.sxp-network.com
Lieblings-GTA: GTA: Vice City Stories
Wohnort: American Dream
Xbox Live Gamertag: Meicel
GFWL-Tag: Meicel
Social Club: N0RAX1994
Beiträge: 3700

Tipp:

Code:
1
2
TogglePlayerClock(playerid,1); // GTA Sa Uhr eingeschaltet.
TogglePlayerClock(playerid,0); // GTA Sa Uhr ausgeschaltet.


Gruß

Kein neuer Beitrag 13.07.2009, 18:45
Beitrag #4   

Robdeflop1
Obergangster
* * * * * * O O O O O
Registrierung: 13.07.2009, 17:51
Script Editor: Pawno
Beiträge: 197

xD, da hätte ich ja auch drauf kommen können :D
Thx

MFG, RoB

Kein neuer Beitrag 13.07.2009, 19:04
Beitrag #5   

Robdeflop1
Obergangster
* * * * * * O O O O O
Registrierung: 13.07.2009, 17:51
Script Editor: Pawno
Beiträge: 197

Hi

Ich habe jetzt aber noch ein Problem.
Immer wenn ich den Server starte, dann auf den Server zugreife, kackt das spiel nach der Player
class auswahl ab. Wenn ich die RL Uhr rausmache, funzt es. Vorher ging es noch.

ZitatZitat:
#include
<a_samp>
#include <time>

new SystemTime[12];
forward RealTimeUpdate();
forward TimeUpdate();

public OnFilterScriptInit()
{
SetTimer("RealTimeUpdate",1,0);
SetTimer("TimeUpdate",10000, 1);
print("\n--------------------------------------");
print(" Reallifetime Uhr");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public RealTimeUpdate()
{
new h=0, m=0, s=0;
//new string[256];
SetWorldTime(h);
//new Text:Clock;
gettime(h,m,s);
/*if (m <= 9){format(string,25,"%d:%d",h,m);
} else {format(string,25,"%d:%d",h,m);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(552,28,string);
TextDrawLetterSize(Clock,0.5,1.8);
TextDrawFont(Clock,3);
TextDrawBackgroundColor(Clock,0x000000AA);
TextDrawSetOutline(Clock,2);
TextDrawShowForAll(Clock);*/
if (h == 0){SetWorldTime(0);}
if (h == 1){SetWorldTime(1);}
if (h == 2){SetWorldTime(2);}
if (h == 3){SetWorldTime(3);}
if (h == 4){SetWorldTime(4);}
if (h == 5){SetWorldTime(5);}
if (h == 6){SetWorldTime(6);}
if (h == 7){SetWorldTime(7);}
if (h == 8){SetWorldTime(8);}
if (h == 9){SetWorldTime(9);}
if (h == 10){SetWorldTime(10);}
if (h == 11){SetWorldTime(11);}
if (h == 12){SetWorldTime(12);}
if (h == 13){SetWorldTime(13);}
if (h == 14){SetWorldTime(14);}
if (h == 15){SetWorldTime(15);}
if (h == 16){SetWorldTime(16);}
if (h == 17){SetWorldTime(17);}
if (h == 18){SetWorldTime(18);}
if (h == 19){SetWorldTime(19);}
if (h == 20){SetWorldTime(20);}
if (h == 21){SetWorldTime(21);}
if (h == 22){SetWorldTime(22);}
if (h == 23){SetWorldTime(23);}
if (h == 24){SetWorldTime(24);}
SetTimer("RealTimeUpdate",3000,0);
//format(string, sizeof(string), "The time is updated - %d:%d:%d", h, m, s);
//print(string);
return 1;
}

public TimeUpdate() {
new Hour, Minute, Seconds;
new strings[256];
new string[256];
new Text:Clock;
gettime(Hour, Minute, Seconds);
if(Hour < 10) {
format(SystemTime, sizeof(SystemTime), "0%d",Hour);
} else {
format(SystemTime, sizeof(SystemTime), "%d",Hour);
}
if(Minute < 10) {
format(SystemTime, sizeof(SystemTime), "%s:0%d",SystemTime,Minute);
} else {
format(SystemTime, sizeof(SystemTime), "%s:%d",SystemTime,Minute);
}
if (Minute <= 9) {
format(string,25,"%d:%0d",Hour,Minute);
} else {
format(string,25,"%d:%d",Hour,Minute);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(552,28,SystemTime);
TextDrawLetterSize(Clock,0.5,1.8);
TextDrawFont(Clock,3);
TextDrawBackgroundColor(Clock,0x000000AA);
TextDrawSetOutline(Clock,2);
TextDrawShowForAll(Clock);
format(strings, sizeof(strings), "System time: %s", SystemTime);
printf(strings);
return 1;
}


Woran könnte es liegen?

MFG, RoB

Kein neuer Beitrag 13.07.2009, 19:06
Beitrag #6   

FloRaX
BANNED
* * * * * * * * * * O
Registrierung: 22.08.2007, 21:05
User-Info: It´s over 9000!!!!!!!!!!!
Homepage: http://www.sxp-network.com
Lieblings-GTA: GTA: Vice City Stories
Wohnort: American Dream
Xbox Live Gamertag: Meicel
GFWL-Tag: Meicel
Social Club: N0RAX1994
Beiträge: 3700

Ähm:

Code:
1
2
3
#include
<a_samp>
#include <time>


!?

Was soll das bedeuten?

Code:
1
#include <a_samp>

Kein neuer Beitrag 13.07.2009, 19:09
Beitrag #7   

Robdeflop1
Obergangster
* * * * * * O O O O O
Registrierung: 13.07.2009, 17:51
Script Editor: Pawno
Beiträge: 197

das include a_samp benötigt man doch für jeden script. oda etwa nich?

Kein neuer Beitrag 13.07.2009, 19:14
Beitrag #8   

FloRaX
BANNED
* * * * * * * * * * O
Registrierung: 22.08.2007, 21:05
User-Info: It´s over 9000!!!!!!!!!!!
Homepage: http://www.sxp-network.com
Lieblings-GTA: GTA: Vice City Stories
Wohnort: American Dream
Xbox Live Gamertag: Meicel
GFWL-Tag: Meicel
Social Club: N0RAX1994
Beiträge: 3700

Ja, aber kuck dir mal das an:

Code:
1
2
#include
<a_samp>


So wird das nicht funktionieren, du musst das schon in der gleichen Zeile einbinden:

Code:
1
#include <a_samp>


Und das <time> ist nicht nötig, da es in der a_samp vorhanden ist.

Gruß

Kein neuer Beitrag 13.07.2009, 19:17
Beitrag #9   

Robdeflop1
Obergangster
* * * * * * O O O O O
Registrierung: 13.07.2009, 17:51
Script Editor: Pawno
Beiträge: 197

lol

bei mir stehts in einer zeile

ZitatZitat:

#include <a_samp>
#include <time>


ka, warum der das getrennt gemacht hat^^

MFG, RoB
Dieser Beitrag wurde insgesamt 1 mal editiert. Das letzte Mal 13.07.2009, 19:17 von Robdeflop1.

Kein neuer Beitrag 13.07.2009, 19:24
Beitrag #10   

FloRaX
BANNED
* * * * * * * * * * O
Registrierung: 22.08.2007, 21:05
User-Info: It´s over 9000!!!!!!!!!!!
Homepage: http://www.sxp-network.com
Lieblings-GTA: GTA: Vice City Stories
Wohnort: American Dream
Xbox Live Gamertag: Meicel
GFWL-Tag: Meicel
Social Club: N0RAX1994
Beiträge: 3700

Wenn es immernoch Crasht, probier das:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#include <a_samp>
#include <time>

new SystemTime[12];
forward RealTimeUpdate();
forward TimeUpdate();

public OnFilterScriptInit()
{
SetTimer("RealTimeUpdate",1,0);
SetTimer("TimeUpdate",10000, 1);
print("\n--------------------------------------");
print(" Reallifetime Uhr");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public RealTimeUpdate()
{
new h=0, m=0, s=0;
SetWorldTime(h);
gettime(h,m,s);
/*if (m <= 9){format(string,25,"%d:%d",h,m);
} else {format(string,25,"%d:%d",h,m);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(552,28,string);
TextDrawLetterSize(Clock,0.5,1.8);
TextDrawFont(Clock,3);
TextDrawBackgroundColor(Clock,0x000000AA);
TextDrawSetOutline(Clock,2);
TextDrawShowForAll(Clock);*/
if (h == 0){SetWorldTime(0);}
if (h == 1){SetWorldTime(1);}
if (h == 2){SetWorldTime(2);}
if (h == 3){SetWorldTime(3);}
if (h == 4){SetWorldTime(4);}
if (h == 5){SetWorldTime(5);}
if (h == 6){SetWorldTime(6);}
if (h == 7){SetWorldTime(7);}
if (h == 8){SetWorldTime(8);}
if (h == 9){SetWorldTime(9);}
if (h == 10){SetWorldTime(10);}
if (h == 11){SetWorldTime(11);}
if (h == 12){SetWorldTime(12);}
if (h == 13){SetWorldTime(13);}
if (h == 14){SetWorldTime(14);}
if (h == 15){SetWorldTime(15);}
if (h == 16){SetWorldTime(16);}
if (h == 17){SetWorldTime(17);}
if (h == 18){SetWorldTime(18);}
if (h == 19){SetWorldTime(19);}
if (h == 20){SetWorldTime(20);}
if (h == 21){SetWorldTime(21);}
if (h == 22){SetWorldTime(22);}
if (h == 23){SetWorldTime(23);}
if (h == 24){SetWorldTime(24);}
SetTimer("RealTimeUpdate",3000,0);
return 1;
}

public TimeUpdate() 
{
new Hour, Minute, Seconds;
new strings[256];
new string[256];
new Text:Clock;
gettime(Hour, Minute, Seconds);
if(Hour < 10) {
format(SystemTime, sizeof(SystemTime), "0%d",Hour);
} else {
format(SystemTime, sizeof(SystemTime), "%d",Hour);
}
if(Minute < 10) {
format(SystemTime, sizeof(SystemTime), "%s:0%d",SystemTime,Minute);
} else {
format(SystemTime, sizeof(SystemTime), "%s:%d",SystemTime,Minute);
}
if (Minute <= 9) {
format(string,25,"%d:%0d",Hour,Minute);
} else {
format(string,25,"%d:%d",Hour,Minute);}
TextDrawHideForAll(Clock);
Clock=TextDrawCreate(552,28,SystemTime);
TextDrawLetterSize(Clock,0.5,1.8);
TextDrawFont(Clock,3);
TextDrawBackgroundColor(Clock,0x000000AA);
TextDrawSetOutline(Clock,2);
TextDrawShowForAll(Clock);
format(strings, sizeof(strings), "System time: %s", SystemTime);
printf(strings);
return 1;
}


Und wenn es immernoch Crasht, liegt es wohl an deinem Gamemode.

Kein neuer Beitrag 13.07.2009, 19:31
Beitrag #11   

Robdeflop1
Obergangster
* * * * * * O O O O O
Registrierung: 13.07.2009, 17:51
Script Editor: Pawno
Beiträge: 197

Es funktioniert wieder, es lag an einem anderem script.
Ich wunder mich aber trotzdem warum es dann ging wenn die RL uhr draußen war :roll:

Thx 4 Help,
MFG, RoB
Dieser Beitrag wurde insgesamt 1 mal editiert. Das letzte Mal 13.07.2009, 19:41 von Robdeflop1.

Druckansicht

n/a n/a 1     (Anzeige: 1 – 11; Insgesamt: 11) n/a n/a
Toggle Ähnliche Themen zu „Realtime Uhr“
  Antworten Aufrufe Themeneröffnung Letzter Beitrag
Keine neuen Beiträge, „heißes Thema“   Drei neue Missionen in 'Neue Einträge', Führungskräfte-Boni und m ... 0 9589 19.11.2025, 23:19
Von: GTAvision.com
19.11.2025, 23:19
Von: GTAvision.com
Zum letzten Beitrag
Keine neuen Beiträge   Boni für Führungskräfte und mehr 0 177 03.06.2025, 22:15
Von: GTAvision.com
03.06.2025, 22:15
Von: GTAvision.com
Zum letzten Beitrag
Keine neuen Beiträge, „heißes Thema“   Happy Halloween! Entführung durch Außerirdische und mehr 0 17333 31.10.2024, 22:14
Von: GTAvision.com
31.10.2024, 22:14
Von: GTAvision.com
Zum letzten Beitrag
Keine neuen Beiträge, „heißes Thema“   Mondfest + Boni für Führungskräfte und mehr 0 517565 16.09.2024, 22:44
Von: GTAvision.com
16.09.2024, 22:44
Von: GTAvision.com
Zum letzten Beitrag
Keine neuen Beiträge, „heißes Thema“   Boni für Führungskräfte, Bunker- und Nachtclub-Besitzer und mehr 0 7798 03.10.2023, 22:29
Von: GTAvision.com
03.10.2023, 22:29
Von: GTAvision.com
Zum letzten Beitrag
  • 0.047637 Sek., 25 DB-Zugriffe, 2.121 MiB
  • Powered by Boardsolution v1.45
GTAvision.com :: Forumregeln :: FAQ :: Impressum :: Kontakt :: RDRvision.com :: LANOIREvision.com :: MaxPayneVision.com
NetVisionWork.NET
.: © 2006-2014 by GTAvision.com :.

Rockstar GamesTake-Two Interactive Deutschland

Free Grand Theft Auto Downloads