Guest User

xD

a guest
Aug 5th, 2010
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.67 KB | None | 0 0
  1. //5 new game-text styles by [XST]O_x
  2. //First include!
  3.  
  4. #include <a_samp>
  5.  
  6. forward TextDrawDestroyTimer1(TextDrawID);
  7. forward TextDrawDestroyTimer2(TextDrawID);
  8. forward TextDrawDestroyTimer3(TextDrawID);
  9. forward TextDrawDestroyTimer4(TextDrawID);
  10. forward TextDrawDestroyTimer5(TextDrawID);
  11.  
  12. new Text:gTextStyle1[128];
  13. new Text:gTextStyle2[128];
  14. new Text:gTextStyle3[128];
  15. new Text:gTextStyle4[128];
  16. new Text:gTextStyle5[128];
  17. new textcount;
  18. new textcountP;
  19.  
  20. /*
  21. native GameTextCostumeForPlayer(playerid,msg[],seconds,style);
  22. native GameTextCostumeForAll(msg[],seconds,style);
  23. */
  24.  
  25. stock GameTextCostumeForPlayer(playerid,msg[],seconds,style)
  26. {
  27.     textcountP++;
  28.     if(textcountP >= 128) textcountP = 0; //By Seif_
  29.     gTextStyle1[textcountP] = TextDrawCreate(14.000000, 308.000000, msg);
  30.     TextDrawBackgroundColor(gTextStyle1[textcountP], 255);
  31.     TextDrawFont(gTextStyle1[textcountP], 2);
  32.     TextDrawLetterSize(gTextStyle1[textcountP], 1.060000, 3.199999);
  33.     TextDrawColor(gTextStyle1[textcountP], -1);
  34.     TextDrawSetOutline(gTextStyle1[textcountP], 1);
  35.     TextDrawSetProportional(gTextStyle1[textcountP], 1);
  36.    
  37.     gTextStyle2[textcountP] = TextDrawCreate(521.000000, 101.000000, msg);
  38.     TextDrawBackgroundColor(gTextStyle2[textcountP], 255);
  39.     TextDrawFont(gTextStyle2[textcountP], 1);
  40.     TextDrawLetterSize(gTextStyle2[textcountP], 0.480000, 1.000000);
  41.     TextDrawColor(gTextStyle2[textcountP], -1);
  42.     TextDrawSetOutline(gTextStyle2[textcountP], 1);
  43.     TextDrawSetProportional(gTextStyle2[textcountP], 1);
  44.    
  45.     gTextStyle3[textcountP] = TextDrawCreate(291.000000, 431.000000, msg);
  46.     TextDrawBackgroundColor(gTextStyle3[textcountP], 255);
  47.     TextDrawFont(gTextStyle3[textcountP], 3);
  48.     TextDrawLetterSize(gTextStyle3[textcountP], 0.500000, 1.000000);
  49.     TextDrawColor(gTextStyle3[textcountP], -1);
  50.     TextDrawSetOutline(gTextStyle3[textcountP], 1);
  51.     TextDrawSetProportional(gTextStyle3[textcountP], 1);
  52.    
  53.     gTextStyle4[textcountP] = TextDrawCreate(506.000000, 341.000000, msg);
  54.     TextDrawBackgroundColor(gTextStyle4[textcountP], 255);
  55.     TextDrawFont(gTextStyle4[textcountP], 0);
  56.     TextDrawLetterSize(gTextStyle4[textcountP], 1.130000, 3.899999);
  57.     TextDrawColor(gTextStyle4[textcountP], -1);
  58.     TextDrawSetOutline(gTextStyle4[textcountP], 1);
  59.     TextDrawSetProportional(gTextStyle4[textcountP], 1);
  60.    
  61.     gTextStyle5[textcountP] = TextDrawCreate(271.000000, 172.000000, msg);
  62.     TextDrawBackgroundColor(gTextStyle5[textcountP], 255);
  63.     TextDrawFont(gTextStyle5[textcountP], 2);
  64.     TextDrawLetterSize(gTextStyle5[textcountP], 0.679999, 2.199999);
  65.     TextDrawColor(gTextStyle5[textcountP], -1);
  66.     TextDrawSetOutline(gTextStyle5[textcountP], 1);
  67.     TextDrawSetProportional(gTextStyle5[textcountP], 1);
  68.    
  69.     if(style == 1)
  70.     {
  71.         TextDrawShowForPlayer(playerid,gTextStyle1[textcountP]);
  72.         SetTimerEx("TextDrawDestroyTimer1",seconds*1000,0,"d",textcountP);
  73.     }
  74.     else if(style == 2)
  75.     {
  76.         TextDrawShowForPlayer(playerid,gTextStyle2[textcountP]);
  77.         SetTimerEx("TextDrawDestroyTimer2",seconds*1000,0,"d",textcountP);
  78.     }
  79.     else if(style == 3)
  80.     {
  81.         TextDrawShowForPlayer(playerid,gTextStyle3[textcountP]);
  82.         SetTimerEx("TextDrawDestroyTimer3",seconds*1000,0,"d",textcountP);
  83.     }
  84.     else if(style == 4)
  85.     {
  86.         TextDrawShowForPlayer(playerid,gTextStyle4[textcountP]);
  87.         SetTimerEx("TextDrawDestroyTimer4",seconds*1000,0,"d",textcountP);
  88.     }`
  89.     else if(style == 5)
  90.     {
  91.         TextDrawShowForPlayer(playerid,gTextStyle5[textcountP]);
  92.         SetTimerEx("TextDrawDestroyTimer5",seconds*1000,0,"d",textcountP);
  93.     }
  94. }
  95. stock GameTextCostumeForAll(msg[],seconds,style)
  96. {
  97.     textcount++;
  98.     if(textcount >= 128) textcount = 0; //By Seif_
  99.     gTextStyle1[textcount] = TextDrawCreate(14.000000, 308.000000, msg);
  100.     TextDrawBackgroundColor(gTextStyle1[textcount], 255);
  101.     TextDrawFont(gTextStyle1[textcount], 2);
  102.     TextDrawLetterSize(gTextStyle1[textcount], 1.060000, 3.199999);
  103.     TextDrawColor(gTextStyle1[textcount], -1);
  104.     TextDrawSetOutline(gTextStyle1[textcount], 1);
  105.     TextDrawSetProportional(gTextStyle1[textcount], 1);
  106.  
  107.     gTextStyle2[textcount] = TextDrawCreate(521.000000, 101.000000, msg);
  108.     TextDrawBackgroundColor(gTextStyle2[textcount], 255);
  109.     TextDrawFont(gTextStyle2[textcount], 1);
  110.     TextDrawLetterSize(gTextStyle2[textcount], 0.480000, 1.000000);
  111.     TextDrawColor(gTextStyle2[textcount], -1);
  112.     TextDrawSetOutline(gTextStyle2[textcount], 1);
  113.     TextDrawSetProportional(gTextStyle2[textcount], 1);
  114.  
  115.     gTextStyle3[textcount] = TextDrawCreate(291.000000, 431.000000, msg);
  116.     TextDrawBackgroundColor(gTextStyle3[textcount], 255);
  117.     TextDrawFont(gTextStyle3[textcount], 3);
  118.     TextDrawLetterSize(gTextStyle3[textcount], 0.500000, 1.000000);
  119.     TextDrawColor(gTextStyle3[textcount], -1);
  120.     TextDrawSetOutline(gTextStyle3[textcount], 1);
  121.     TextDrawSetProportional(gTextStyle3[textcount], 1);
  122.  
  123.     gTextStyle4[textcount] = TextDrawCreate(506.000000, 341.000000, msg);
  124.     TextDrawBackgroundColor(gTextStyle4[textcount], 255);
  125.     TextDrawFont(gTextStyle4[textcount], 0);
  126.     TextDrawLetterSize(gTextStyle4[textcount], 1.130000, 3.899999);
  127.     TextDrawColor(gTextStyle4[textcount], -1);
  128.     TextDrawSetOutline(gTextStyle4[textcount], 1);
  129.     TextDrawSetProportional(gTextStyle4[textcount], 1);
  130.  
  131.     gTextStyle5[textcount] = TextDrawCreate(271.000000, 172.000000, msg);
  132.     TextDrawBackgroundColor(gTextStyle5[textcount], 255);
  133.     TextDrawFont(gTextStyle5[textcount], 2);
  134.     TextDrawLetterSize(gTextStyle5[textcount], 0.679999, 2.199999);
  135.     TextDrawColor(gTextStyle5[textcount], -1);
  136.     TextDrawSetOutline(gTextStyle5[textcount], 1);
  137.     TextDrawSetProportional(gTextStyle5[textcount], 1);
  138.     if(style == 1)
  139.     {
  140.         TextDrawShowForAll(gTextStyle1[textcount]);
  141.         SetTimerEx("TextDrawDestroyTimer1",seconds*1000,0,"d",textcount);
  142.     }
  143.     else if(style == 2)
  144.     {
  145.         TextDrawShowForAll(gTextStyle2[textcount]);
  146.         SetTimerEx("TextDrawDestroyTimer2",seconds*1000,0,"d",textcount);
  147.     }
  148.     else if(style == 3)
  149.     {
  150.         TextDrawShowForAll(gTextStyle3[textcount]);
  151.         SetTimerEx("TextDrawDestroyTimer3",seconds*1000,0,"d",textcount);
  152.     }
  153.     else if(style == 4)
  154.     {
  155.         TextDrawShowForAll(gTextStyle4[textcount]);
  156.         SetTimerEx("TextDrawDestroyTimer4",seconds*1000,0,"d",textcount);
  157.     }
  158.     else if(style == 5)
  159.     {
  160.         TextDrawShowForAll(gTextStyle5[textcount]);
  161.         SetTimerEx("TextDrawDestroyTimer5",seconds*1000,0,"d",textcount);
  162.     }
  163. }
  164. public TextDrawDestroyTimer1(TextDrawID)
  165. {
  166.     TextDrawDestroy(gTextStyle1[TextDrawID]);
  167.     return 1;
  168. }
  169. public TextDrawDestroyTimer2(TextDrawID)
  170. {
  171.     TextDrawDestroy(gTextStyle2[TextDrawID]);
  172.     return 1;
  173. }
  174. public TextDrawDestroyTimer3(TextDrawID)
  175. {
  176.     TextDrawDestroy(gTextStyle3[TextDrawID]);
  177.     return 1;
  178. }
  179. public TextDrawDestroyTimer4(TextDrawID)
  180. {
  181.     TextDrawDestroy(gTextStyle4[TextDrawID]);
  182.     return 1;
  183. }
  184. public TextDrawDestroyTimer5(TextDrawID)
  185. {
  186.     TextDrawDestroy(gTextStyle5[TextDrawID]);
  187.     return 1;
  188. }
  189.  
  190. ///END///
Advertisement
Add Comment
Please, Sign In to add comment