Advertisement
OtaconEvil

[INC] Easy Screen Fade By OTACON

Jan 23rd, 2014
925
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.04 KB | None | 0 0
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple INCLUDE esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè INCLUDE en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.     *
  7.     * Codigo Creado Por OTACON
  8.     *
  9.     * CREDITOS:
  10.     *     OTACON: Realizacion y Idea de creacion del code.
  11.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.     *
  13.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.     *
  15.     *            Prohibido TOTALMENTE el Robo de Créditos o la
  16.     *              Publicación de este INCLUDE sin Mi Permiso.
  17. */
  18. /*
  19.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  20.     *
  21.     * This simple INCLUDE is made especially for www.forum.sa-mp.com
  22.     * DO NOT Post the INCLUDE in Other SAMP forums and impersonating the creator of the CODE.
  23.     *
  24.     * Code Created By OTACON
  25.     *
  26.     * CREDITS:
  27.     *     OTACON: Idea Making and code creation.
  28.     *     YOUR: Modification freely respecting the above ;).
  29.     *
  30.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  31.     *
  32.     *                    FULLY spaces Theft Credit or
  33.     *             Publication of this INCLUDE without my permission.
  34. */
  35. /*
  36.    native SetEasyScreenFade(slot,playerid,Text:textdrawid,colour,bool:mode,timer); //para activar un screen fade. mode=false(TextDrawBoxColor)  mode=true(TextDrawColor)
  37.    native KillEasyScreenFade(slot,playerid,Text:textdrawid); //para desactivar un screen fade.
  38.    public OnFunctionOfEasyScreenFade(slot,playerid); //para darle alguna funcion a un screen fade cuando termina el progreso.
  39. */
  40. #define MAX_SCREEN_FADE (100) //cantidad maxima de screen fade
  41. static DeadlEasyScreenFade[MAX_PLAYERS][MAX_SCREEN_FADE],
  42. EasyScreenFadeStatus[MAX_PLAYERS][MAX_SCREEN_FADE];
  43. forward OnFunctionOfEasyScreenFade(slot,playerid);
  44. forward EasyScreenFadeUpdate(slot,playerid,Text:textdrawid,colour,bool:mode);
  45. public EasyScreenFadeUpdate(slot,playerid,Text:textdrawid,colour,bool:mode){
  46. #define STATUS_FADE (15)
  47. if(!mode){TextDrawBoxColor(textdrawid,colour-(0x11*EasyScreenFadeStatus[playerid][slot]));}
  48. else{TextDrawColor(textdrawid,colour-(0x11*EasyScreenFadeStatus[playerid][slot]));}
  49. if(EasyScreenFadeStatus[playerid][slot]>=STATUS_FADE){
  50.     KillTimer(DeadlEasyScreenFade[playerid][slot]);
  51.     TextDrawHideForPlayer(playerid,textdrawid);
  52.     EasyScreenFadeStatus[playerid][slot]=0;
  53.     return CallLocalFunction("OnFunctionOfEasyScreenFade","dd",slot,playerid);}
  54. TextDrawShowForPlayer(playerid,textdrawid);
  55. return EasyScreenFadeStatus[playerid][slot]++;}
  56. stock SetEasyScreenFade(slot,playerid,Text:textdrawid,colour,bool:mode=false,timer){
  57. TextDrawHideForPlayer(playerid,textdrawid);
  58. EasyScreenFadeStatus[playerid][slot]=0;
  59. KillTimer(DeadlEasyScreenFade[playerid][slot]);
  60. DeadlEasyScreenFade[playerid][slot]=SetTimerEx("EasyScreenFadeUpdate",timer,true,"dddxb",slot,playerid,_:textdrawid,colour,mode);}
  61. stock KillEasyScreenFade(slot,playerid,Text:textdrawid){
  62. TextDrawHideForPlayer(playerid,textdrawid);
  63. EasyScreenFadeStatus[playerid][slot]=0;
  64. KillTimer(DeadlEasyScreenFade[playerid][slot]);}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement