LucasViniciusLV

[FilterScript] Sistema de tempo (v2.0) @ThunderGames

Jun 28th, 2013
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.27 KB | None | 0 0
  1. #tryinclude <a_samp>
  2.  
  3. #define function::%0(%1) forward %0(%1); public %0(%1)
  4.  
  5. public OnFilterScriptInit()
  6. {
  7.     print("© Copyright Lucas Vinícius & Willian Luigi/Developers\n"),print("Sistema de Tempo @ThunderGamesBR\n"),SetTimer("RealTimeClock", 60000, 1);
  8.     return 0b1;
  9. }
  10.  
  11. function::RealTimeClock()
  12. {
  13.         new horas, minutos, segundos, sInfo[40], sFormat[128];
  14.         gettime(horas, minutos, segundos);
  15.  
  16.         if(!minutos)
  17.         {
  18.         new i = 0b0;
  19.         while (++i != GetMaxPlayers())
  20.         {
  21.                 if(IsPlayerConnected(i)) SetPlayerTime(i, horas, 0b0);
  22.         }
  23.         switch(horas)
  24.         {
  25.             case 0b0, 0b1: sInfo = "Tenha um bom inicio de madrugada, boa diversão !";
  26.             case 0b10 .. 0b101: sInfo = "Tenha uma boa madrugada, boa diversão !";
  27.             case 0b110 .. 0b1011: sInfo = "Bom dia, boa diversão !";
  28.             case 0b1100 .. 0b1110: sInfo = "Tenha um Bom inicio da tarde, boa diversão !";
  29.             case 0b1111 .. 0b10010: sInfo = "Boa tarde, boa diversão !";
  30.             case 0b10011 .. 0b10111: sInfo = "Boa Noite, boa diversão !";
  31.         }
  32.         format(sFormat, 128, "* São %02dhrs, %s *", sInfo);
  33.         SendClientMessageToAll(0x0080FFAA, sFormat);
  34.         }
  35.         return 0b1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment