Advertisement
Shiny_

Untitled

Apr 6th, 2015
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.06 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnGameModeInit() {
  4.     CallLocalFunction("OnRconCommand", "s", "godzina");
  5.     return true;
  6. }
  7.  
  8. main() {
  9.     new A[32][3][3];
  10.     gettime(A[0][0][0], A[0][1][0], A[0][2][0]);
  11.     printf("%d\n%d\n%d\n%d", sizeof(A), sizeof(A[]), sizeof(A[][]), sizeof(A[][][]));
  12.     printf("Godzina: %02d:%02d:%02d", A[0][0][0], A[0][1][0], A[0][2][0]);
  13.     printf("TEST");
  14.     return false;
  15. }
  16.  
  17. public OnRconCommand(cmd[]) {
  18.     if(!strcmp(cmd, "godzina", true)) {
  19.         new StringTimeDate[64][6];
  20.         getdate(StringTimeDate[0][2], StringTimeDate[0][1], StringTimeDate[0][0]);
  21.         gettime(StringTimeDate[0][3], StringTimeDate[0][4], StringTimeDate[0][5]);
  22.  
  23.         format(StringTimeDate[0], sizeof(StringTimeDate), "Dzisiaj jest: %02d/%02d/%d, godzina: %02d:%02d:%02d", StringTimeDate[0][0], StringTimeDate[0][1], StringTimeDate[0][2], StringTimeDate[0][3], StringTimeDate[0][4], StringTimeDate[0][5]);
  24.         SendClientMessage(0, -1, StringTimeDate[0]);
  25.         print(StringTimeDate[0]);
  26.         return true;
  27.     }
  28.     return false;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement