Advertisement
OKStyle

Intro TextDraw

Sep 2nd, 2011
8,872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.22 KB | None | 0 0
  1. #include <a_samp>
  2. // Intro script by O.K.Style™
  3. new Text:Intro[12];
  4. // www.gta-news.org
  5. public OnFilterScriptInit()
  6. {
  7.     Intro[0] = TextDrawCreate(642.0, 1.0, "~n~");
  8.     TextDrawLetterSize(Intro[0], 0.5, 49.5);
  9.     TextDrawUseBox(Intro[0], 1);
  10.     TextDrawBoxColor(Intro[0], 0x000000FF);
  11.     TextDrawTextSize(Intro[0], -2.0, 0.0);
  12.  
  13.     Intro[1] = TextDrawCreate(190.000000, 190.000000, "~p~~h~Username");
  14.     TextDrawFont(Intro[1], 2);
  15.     TextDrawLetterSize(Intro[1], 0.570000, 1.799999);
  16.    
  17.     Intro[2] = TextDrawCreate(310.000000, 190.000000, "present...");
  18.     TextDrawFont(Intro[2], 2);
  19.     TextDrawColor(Intro[2], 0xFFFFFF22);
  20.     TextDrawLetterSize(Intro[2], 0.570000, 1.799999);
  21.    
  22.     Intro[3] = TextDrawCreate(310.000000, 190.000000, "present...");
  23.     TextDrawFont(Intro[3], 2);
  24.     TextDrawColor(Intro[3], 0xFFFFFF44);
  25.     TextDrawLetterSize(Intro[3], 0.570000, 1.799999);
  26.    
  27.     Intro[4] = TextDrawCreate(310.000000, 190.000000, "present...");
  28.     TextDrawFont(Intro[4], 2);
  29.     TextDrawColor(Intro[4], 0xFFFFFF66);
  30.     TextDrawLetterSize(Intro[4], 0.570000, 1.799999);
  31.    
  32.     Intro[5] = TextDrawCreate(310.000000, 190.000000, "present...");
  33.     TextDrawFont(Intro[5], 2);
  34.     TextDrawColor(Intro[5], 0xFFFFFF88);
  35.     TextDrawLetterSize(Intro[5], 0.570000, 1.799999);
  36.    
  37.     Intro[6] = TextDrawCreate(310.000000, 190.000000, "present...");
  38.     TextDrawFont(Intro[6], 2);
  39.     TextDrawColor(Intro[6], 0xFFFFFFAA);
  40.     TextDrawLetterSize(Intro[6], 0.570000, 1.799999);
  41.    
  42.     Intro[7] = TextDrawCreate(310.000000, 190.000000, "present...");
  43.     TextDrawFont(Intro[7], 2);
  44.     TextDrawColor(Intro[7], 0xFFFFFFCC);
  45.     TextDrawLetterSize(Intro[7], 0.570000, 1.799999);
  46.    
  47.     Intro[8] = TextDrawCreate(310.000000, 190.000000, "present...");
  48.     TextDrawFont(Intro[8], 2);
  49.     TextDrawColor(Intro[8], 0xFFFFFFFF);
  50.     TextDrawLetterSize(Intro[8], 0.570000, 1.799999);
  51.  
  52.     Intro[9] = TextDrawCreate(190.0, 202.0, ".");
  53.     TextDrawFont(Intro[9], 1);
  54.     TextDrawLetterSize(Intro[9], 23.250051, 1.099999);
  55.  
  56.     Intro[10] = TextDrawCreate(304.00, 223.0, "~y~~h~The name of the SERVER");
  57.     TextDrawFont(Intro[10], 2);
  58.     TextDrawLetterSize(Intro[10], 0.340000, 1.099999);
  59.  
  60.     Intro[11] = TextDrawCreate(331.0, 235.0, "~g~~h~www.pawno.ru");
  61.     TextDrawFont(Intro[11], 2);
  62.     TextDrawLetterSize(Intro[11], 0.340000, 1.099999);
  63.  
  64.     return 1;
  65. }
  66. public OnPlayerConnect(playerid)
  67. {
  68.     TogglePlayerSpectating(playerid, true);
  69.     ForceClassSelection(playerid);
  70.     SetPVarInt(playerid, "Intro", 0);
  71.     SetTimerEx("ShowIntro", 1000, 0, "d", playerid);
  72.     return 1;
  73. }
  74. forward ShowIntro(playerid);
  75. public ShowIntro(playerid)
  76. {
  77.     SetPVarInt(playerid, "Intro", GetPVarInt(playerid, "Intro") + 1);
  78.     new iteration = GetPVarInt(playerid, "Intro");
  79.     switch(iteration)
  80.     {
  81.         case 1:
  82.         {
  83.             for(new i; i < 11; i++) SendClientMessage(playerid, -1, "");
  84.             TextDrawShowForPlayer(playerid, Intro[0]);
  85.         }
  86.         case 2: TextDrawShowForPlayer(playerid, Intro[1]);
  87.         case 3: TextDrawShowForPlayer(playerid, Intro[2]);
  88.         case 4:
  89.         {
  90.             TextDrawHideForPlayer(playerid, Intro[2]);
  91.             TextDrawShowForPlayer(playerid, Intro[3]);
  92.         }
  93.         case 5:
  94.         {
  95.             TextDrawHideForPlayer(playerid, Intro[3]);
  96.             TextDrawShowForPlayer(playerid, Intro[4]);
  97.         }
  98.         case 6:
  99.         {
  100.             TextDrawHideForPlayer(playerid, Intro[4]);
  101.             TextDrawShowForPlayer(playerid, Intro[5]);
  102.         }
  103.         case 7:
  104.         {
  105.             TextDrawHideForPlayer(playerid, Intro[5]);
  106.             TextDrawShowForPlayer(playerid, Intro[6]);
  107.         }
  108.         case 8:
  109.         {
  110.             TextDrawHideForPlayer(playerid, Intro[6]);
  111.             TextDrawShowForPlayer(playerid, Intro[7]);
  112.         }
  113.         case 9:
  114.         {
  115.             TextDrawHideForPlayer(playerid, Intro[7]);
  116.             TextDrawShowForPlayer(playerid, Intro[8]);
  117.         }
  118.         case 10: TextDrawShowForPlayer(playerid, Intro[9]);
  119.         case 11: TextDrawShowForPlayer(playerid, Intro[10]);
  120.         case 12: TextDrawShowForPlayer(playerid, Intro[11]);
  121.     }
  122.     if(GetPVarInt(playerid, "Intro") < 10) SetTimerEx("ShowIntro", 300, 0, "d", playerid);
  123.     else if(9 < GetPVarInt(playerid, "Intro") < 13) SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
  124.     else
  125.     {
  126.         for(new i; i < sizeof(Intro); i++) TextDrawHideForPlayer(playerid, Intro[i]);
  127.         TogglePlayerSpectating(playerid, false);
  128.         ForceClassSelection(playerid);
  129.     }
  130.     return 1;
  131. }
  132. public OnFilterScriptExit()
  133. {
  134.     for(new i; i < sizeof(Intro); i++) TextDrawDestroy(Intro[i]);
  135.     return 1;
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement