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>
- #define pressed(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define released(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- #define FUNCTION:%0(%1) forward%0(%1); public%0(%1)
- #define Set_Clock(%0,%1) KillTimer(kill_clock_data[%0]), kill_clock_data[%0]=SetTimerEx("clock_data",1000,true,"db",%0,%1)
- #define Kill_Clock(%0) KillTimer(kill_clock_data[%0])
- #define CLOCK_LANGUAGE (1) // 0 (spanish) - 1 (english)
- #define MAX_TD_CLOCK (4)
- new
- Text:TD_clock[MAX_TD_CLOCK],
- TD_select_language=CLOCK_LANGUAGE,
- bool:clock_activated[MAX_PLAYERS],
- kill_clock_data[MAX_PLAYERS];
- FUNCTION: clock_data(playerid,bool:clock){
- new time[2][3], d[2][20], dd[100];
- gettime(time[0][0], time[0][1], time[0][2]);
- getdate(time[1][0], time[1][1], time[1][2]);
- switch (((gettime()+334800)/86400-(gettime()+334800)/86400/7*7)){
- case 1: d[0] = ((!TD_select_language)?("lunes"):("monday"));
- case 2: d[0] = ((!TD_select_language)?("martes"):("tuesday"));
- case 3: d[0] = ((!TD_select_language)?("miercoles"):("wednesday"));
- case 4: d[0] = ((!TD_select_language)?("jueves"):("thursday"));
- case 5: d[0] = ((!TD_select_language)?("viernes"):("friday"));
- case 6: d[0] = ((!TD_select_language)?("sabado"):("saturday"));
- case 7: d[0] = ((!TD_select_language)?("domingo"):("sunday"));
- }
- switch(time[1][1]){
- case 1: d[1] = ((!TD_select_language)?("enero"):("jan"));
- case 2: d[1] = ((!TD_select_language)?("febrero"):("february"));
- case 3: d[1] = ((!TD_select_language)?("marzo"):("march"));
- case 4: d[1] = ((!TD_select_language)?("abril"):("april"));
- case 5: d[1] = ((!TD_select_language)?("mayo"):("may"));
- case 6: d[1] = ((!TD_select_language)?("junio"):("June"));
- case 7: d[1] = ((!TD_select_language)?("julio"):("july"));
- case 8: d[1] = ((!TD_select_language)?("agosto"):("august"));
- case 9: d[1] = ((!TD_select_language)?("septiembre"):("september"));
- case 10: d[1] = ((!TD_select_language)?("octubre"):("october"));
- case 11: d[1] = ((!TD_select_language)?("noviembre"):("november"));
- case 12: d[1] = ((!TD_select_language)?("diciembre"):("december"));
- }
- format(dd,sizeof(dd),"~w~%02d:%02d",time[0][0], time[0][1]);
- TextDrawSetString(TD_clock[1],dd);
- format(dd,sizeof(dd),"~w~%s",d[0]);
- TextDrawSetString(TD_clock[2],dd);
- format(dd,sizeof(dd),"~w~%02d %s %s",time[1][2],((!TD_select_language)?("de"):("of")),d[1]);
- TextDrawSetString(TD_clock[3],dd);
- if(!clock){ Kill_Clock(playerid); ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0,0); for(new x=0; x<sizeof(TD_clock); x++) {TextDrawHideForPlayer(playerid, TD_clock[x]);}
- }else{ ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0,0); ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,0,0,1,1); for(new x=0; x<sizeof(TD_clock); x++) {TextDrawShowForPlayer(playerid, TD_clock[x]);} }
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
- if(pressed(KEY_YES)) { if(clock_activated[playerid]!=true) clock_activated[playerid]=true, Set_Clock(playerid,true); }
- else if(released(KEY_YES)) { if(clock_activated[playerid]!=false) clock_activated[playerid]=false, Set_Clock(playerid,false); }
- return true;
- }
- public OnFilterScriptInit(){
- for(new x=0; x<sizeof(TD_clock); x++) {TextDrawDestroy(TD_clock[x]);}
- TD_clock[0] = TextDrawCreate(320.000000, 345.000000, "_");
- TextDrawBackgroundColor(TD_clock[0], 255);
- TextDrawFont(TD_clock[0], 1);
- TextDrawLetterSize(TD_clock[0], 0.500000, 8.200000);
- TextDrawColor(TD_clock[0], -1);
- TextDrawSetOutline(TD_clock[0], 0);
- TextDrawSetProportional(TD_clock[0], 1);
- TextDrawSetShadow(TD_clock[0], 1);
- TextDrawUseBox(TD_clock[0], 1);
- TextDrawBoxColor(TD_clock[0], 255);
- TextDrawTextSize(TD_clock[0], 580.000000, 0.000000);
- TextDrawSetSelectable(TD_clock[0], false);
- TD_clock[1] = TextDrawCreate(395.000000, 343.000000, "_"); //00:00
- TextDrawAlignment(TD_clock[1], 2);
- TextDrawBackgroundColor(TD_clock[1], 255);
- TextDrawFont(TD_clock[1], 2);
- TextDrawLetterSize(TD_clock[1], 0.839999, 7.400000);
- TextDrawColor(TD_clock[1], -1);
- TextDrawSetOutline(TD_clock[1], 1);
- TextDrawSetProportional(TD_clock[1], 1);
- TextDrawSetSelectable(TD_clock[1], false);
- TD_clock[2] = TextDrawCreate(466.000000, 359.000000, "_"); //saturday
- TextDrawBackgroundColor(TD_clock[2], 255);
- TextDrawFont(TD_clock[2], 2);
- TextDrawLetterSize(TD_clock[2], 0.500000, 2.800000);
- TextDrawColor(TD_clock[2], -1);
- TextDrawSetOutline(TD_clock[2], 1);
- TextDrawSetProportional(TD_clock[2], 1);
- TextDrawSetSelectable(TD_clock[2], false);
- TD_clock[3] = TextDrawCreate(466.000000, 385.000000, "_"); //20 de december
- TextDrawBackgroundColor(TD_clock[3], 255);
- TextDrawFont(TD_clock[3], 2);
- TextDrawLetterSize(TD_clock[3], 0.260000, 1.400000);
- TextDrawColor(TD_clock[3], -1);
- TextDrawSetOutline(TD_clock[3], 1);
- TextDrawSetProportional(TD_clock[3], 1);
- TextDrawSetSelectable(TD_clock[3], false);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement