27.07.2014, 16:06
Quote:
#include <a_samp> new Text:Relogio; new Textata; public OnGameModeInit() { print("-----------------------------"); print("Sistema de Relogio Carregado"); print("Desenvolvido por: Kanuy"); print("-----------------------------"); SetTimer("Hora", 1000, true); Relogio = TextDrawCreate(470.000000,4.000000,""); Data = TextDrawCreate(550.000000,23.000000,""); TextDrawAlignment(Relogio,0); TextDrawAlignment(Data,0); TextDrawBackgroundColor(Relogio,0x000000AA); TextDrawBackgroundColor(Data,0x000000AA); TextDrawFont(Relogio,3); TextDrawLetterSize(Relogio,0.500000,2.000000); TextDrawFont(Data,3); TextDrawLetterSize(Data,0.399999,2.000000); TextDrawColor(Relogio,0xffffffff); TextDrawColor(Data,0xffffffff); TextDrawSetProportional(Relogio,1); TextDrawSetProportional(Data,1); TextDrawSetShadow(Relogio,1); TextDrawSetShadow(Data,1); TextDrawSetOutline(Relogio,1); TextDrawSetOutline(Data,1); TextDrawShowForAll(Relogio); TextDrawShowForAll(Data); return 1; } public OnPlayerSpawn(playerid) { TogglePlayerControllable(playerid, true); TextDrawHideForAll(Relogio); TextDrawShowForPlayer(playerid, Relogio); TextDrawHideForAll(Data); TextDrawShowForPlayer(playerid, Data); return 1; } forward Hora();public Hora() { static _ist[20], d, m, a; getdate(a, m, d); format(_ist, sizeof _ist, " %i/%02d/2014", d, m); TextDrawSetString(Relogio, _ist); gettime(a, m, d); format(_ist, sizeof _ist, "%02d:%02d:%02d",a,m,d); TextDrawSetString(Data, _ist); TextDrawShowForAll(Data); TextDrawShowForAll(Relogio); } |