פשוט תגיד שאתה רוצה שאני יבנה לך..
למעלה במוד:
PHP Code:
new Text:Time, Text:Date;
forward Clock();
בפאבליק OnGameModeInit:
PHP Code:
SetTimer("Clock",1000,true);
Date = TextDrawCreate(561.000000, 21.000000," ");
TextDrawFont(Date, 3);
TextDrawLetterSize(Date, 0.340000, 1.700000);
TextDrawColor(Date, 0xFFFFFFFF);
Time = TextDrawCreate(555.000000, 2.000000," ");
TextDrawFont(Time, 3);
TextDrawLetterSize(Time, 0.470000, 2.299999);
TextDrawColor(Time, 0xFFFFFFFF);
בפאבליק OnPlayerSpawn:
PHP Code:
TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
באמצע המוד:
PHP Code:
public Clock()
{
new string[256],year,month,day,hours,minutes,seconds;
getdate(year, month, day), gettime(hours, minutes, seconds);
format(string, sizeof string, "%02d/%02d/%d", day, month, year), TextDrawSetString(Date, string);
format(string, sizeof string, "%02d:%02d:%02d", hours, minutes, seconds), TextDrawSetString(Time, string);
}