Programmers

Horário

Feb 28th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.05 KB | None | 0 0
  1. SetTimer("hora", 1000, true);
  2.  
  3. //
  4. forward hora();
  5. public hora()
  6. {
  7.      new str[128],
  8.           str2[128],
  9.                year,
  10.                     month,
  11.                         day,
  12.                             hour,
  13.                                minute,
  14.                                    second;
  15.     getdate(year, month, day);
  16.     gettime(hour, minute, second);
  17.     new mes[15];
  18.     if(month == 1) { mes = "Janeiro"; }
  19.     else if(month == 2) {mes = "Fevereiro";}
  20.     else if(month == 3) {mes = "Março";}
  21.     else if(month == 4) {mes = "Abril";}
  22.     else if(month == 5) {mes = "Maio";}
  23.     else if(month == 6) {mes = "Junho";}
  24.     else if(month == 7) {mes = "Julho";}
  25.     else if(month == 8) {mes = "Agosto";}
  26.     else if(month == 9) {mes = "Setembro";}
  27.     else if(month == 10) {mes = "Outubro";}
  28.     else if(month == 11) {mes = "Novembro";}
  29.     else if(month == 12) {mes= "Dezembro";}
  30.     format(str, sizeof(str), "%d/%s/%d", day, mes,year);
  31.     TextDrawSetString(Textdraw0, str);
  32.         format(str2, sizeof(str2), "%d:%d:%d", hour, minute, second);
  33.     TextDrawSetString(Textdraw1, str2);
  34.     return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment