Advertisement
Guest User

sdsds

a guest
Jun 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. funcion A_Reloj()
  2. {
  3. new string[32], RconCommand[50], time[3], year, month, day;
  4. getdate(year, month, day);
  5. gettime(time[0], time[1], time[2]);
  6. if(time[0] >= 12) format(string, 32, "%02d - %02d - %02d~n~%02d:%02dPM", day, month, year, (time[0] == 12) ? (12) : (time[0] - 12), time[1]);
  7. else if(time[0] < 12) format(string, 32, "%02d - %02d - %02d~n~%02d:%02dAM", day, month, year, (time[0] == 0) ? (12) : (time[0]), time[1]);
  8. TextDrawSetString(Hora2, string);
  9. if(time[0] >= 12) format(RconCommand, 32, "worldtime %02d:%02d PM", (time[0] == 12) ? (12) : (time[0] - 12), time[1]);
  10. else if(time[0] < 12) format(RconCommand, 32, "worldtime %02d:%02d AM", (time[0] == 0) ? (12) : (time[0]), time[1]);
  11. SendRconCommand(RconCommand);
  12. for (new playerid; playerid < MAX_PLAYERS; playerid++)
  13. {
  14. if (IsPlayerConnected(playerid))
  15. {
  16. SetPlayerTime(playerid, time[0], time[1]);
  17. }
  18. }
  19. return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement