FranciscoSmitch

Tildes para textdraw y gametext

Sep 2nd, 2011
757
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.41 KB | None | 0 0
  1. /*
  2.     Include Tildes.inc creado por FranciscoSmitch para PawnoScripting
  3.     Si deseas postearlo en otro foro por favor mantengan los créditos.
  4. */
  5.  
  6. #include <a_samp>
  7.  
  8. stock   Desbug(string[])
  9. {
  10.         new szFixed[1024], iPos, iLen;
  11.         for (iLen = strlen(string); iPos < iLen; iPos ++)
  12.         {
  13.             switch (string[iPos])
  14.             {
  15.                 case 'á':  szFixed[iPos] = 152;
  16.                 case 'Á':  szFixed[iPos] = 129;
  17.                 case 'é':  szFixed[iPos] = 158;
  18.                 case 'É':  szFixed[iPos] = 135;
  19.                 case 'í':  szFixed[iPos] = 162;
  20.                 case 'Í':  szFixed[iPos] = 139;
  21.                 case 'ó':  szFixed[iPos] = 166;
  22.                 case 'Ó':  szFixed[iPos] = 143;
  23.                 case 'ú':  szFixed[iPos] = 170;
  24.                 case 'Ú':  szFixed[iPos] = 147;
  25.                 case 'ñ':  szFixed[iPos] = 174;
  26.                 case 'Ñ':  szFixed[iPos] = 173;
  27.                 default:    szFixed[iPos] = string[iPos];
  28.             }
  29.         }
  30.         return szFixed;
  31. }
  32.  
  33. FranTextDrawCreate(Float:x, Float:y, text[])
  34. {
  35.     return TextDrawCreate(x,y,Desbug(text));
  36. }
  37.  
  38. FranTextDrawSetString(Text:text,texto[])
  39. {
  40.     TextDrawSetString(text,Desbug(texto));
  41.     return 1;
  42. }
  43.  
  44. FranGameText(playerid, texto[], time, style)
  45. {
  46.     GameTextForPlayer(playerid,Desbug(texto),time,style);
  47.     return 1;
  48. }
  49.  
  50. FranGameTextAll(texto[], time, style)
  51. {
  52.     GameTextForAll(Desbug(texto),time,style);
  53.     return 1;
  54. }
  55.  
  56. #define TextDrawCreate FranTextDrawCreate
  57. #define TextDrawSetString FranTextDrawSetString
  58. #define GameTextForPlayer FranGameText
  59. #define GameTextForAll FranGameTextAll
Advertisement
Add Comment
Please, Sign In to add comment