Advertisement
DraKiNs

[INC] Fade TextDraw

Jun 26th, 2011
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.72 KB | None | 0 0
  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. /*
  3.  
  4.     Fade:
  5.         Exemplos
  6.                 CallFadeInit(Text:iTextoGeral,  playerid,120,0,0,0,0,3500);
  7.                 CallFadeInit(Text:iBordaGeral,  playerid,120,0,0,0,0,3500);
  8.                 CallFadeInit(Text:iBordaAbaixo, playerid,120,0,0,0,0,3500);
  9.  
  10.         Modo de Uso:
  11.                 CallFadeInit(TextDraw,Index,Intervalo,Red,Blue,Green,Transparencia,Tempo Total);
  12.  
  13.         Créditos:
  14.                 Sistema de Fade em TextDraw Simples criado por DraKiNs
  15.  
  16.                 www.ips-team.blogspot.com ~ www.ips-team.forumeiros.com
  17.  
  18. */
  19. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  20.  
  21. new
  22.     iFade[0x5],
  23.     iTransp[0x5],
  24.     iFadeRgb[0x5][0x4];
  25.  
  26. forward CallFadeProcess(Text:iText,iPlayer,iSpeed,iTemp);
  27. public  CallFadeProcess(Text:iText,iPlayer,iSpeed,iTemp)
  28. {
  29.  
  30.     iFadeRgb[_:iText][0x3] +=  ((0xFF / (iTemp / iSpeed)) - iTransp[_:iText]);
  31.  
  32.     TextDrawColor(iText,((iFadeRgb[_:iText][0x0] * 0x1000000) + (iFadeRgb[_:iText][0x1] * 0x0010000) + (iFadeRgb[_:iText][0x2] * 0x0000100) + (iFadeRgb[_:iText][0x3])));
  33.     TextDrawShowForPlayer(iPlayer,iText);
  34.      
  35.     return iFade[_:iText] = SetTimerEx("CallFadeProcess",iSpeed,false,"dddd",_:iText,iPlayer,iSpeed,iTemp), false;
  36. }
  37.  
  38. CallStopFade(Text:iText,iPlayer);
  39. public  CallStopFade(Text:iText,iPlayer)
  40. {
  41.     return KillTimer(iFade[_:iText]);
  42. }
  43.  
  44. CallFadeInit(Text:iArray,iPlayer,iSpeed,iR,iG,iB,iTrast,iTemp)
  45. {
  46.     iFadeRgb[_:iArray][0x0]  = iR;
  47.     iFadeRgb[_:iArray][0x1]  = iG;
  48.     iFadeRgb[_:iArray][0x2]  = iB;
  49.     iTransp[_:iArray]      = iTrast;
  50.     CallFadeProcess(Text:iArray,iPlayer,iSpeed,iTemp);
  51.     SetTimerEx("CallStopFade",iTemp,false,"dd",_:iArray,iPlayer);
  52.     return true;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement