02.07.2013, 03:55
Esse FS de hora real, sу anoitece completamente lб pra meia noite, antes disso fica um cйu meio alaranjado... Alguйm sabe se tem como ajeitar isso aн? ou um FS melhor...
(Eu jб usei o Search mas nгo encontrei soluзгo)
(Eu jб usei o Search mas nгo encontrei soluзгo)
Код:
#include <a_samp> // New's new Text:TempoRoYal; new HoraRoYal, MinutosRoYal; new StringRoYalTempo[32]; //Forward's forward Atualizartempo(); public Atualizartempo() { gettime(HoraRoYal, MinutosRoYal); format(StringRoYalTempo,32,"%02d:%02d",HoraRoYal,MinutosRoYal); TextDrawSetString(TempoRoYal,StringRoYalTempo); SetWorldTime(HoraRoYal); new x=0; while(x!=MAX_PLAYERS) { if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) { SetPlayerTime(x,HoraRoYal,MinutosRoYal); } x++; } } //-------------------------------------------------- public OnGameModeInit() { TempoRoYal = TextDrawCreate(605.0,25.0,"00:00"); TextDrawUseBox(TempoRoYal, 0); TextDrawFont(TempoRoYal, 1); TextDrawSetShadow(TempoRoYal,0); // no shadow TextDrawSetOutline(TempoRoYal,2); // thickness 1 TextDrawBackgroundColor(TempoRoYal,0x000000FF); TextDrawColor(TempoRoYal,0xFFFFFFFF); TextDrawAlignment(TempoRoYal,3); TextDrawLetterSize(TempoRoYal,0.5,1.5); Atualizartempo(); SetTimer("Atualizartempo",1000 * 60,1); return 1; } public OnPlayerSpawn(playerid) { TextDrawShowForPlayer(playerid,TempoRoYal); gettime(HoraRoYal, MinutosRoYal); SetPlayerTime(playerid,HoraRoYal,MinutosRoYal); return 1; } public OnPlayerDeath(playerid, killerid, reason) { TextDrawHideForPlayer(playerid,TempoRoYal); return 1; } public OnPlayerConnect(playerid) { gettime(HoraRoYal, MinutosRoYal); SetPlayerTime(playerid,HoraRoYal,MinutosRoYal); return 1; }