Hier ein kleiner Scriptschnipsel:
EInfacher Command, der die Zeit in GameText anzeigt:
if(!strcmp("/time",cmdtext,true) || !strcmp("/zeit",cmdtext,true))
{
new hour, minute, second, year, month, day, monthstring[16], timestring[128];
gettime(hour,minute,second);
getdate(year,month,day);
switch(month)
{
case 1: format(monthstring,sizeof monthstring,"Januar");
case 2: format(monthstring,sizeof monthstring,"Februar");
case 3: format(monthstring,sizeof monthstring,"Maerz");
case 4: format(monthstring,sizeof monthstring,"April");
case 5: format(monthstring,sizeof monthstring,"Mai");
case 6: format(monthstring,sizeof monthstring,"Juni");
case 7: format(monthstring,sizeof monthstring,"Juli");
case 8: format(monthstring,sizeof monthstring,"August");
case 9: format(monthstring,sizeof monthstring,"September");
case 10: format(monthstring,sizeof monthstring,"Oktober");
case 11: format(monthstring,sizeof monthstring,"November");
case 12: format(monthstring,sizeof monthstring,"Dezember");
}
format(timestring,sizeof timestring,"~g~~h~ %d:%d Uhr %d Sec ~n~~n~~w~ %d. %s %d",hour,minute,second,day,monthstring,year);
GameTextForPlayer(playerid,timestring,7500,4);
return 1;
}
Darf verändert und sonstiges damit gemacht werden
Viel Spaß damit!