Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ====== New-ში =========//
- new Text: DateAndClock[2];
- // ======= OnPlayerConnect =========//
- UpdateTimers(playerid);
- SetTimer("UpdateTimers",1000*60,true);
- //======== Forward =========//
- forward UpdateTimers(playerid);
- public UpdateTimers(playerid)
- {
- new years, month, days, hours, minutes, NMonth[11];
- new string[40];
- new string2[40];
- gettime(hours, minutes);
- getdate(years, month, days);
- switch(month)
- {
- case 1: NMonth = "JANUARY";
- case 2: NMonth = "FEBRUARY";
- case 3: NMonth = "MARCH";
- case 4: NMonth = "APRIL";
- case 5: NMonth = "MAY";
- case 6: NMonth = "JUNE";
- case 7: NMonth = "JULY";
- case 8: NMonth = "AUGUST";
- case 9: NMonth = "SEPTEMBER";
- case 10: NMonth = "OCTOBER";
- case 11: NMonth = "NOVEMBER";
- case 12: NMonth = "DECEMBER";
- }
- format(string, sizeof(string), "%02d:%02d", hours, minutes);
- format(string2, sizeof(string2), "%02dTH %s", days, NMonth);
- TextDrawSetString(DateAndClock[0], string);
- TextDrawSetString(DateAndClock[1], string2);
- TextDrawShowForPlayer(playerid, DateAndClock[0]);
- TextDrawShowForPlayer(playerid, DateAndClock[1]);
- return true;
- }
- // ======= OnGameModeInit =====//
- DateAndClock[0] = TextDrawCreate(554.6668, 4.5777, "24:00"); TextDrawLetterSize(DateAndClock[0], 0.4239, 2.1309); TextDrawAlignment(DateAndClock[0], 1); TextDrawColor(DateAndClock[0], -253326081); TextDrawSetOutline(DateAndClock[0], 1); TextDrawBackgroundColor(DateAndClock[0], 255); TextDrawFont(DateAndClock[0], 3); TextDrawSetProportional(DateAndClock[0], 1); TextDrawSetShadow(DateAndClock[0], 0); DateAndClock[1] = TextDrawCreate(575.3331, 22.8295, "31TH_FEBRUARY"); TextDrawLetterSize(DateAndClock[1], 0.1983, 1.0980); TextDrawAlignment(DateAndClock[1], 2); TextDrawColor(DateAndClock[1], -253326081); TextDrawSetOutline(DateAndClock[1], 1); TextDrawBackgroundColor(DateAndClock[1], 255); TextDrawFont(DateAndClock[1], 2); TextDrawSetProportional(DateAndClock[1], 1); TextDrawSetShadow(DateAndClock[1], 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement