Advertisement
adri1

intro

Sep 23rd, 2013
8,148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.58 KB | None | 0 0
  1. // By adri1.
  2.  
  3. #include <a_samp>
  4. main();
  5. new StepSpawnPlayer[MAX_PLAYERS];
  6. new Text:roleplaybox;
  7. new PlayerText:roleplay[MAX_PLAYERS];
  8. forward OnPlayerFinishInterpolateCamera(playerid, type);
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. SetGameModeText("Test");
  13. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  14.  
  15. roleplaybox = TextDrawCreate(205.212234, 372.750000, "-");
  16. TextDrawLetterSize(roleplaybox, 15.362092, 1.419166);
  17. TextDrawAlignment(roleplaybox, 1);
  18. TextDrawColor(roleplaybox, -1);
  19. TextDrawSetShadow(roleplaybox, 0);
  20. TextDrawSetOutline(roleplaybox, 2);
  21. TextDrawBackgroundColor(roleplaybox, 51);
  22. TextDrawFont(roleplaybox, 1);
  23. TextDrawSetProportional(roleplaybox, 1);
  24. return 1;
  25. }
  26.  
  27. public OnPlayerRequestClass(playerid, classid)
  28. {
  29. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  30. SpawnPlayer(playerid);
  31. StepSpawnPlayer[playerid] = 1;
  32. return 1;
  33. }
  34.  
  35. public OnPlayerConnect(playerid)
  36. {
  37. StepSpawnPlayer[playerid] = 0;
  38.  
  39. roleplay[playerid] = CreatePlayerTextDraw(playerid, 317.188934, 349.999725, "e");
  40. PlayerTextDrawLetterSize(playerid, roleplay[playerid], 0.586340, 3.052500);
  41. PlayerTextDrawAlignment(playerid, roleplay[playerid], 2);
  42. PlayerTextDrawColor(playerid, roleplay[playerid], -1);
  43. PlayerTextDrawSetShadow(playerid, roleplay[playerid], -258);
  44. PlayerTextDrawSetOutline(playerid, roleplay[playerid], 0);
  45. PlayerTextDrawBackgroundColor(playerid, roleplay[playerid], -2139062017);
  46. PlayerTextDrawFont(playerid, roleplay[playerid], 1);
  47. PlayerTextDrawSetProportional(playerid, roleplay[playerid], 1);
  48. return 1;
  49. }
  50.  
  51. public OnPlayerSpawn(playerid)
  52. {
  53. if(StepSpawnPlayer[playerid] == 1)
  54. {
  55. TogglePlayerSpectating(playerid, 1);
  56. SetPlayerPos(playerid, 155.3337, -1776.4384, 14.8978+5.0);
  57. TogglePlayerControllable(playerid, false);
  58. PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/s/z834k2bgngbcmm6/kbgdHubwVdkG.128.mp3");
  59. SetPlayerCameraPos(playerid, 155.3337, -1776.4384, 14.8978);
  60. SetPlayerCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128);
  61. InterpolateCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128, 156.2713, -1776.0797, 14.7078, 5000, CAMERA_MOVE);
  62. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 0);
  63. PlayerTextDrawShow(playerid, roleplay[playerid]);
  64. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  65. }
  66. return 1;
  67. }
  68.  
  69. public OnPlayerFinishInterpolateCamera(playerid, type)
  70. {
  71. switch(type)
  72. {
  73. case 0:
  74. {
  75. InterpolateCameraPos(playerid, 187.600982, -1791.727050, 119.087432, 193.731567, -1789.235473, 118.845245, 5000);
  76. InterpolateCameraLookAt(playerid, 189.006942, -1790.279785, 114.512641, 195.057144, -1788.512817, 114.078620, 5000);
  77. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 1);
  78. PlayerTextDrawSetString(playerid, roleplay[playerid], "eX");
  79. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  80. }
  81. case 1:
  82. {
  83. InterpolateCameraPos(playerid, 300.803771, -1753.841796, 59.482250, 332.887237, -1753.466674, 60.534908, 4000);
  84. InterpolateCameraLookAt(playerid, 302.467315, -1749.504394, 57.633026, 334.005126, -1748.907470, 58.813385, 4000);
  85. SetTimerEx("OnPlayerFinishInterpolateCamera", 4000-600, 0, "id", playerid, 2);
  86. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXt");
  87. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  88. }
  89. case 2:
  90. {
  91. InterpolateCameraPos(playerid, 350.840972, -1794.716308, 13.146982, 346.193756, -1800.415649, 10.697548, 8000);
  92. InterpolateCameraLookAt(playerid, 348.053558, -1790.653564, 12.295993, 342.141357, -1797.657592, 9.712170, 8000);
  93. SetTimerEx("OnPlayerFinishInterpolateCamera", 8000-600, 0, "id", playerid, 3);
  94. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtr");
  95. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  96. }
  97. case 3:
  98. {
  99. InterpolateCameraPos(playerid, 169.602859, -1775.647705, 6.933395, 169.617141, -1776.156250, 12.790164, 5000);
  100. InterpolateCameraLookAt(playerid, 169.547332, -1770.651367, 7.117267, 169.588928, -1771.159301, 12.618641, 5000);
  101. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 4);
  102. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtre");
  103. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  104. }
  105. case 4:
  106. {
  107. InterpolateCameraPos(playerid, 386.273284, -2030.129516, 59.993469, 395.822113, -2044.595703, 59.993469, 5000);
  108. InterpolateCameraLookAt(playerid, 386.591949, -2029.832275, 55.012496, 396.252319, -2044.526245, 55.012496, 5000);
  109. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 5);
  110. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtrem");
  111. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  112. }
  113. case 5:
  114. {
  115. InterpolateCameraPos(playerid, 341.018402, -2095.904052, 6.937077, 342.805603, -2096.498535, 6.648118, 5000);
  116. InterpolateCameraLookAt(playerid, 345.258972, -2093.501220, 5.821543, 347.304443, -2094.563964, 5.639461, 5000);
  117. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 6);
  118. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme");
  119. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  120. }
  121. case 6:
  122. {
  123. InterpolateCameraPos(playerid, 481.641052, -1804.006835, 6.803627, 484.250549, -1802.375244, 6.660738, 5000);
  124. InterpolateCameraLookAt(playerid, 485.734344, -1801.318481, 5.794973, 488.679290, -1800.236572, 5.759444, 5000);
  125. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 7);
  126. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme R");
  127. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  128. }
  129. case 7:
  130. {
  131. InterpolateCameraPos(playerid, 662.689147, -1868.981201, 6.513285, 665.048583, -1870.174438, 6.864079, 5000);
  132. InterpolateCameraLookAt(playerid, 658.142028, -1867.027709, 5.800874, 661.006286, -1867.294311, 6.260089, 5000);
  133. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 8);
  134. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Ro");
  135. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  136. }
  137. case 8:
  138. {
  139. InterpolateCameraPos(playerid, 542.343933, -1901.457519, 2.008791, 544.523376, -1901.883666, 2.085470, 5000);
  140. InterpolateCameraLookAt(playerid, 544.995666, -1897.256958, 2.577868, 546.892395, -1897.521118, 2.681705, 5000);
  141. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 9);
  142. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Rol");
  143. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  144. }
  145. case 9:
  146. {
  147. InterpolateCameraPos(playerid, 542.945800, -1863.699707, 4.435829, 539.996215, -1863.695556, 4.304386, 5000);
  148. InterpolateCameraLookAt(playerid, 537.950744, -1863.694213, 4.213245, 535.009887, -1863.990478, 4.081802, 5000);
  149. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 10);
  150. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Role");
  151. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  152. }
  153. case 10:
  154. {
  155. InterpolateCameraPos(playerid, 329.131469, -1791.461791, 15.695193, 326.005981, -1793.169311, 15.695193, 3000);
  156. InterpolateCameraLookAt(playerid, 326.451660, -1787.321044, 14.874702, 323.228546, -1789.171630, 14.553024, 3000);
  157. SetTimerEx("OnPlayerFinishInterpolateCamera", 3000-600, 0, "id", playerid, 11);
  158. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Role P");
  159. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  160. }
  161. case 11:
  162. {
  163. InterpolateCameraPos(playerid, 514.983886, -1760.605102, 17.303379, 514.898010, -1760.553955, 18.443613, 3000);
  164. InterpolateCameraLookAt(playerid, 519.002807, -1762.556640, 15.058471, 519.071899, -1762.496826, 16.493217, 3000);
  165. SetTimerEx("OnPlayerFinishInterpolateCamera", 3000-600, 0, "id", playerid, 12);
  166. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Role Pl");
  167. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  168. }
  169. case 12:
  170. {
  171. InterpolateCameraPos(playerid, 524.473022, -1763.555786, 14.948656, 524.520751, -1763.556152, 15.495350, 5000);
  172. InterpolateCameraLookAt(playerid, 519.486999, -1763.304687, 14.671454, 519.540893, -1763.958007, 15.296504, 5000);
  173. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 13);
  174. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Role Pla");
  175. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  176. }
  177. case 13:
  178. {
  179. InterpolateCameraPos(playerid, 545.416076, -1772.326171, 8.179362, 547.233886, -1774.291870, 8.147984, 5000);
  180. InterpolateCameraLookAt(playerid, 548.811035, -1775.996459, 8.120770, 550.628845, -1777.962158, 8.089392, 5000);
  181. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 14);
  182. PlayerTextDrawSetString(playerid, roleplay[playerid], "eXtreme Role Play");
  183. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  184. }
  185. case 14:
  186. {
  187. InterpolateCameraPos(playerid, 550.013793, -1772.057128, 16.024028, 552.169799, -1772.079223, 16.285087, 5000);
  188. InterpolateCameraLookAt(playerid, 546.803894, -1768.331054, 15.122734, 548.959899, -1768.353149, 15.383792, 5000);
  189. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 15);
  190. TextDrawShowForPlayer(playerid, roleplaybox);
  191. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  192. }
  193. }
  194. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement