Advertisement
Splav

Untitled

May 30th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new Text:Date;
  4.  
  5. public OnGameModeInit()
  6. {
  7.     new day, month, year, date[15];
  8.     getdate(year, month, day);
  9.  
  10.     format(date, sizeof(date), "%02d.%02d.%04d", day, month, year);
  11.     Date = TextDrawCreate(630.0,430.0,date);
  12.     TextDrawUseBox(Date, 0);
  13.     TextDrawFont(Date, 3);
  14.     TextDrawSetShadow(Date,0);
  15.     TextDrawSetOutline(Date,2);
  16.     TextDrawBackgroundColor(Date,0x000000FF);
  17.     TextDrawColor(Date,0xFFFFFFFF);
  18.     TextDrawAlignment(Date,3);
  19.     TextDrawLetterSize(Date,0.5,1.5);
  20.     return 1;
  21. }
  22.  
  23. public OnPlayerConnect(playerid)
  24. {
  25.     TextDrawShowForPlayer(playerid, Date);
  26.     return 1;
  27. }
  28.  
  29. public OnPlayerDisconnect(playerid)
  30. {
  31.     TextDrawHideForPlayer(playerid, Date);
  32.     return 1;
  33. }
  34.  
  35. // В PayDay, ну или как там у нас... короче который ЗП почасовую выдает
  36.     new param[3];
  37.     gettime(param[0], param[1], param[2]);
  38.    
  39.     if(!param[0])  {// Время: 00:00
  40.         new day, month, year, date[15];
  41.         getdate(year, month, day);
  42.  
  43.         format(date, sizeof(date), "%02d.%02d.%04d", day, month, year);
  44.         TextDrawSetString(Date, date);
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement