Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- funcion A_Reloj()
- {
- new string[32], RconCommand[50], time[3], year, month, day;
- getdate(year, month, day);
- gettime(time[0], time[1], time[2]);
- 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]);
- 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]);
- TextDrawSetString(Hora2, string);
- if(time[0] >= 12) format(RconCommand, 32, "worldtime %02d:%02d PM", (time[0] == 12) ? (12) : (time[0] - 12), time[1]);
- else if(time[0] < 12) format(RconCommand, 32, "worldtime %02d:%02d AM", (time[0] == 0) ? (12) : (time[0]), time[1]);
- SendRconCommand(RconCommand);
- for (new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- if (IsPlayerConnected(playerid))
- {
- SetPlayerTime(playerid, time[0], time[1]);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement