Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ______ _ _
- | ___ \ | | (_)
- | |_/ / ___ | | ___ __ _ _ ___
- | / / _ \| | / _ \ / _` || | / _ \
- | |\ \ | __/| || (_) || (_| || || (_) |
- \_| \_| \___||_| \___/ \__, ||_| \___/
- __/ |
- |___/
- ______ _ _ _ _
- | _ \(_) (_)| | | |
- | | | | _ __ _ _ | |_ __ _ | |
- | | | || | / _` || || __| / _` || |
- | |/ / | || (_| || || |_ | (_| || |
- |___/ |_| \__, ||_| \__| \__,_||_|
- __/ |
- |___/
- - Samp Forum -
- - Creditos -
- - HeiO -
- -- Ajuda --
- -- Membros do Samp Forum --
- */
- #include <a_samp>
- // Variaveis
- new RDstring[ 12 ][ 2 ];
- new HTtimeR;
- new Text: RelogioCentral;
- new Text: RelogioD[ 12 ];
- new Text: RHoras;
- new Text: RInfo;
- new Text: RDias;
- new Text: LMsg;
- new Text: Linharel;
- new Text: Linharel1;
- new Text: Linharel2;
- //--
- forward RelogioDigital (playerid);
- forward RelogioData();
- public OnFilterScriptInit()
- {
- RHoras = TextDrawCreate( 568.000000, 140.000000, "~w~Hora: 10~g~:~w~30~g~:~w~40"); //Pronto
- TextDrawBackgroundColor(RHoras, 255);
- TextDrawFont(RHoras, 1);
- TextDrawLetterSize(RHoras, 0.240000, 1.300000);
- TextDrawColor(RHoras, -1);
- TextDrawSetOutline(RHoras, 1);
- TextDrawSetProportional(RHoras, 1);
- TextDrawSetSelectable(RHoras, 0);
- RInfo = TextDrawCreate(491.000000, 127.000000, "ld_pool:ball"); //Pronto
- TextDrawBackgroundColor( RInfo, 255);
- TextDrawFont(RInfo, 4);
- TextDrawLetterSize(RInfo, 0.250000, 0.699999);
- TextDrawColor(RInfo, -1);
- TextDrawSetOutline(RInfo, 1);
- TextDrawSetProportional(RInfo, 1);
- TextDrawUseBox(RInfo, 1);
- TextDrawBoxColor(RInfo, 255);
- TextDrawTextSize(RInfo, 78.000000, 82.000000);
- TextDrawSetSelectable(RInfo, 0);
- RDias = TextDrawCreate(568.000000, 180.000000, "~w~Data: 10~g~/~w~20~g~/~w~2013"); //Pronto
- TextDrawBackgroundColor(RDias, 255);
- TextDrawFont(RDias, 1);
- TextDrawLetterSize(RDias, 0.210000, 1.300000);
- TextDrawColor(RDias, -1);
- TextDrawSetOutline(RDias, 1);
- TextDrawSetProportional(RDias, 1);
- TextDrawSetSelectable(RDias, 0);
- LMsg = TextDrawCreate(583.000000, 159.000000, "Noite"); //Pronto
- TextDrawBackgroundColor(LMsg, 255);
- TextDrawFont(LMsg, 1);
- TextDrawLetterSize(LMsg, 0.290000, 1.200000);
- TextDrawColor(LMsg, -1);
- TextDrawSetOutline(LMsg, 1);
- TextDrawSetProportional(LMsg, 1);
- TextDrawSetSelectable(LMsg, 0);
- Linharel = TextDrawCreate(512.000000, 202.000000, "-"); //Pronto
- TextDrawBackgroundColor(Linharel, 255);
- TextDrawFont(Linharel, 1);
- TextDrawLetterSize(Linharel, 10.710004, 1.000000);
- TextDrawColor(Linharel, 16711935);
- TextDrawSetOutline(Linharel, 1);
- TextDrawSetProportional(Linharel, 1);
- TextDrawSetSelectable(Linharel, 0);
- Linharel1 = TextDrawCreate(512.000000, 122.000000, "-"); //Pronto
- TextDrawBackgroundColor(Linharel1, 255);
- TextDrawFont(Linharel1, 1);
- TextDrawLetterSize(Linharel1, 10.710004, 1.000000);
- TextDrawColor(Linharel1, 16711935);
- TextDrawSetOutline(Linharel1, 1);
- TextDrawSetProportional(Linharel1, 1);
- TextDrawSetSelectable(Linharel1, 0);
- Linharel2 = TextDrawCreate(672.000000, 129.000000, "_"); //Pronto
- TextDrawBackgroundColor(Linharel2, 255);
- TextDrawFont(Linharel2, 1);
- TextDrawLetterSize(Linharel2, 1.790000, 8.500001);
- TextDrawColor(Linharel2, 16711935);
- TextDrawSetOutline(Linharel2, 1);
- TextDrawSetProportional(Linharel2, 1);
- TextDrawUseBox(Linharel2, 1);
- TextDrawBoxColor(Linharel2, 16711935);
- TextDrawTextSize(Linharel2, 635.000000, 47.000000);
- TextDrawSetSelectable(Linharel2, 0);
- RelogioCentral = TextDrawCreate(528.000000, 154.000000, ""); //Pronto
- TextDrawBackgroundColor(RelogioCentral, 255);
- TextDrawFont(RelogioCentral, 1);
- TextDrawLetterSize(RelogioCentral, 0.629999, 1.900000);
- TextDrawColor(RelogioCentral, -1);
- TextDrawSetOutline(RelogioCentral, 1);
- TextDrawSetProportional(RelogioCentral, 1);
- TextDrawSetSelectable(RelogioCentral, 0);
- RelogioD[0] = TextDrawCreate(545.000000, 135.000000, "1"); //Pronto
- TextDrawBackgroundColor(RelogioD[0], 255);
- TextDrawFont(RelogioD[0], 2);
- TextDrawLetterSize(RelogioD[0], 0.209999, 1.100000);
- TextDrawColor(RelogioD[0], -1);
- TextDrawSetOutline(RelogioD[0], 1);
- TextDrawSetProportional(RelogioD[0], 1);
- TextDrawSetSelectable(RelogioD[0], 0);
- RelogioD[1] = TextDrawCreate(553.000000, 144.000000, "2"); //Pronto
- TextDrawBackgroundColor(RelogioD[1], 255);
- TextDrawFont(RelogioD[1], 2);
- TextDrawLetterSize(RelogioD[1], 0.209999, 1.100000);
- TextDrawColor(RelogioD[1], -1);
- TextDrawSetOutline(RelogioD[1], 1);
- TextDrawSetProportional(RelogioD[1], 1);
- TextDrawSetSelectable(RelogioD[1], 0);
- RelogioD[2] = TextDrawCreate(558.000000, 160.000000, "3"); //Pronto
- TextDrawBackgroundColor(RelogioD[2], 255);
- TextDrawFont(RelogioD[2], 2);
- TextDrawLetterSize(RelogioD[2], 0.209999, 1.100000);
- TextDrawColor(RelogioD[2], -1);
- TextDrawSetOutline(RelogioD[2], 1);
- TextDrawSetProportional(RelogioD[2], 1);
- TextDrawSetSelectable(RelogioD[2], 0);
- RelogioD[3] = TextDrawCreate(553.000000, 177.000000, "4"); //Pronto
- TextDrawBackgroundColor(RelogioD[3], 255);
- TextDrawFont(RelogioD[3], 2);
- TextDrawLetterSize(RelogioD[3], 0.209999, 1.100000);
- TextDrawColor(RelogioD[3], -1);
- TextDrawSetOutline(RelogioD[3], 1);
- TextDrawSetProportional(RelogioD[3], 1);
- TextDrawSetSelectable(RelogioD[3], 0);
- RelogioD[4] = TextDrawCreate(545.000000, 189.000000, "5"); //Pronto
- TextDrawBackgroundColor(RelogioD[4], 255);
- TextDrawFont(RelogioD[4], 2);
- TextDrawLetterSize(RelogioD[4], 0.209999, 1.100000);
- TextDrawColor(RelogioD[4], -1);
- TextDrawSetOutline(RelogioD[4], 1);
- TextDrawSetProportional(RelogioD[4], 1);
- TextDrawSetSelectable(RelogioD[4], 0);
- RelogioD[5] = TextDrawCreate(529.000000, 193.000000, "6"); //Pronto
- TextDrawBackgroundColor(RelogioD[5], 255);
- TextDrawFont(RelogioD[5], 2);
- TextDrawLetterSize(RelogioD[5], 0.209999, 1.100000);
- TextDrawColor(RelogioD[5], -1);
- TextDrawSetOutline(RelogioD[5], 1);
- TextDrawSetProportional(RelogioD[5], 1);
- TextDrawSetSelectable(RelogioD[5], 0);
- RelogioD[6] = TextDrawCreate(512.000000, 189.000000, "7"); //Pronto
- TextDrawBackgroundColor(RelogioD[6], 255);
- TextDrawFont(RelogioD[6], 2);
- TextDrawLetterSize(RelogioD[6], 0.209999, 1.100000);
- TextDrawColor(RelogioD[6], -1);
- TextDrawSetOutline(RelogioD[6], 1);
- TextDrawSetProportional(RelogioD[6], 1);
- TextDrawSetSelectable(RelogioD[6], 0);
- RelogioD[7] = TextDrawCreate(501.000000, 177.000000, "8"); //Pronto
- TextDrawBackgroundColor(RelogioD[7], 255);
- TextDrawFont(RelogioD[7], 2);
- TextDrawLetterSize(RelogioD[7], 0.209999, 1.100000);
- TextDrawColor(RelogioD[7], -1);
- TextDrawSetOutline(RelogioD[7], 1);
- TextDrawSetProportional(RelogioD[7], 1);
- TextDrawSetSelectable(RelogioD[7], 0);
- RelogioD[8] = TextDrawCreate(497.000000, 160.000000, "9"); //Pronto
- TextDrawBackgroundColor(RelogioD[8], 255);
- TextDrawFont(RelogioD[8], 2);
- TextDrawLetterSize(RelogioD[8], 0.209999, 1.100000);
- TextDrawColor(RelogioD[8], -1);
- TextDrawSetOutline(RelogioD[8], 1);
- TextDrawSetProportional(RelogioD[8], 1);
- TextDrawSetSelectable(RelogioD[8], 0);
- RelogioD[9] = TextDrawCreate(501.000000, 144.000000, "10"); //Pronto
- TextDrawBackgroundColor(RelogioD[9], 255);
- TextDrawFont(RelogioD[9], 2);
- TextDrawLetterSize(RelogioD[9], 0.209999, 1.100000);
- TextDrawColor(RelogioD[9], -1);
- TextDrawSetOutline(RelogioD[9], 1);
- TextDrawSetProportional(RelogioD[9], 1);
- TextDrawSetSelectable(RelogioD[9], 0);
- RelogioD[10] = TextDrawCreate(514.000000, 135.000000, "11"); //Pronto
- TextDrawBackgroundColor(RelogioD[10], 255);
- TextDrawFont(RelogioD[10], 2);
- TextDrawLetterSize(RelogioD[10], 0.209999, 1.100000);
- TextDrawColor(RelogioD[10], -1);
- TextDrawSetOutline(RelogioD[10], 1);
- TextDrawSetProportional(RelogioD[10], 1);
- TextDrawSetSelectable(RelogioD[10], 0);
- RelogioD[11] = TextDrawCreate(527.000000, 131.000000, "12"); //Pronto
- TextDrawBackgroundColor(RelogioD[11], 255);
- TextDrawFont(RelogioD[11], 2);
- TextDrawLetterSize(RelogioD[11], 0.209999, 1.100000);
- TextDrawColor(RelogioD[11], -1);
- TextDrawSetOutline(RelogioD[11], 1);
- TextDrawSetProportional(RelogioD[11], 1);
- TextDrawSetSelectable(RelogioD[11], 0);
- for(new t; t < 12; t++) format(RDstring[t], sizeof RDstring, "%d", t+1);
- new Hora, Min, Segundo;
- gettime(Hora, Min, Segundo);
- if (Hora > 12) Hora -= 12;
- if (Hora == 0) Hora = 12;
- HTtimeR = Hora-1;
- RelogioData();
- //SetTimers
- SetTimer("RelogioData",60000,1);
- SetTimer("RelogioDigital" ,1000, 1);
- print("\n");
- print( " Ligado ");
- print( " Ligado ");
- print( " Ligado ");
- print( " Ligado ");
- print("\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawDestroy( RelogioCentral);
- TextDrawDestroy( RHoras);
- TextDrawDestroy( RDias);
- TextDrawDestroy( RInfo);
- TextDrawDestroy( LMsg);
- TextDrawDestroy( Linharel);
- TextDrawDestroy( Linharel1);
- TextDrawDestroy( Linharel2);
- for(new t; t < 12; t++) TextDrawDestroy( RelogioD[ t ]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- RelogioData();
- return 1;
- }
- public RelogioDigital(playerid)
- {
- new string[ 256 ];
- new Horas, Minutos, Segundos;
- new Anos, Meses, Dias;
- // Get Time
- gettime(Horas,Minutos,Segundos);
- getdate(Anos, Meses, Dias);
- // Text Drawns Strings
- format( string, sizeof(string), "~w~Hora: %02d~g~:~w~%02d~g~:~w~%02d", Horas, Minutos, Segundos);
- TextDrawSetString( RHoras, string);
- format(string, sizeof(string), "~w~Data: %02d~g~/~w~%d~g~/~w~%d", Dias, Meses, Anos);
- TextDrawSetString(RDias, string);
- switch(Horas)
- {
- case 0..5:
- {
- format(string, sizeof(string), "~g~Madru");
- TextDrawSetString(LMsg, string);
- }
- //--
- case 6..11:
- {
- format(string, sizeof(string), "~g~Manha");
- TextDrawSetString(LMsg, string);
- }
- //--
- case 12..17:
- {
- format(string, sizeof(string), "~g~Tarde");
- TextDrawSetString(LMsg, string);
- }
- //--
- case 18..23:
- {
- format(string, sizeof(string), "~g~Noite");
- TextDrawSetString(LMsg, string);
- }
- }
- return 1;
- }
- public RelogioData()
- {
- new Ano,Mes;
- new Dia,Hora;
- new Min,Segundo;
- new Rstring[ 5 ];
- getdate(Ano, Mes, Dia); // Getendo Ano Mes e Dias!
- gettime(Hora, Min, Segundo); // Getando Horas e minutos e Segundos
- TextDrawShowForAll( RHoras);
- TextDrawShowForAll( RDias);
- TextDrawShowForAll( RInfo);
- TextDrawShowForAll( Linharel);
- TextDrawShowForAll( Linharel1);
- TextDrawShowForAll( Linharel2);
- TextDrawShowForAll( LMsg);
- TextDrawShowForAll( RelogioCentral);
- for(new l; l < 12; l++)
- TextDrawShowForAll( RelogioD[ l ]);
- if (Hora > 12) Hora -= 12;
- if (Hora == 0) Hora = 12;
- for(new l; l < 12; l++)
- {
- if (Hora-1 == l)
- {
- // String Text DrawS!
- format(Rstring, sizeof Rstring, "~w~%s", Rstring[ HTtimeR ]);
- TextDrawSetString(RelogioD[ HTtimeR ], Rstring);
- TextDrawShowForAll(RelogioD[ HTtimeR ]);
- // SetWorldTime(Hour); // Tire o > "//" > " Casou Queira Usar o SetWorldTime "
- format( Rstring, sizeof Rstring, "~r~%d", l+1);
- TextDrawSetString( RelogioD[ l ], Rstring);
- TextDrawShowForAll( RelogioD[ l ]); HTtimeR = l;
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement