Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
- #include <a_samp>
- #include <zcmd>
- #define CALLBACK:%0(%1) forward%0(%1); public%0(%1)
- #define ENGLISH true
- #define SPANISH false
- static Text:DateTD[MAX_PLAYERS],bool:TypeDate;
- CALLBACK: OnFilterScriptInit() {
- print("\n**************************************");
- print(" Easy Time Data. ");
- print(" Date: 21/09/2013 ");
- print(" Author: OTACON ");
- print(" --* Downloaded with Success!!. *-- ");
- print("***************************************\n");
- SendRconCommand("hostname Easy Time Data. ");
- SendRconCommand("gamemodetext By OTACON");
- SetTimer("UpdateDate", 1*1000, true);
- TypeDate=ENGLISH;
- return true;
- }
- CALLBACK: OnFilterScriptExit() {
- print("\n**************************************");
- print(" Easy Time Data. ");
- print(" Date: 21/09/2013 ");
- print(" Author: OTACON ");
- print(" --* Loaded with Success!!. *-- ");
- print("***************************************\n");
- SendRconCommand("hostname Easy Time Data. ");
- SendRconCommand("gamemodetext By OTACON");
- return true;
- }
- CALLBACK: OnPlayerConnect(playerid) {
- DateTD[playerid] = TextDrawCreate(413.000000, 3.000000, "_");
- TextDrawAlignment(DateTD[playerid], 2);
- TextDrawBackgroundColor(DateTD[playerid], 255);
- TextDrawFont(DateTD[playerid], 2);
- TextDrawLetterSize(DateTD[playerid], 0.200000, 1.600000);
- TextDrawColor(DateTD[playerid], -1);
- TextDrawSetOutline(DateTD[playerid], 1);
- TextDrawSetProportional(DateTD[playerid], 1);
- TextDrawUseBox(DateTD[playerid], 1);
- TextDrawBoxColor(DateTD[playerid], 0x00000055);
- TextDrawTextSize(DateTD[playerid], 0.000000, 382.000000);
- return true;
- }
- CALLBACK: OnPlayerDisconnect(playerid, reason) {
- TextDrawHideForPlayer(playerid,DateTD[playerid]);
- TextDrawDestroy(DateTD[playerid]);
- return true;
- }
- CALLBACK: OnPlayerSpawn(playerid) {
- TextDrawShowForPlayer(playerid,DateTD[playerid]);
- return true;
- }
- CALLBACK: UpdateDate() {
- for(new player, j = GetMaxPlayers(); player != j; player++) {
- if(!IsPlayerConnected(player)) continue;
- new data[100],text[3][20],date[6],weather[5];
- gettime(date[0],date[1],date[2]);
- getdate(date[3],date[4],date[5]);
- SetWorldTime(date[0]);
- if(!TypeDate) {
- switch(date[4]) {
- case 1: text[0]="Enero";
- case 2: text[0]="Febrero";
- case 3: text[0]="Marzo";
- case 4: text[0]="Abril";
- case 5: text[0]="Mayo";
- case 6: text[0]="Junio";
- case 7: text[0]="Julio";
- case 8: text[0]="Agosto";
- case 9: text[0]="Septiembre";
- case 10: text[0]="Octubre";
- case 11: text[0]="Noviembre";
- case 12: text[0]="Diciembre"; }
- switch(date[0]) {
- case 0..12: text[1]="AM";
- case 13..23: text[1]="PM"; }
- GetServerVarAsString("weather", weather, sizeof(weather));
- switch(strval(weather)) {
- case 1,2,3,4,5,6,7,12,13,14,15,17,18,24,25,26,27,28,29,30,40: text[2]="Buen Tiempo";
- case 9,19,20,31,32: text[2]="Nublado";
- default: text[2]="Sin Datos"; }
- format(data, sizeof(data), "~g~Hora: ~w~%02d:%02d~r~:%02d ~p~%s ~g~Fecha: ~w~%02d de %s del %02d ~g~Clima: ~w~%s",\
- date[0],date[1],date[2],text[1],date[5],text[0],date[3],text[2]);
- TextDrawSetString(DateTD[player], data);
- } else {
- switch(date[4]) {
- case 1: text[0]="January";
- case 2: text[0]="February";
- case 3: text[0]="March";
- case 4: text[0]="April";
- case 5: text[0]="May";
- case 6: text[0]="June";
- case 7: text[0]="July";
- case 8: text[0]="August";
- case 9: text[0]="September";
- case 10: text[0]="October";
- case 11: text[0]="November";
- case 12: text[0]="December"; }
- switch(date[0]) {
- case 0..12: text[1]="AM";
- case 13..23: text[1]="PM"; }
- GetServerVarAsString("weather", weather, sizeof(weather));
- switch(strval(weather)) {
- case 1,2,3,4,5,6,7,12,13,14,15,17,18,24,25,26,27,28,29,30,40: text[2]="Good Time";
- case 9,19,20,31,32: text[2]="bad Weather";
- default: text[2]="No Data"; }
- format(data, sizeof(data), "~g~Time: ~w~%02d:%02d~r~:%02d ~p~%s ~g~Date: ~w~%02d of %s the %02d ~g~Weather: ~w~%s",\
- date[0],date[1],date[2],text[1],date[5],text[0],date[3],text[2]);
- TextDrawSetString(DateTD[player], data);
- }
- } return true;
- }
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement