Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1. // By adri1.
  2.  
  3. #include <a_samp>
  4. #pragma tabsize 0
  5. main();
  6. new StepSpawnPlayer[MAX_PLAYERS];
  7. new Text:roleplaybox;
  8. new PlayerText:roleplay[MAX_PLAYERS];
  9. forward OnPlayerFinishInterpolateCamera(playerid, type);
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. SetGameModeText("Test");
  14. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  15.  
  16. roleplaybox = TextDrawCreate(205.212234, 372.750000, "-");
  17. TextDrawLetterSize(roleplaybox, 15.362092, 1.419166);
  18. TextDrawAlignment(roleplaybox, 1);
  19. TextDrawColor(roleplaybox, -1);
  20. TextDrawSetShadow(roleplaybox, 0);
  21. TextDrawSetOutline(roleplaybox, 2);
  22. TextDrawBackgroundColor(roleplaybox, 51);
  23. TextDrawFont(roleplaybox, 1);
  24. TextDrawSetProportional(roleplaybox, 1);
  25. return 1;
  26. }
  27.  
  28. public OnPlayerRequestClass(playerid, classid)
  29. {
  30. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  31. SpawnPlayer(playerid);
  32. StepSpawnPlayer[playerid] = 1;
  33. return 1;
  34. }
  35. public OnPlayerConnect(playerid)
  36. {
  37. StepSpawnPlayer[playerid] = 0;
  38.  
  39. roleplay[playerid] = CreatePlayerTextDraw(playerid, 317.188934, 349.999725, "V");
  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. public OnPlayerDisconnect(playerid)
  51. {
  52. return 1;
  53. }
  54.  
  55. public OnPlayerSpawn(playerid)
  56. {
  57. if(StepSpawnPlayer[playerid] == 1)
  58. {
  59. TogglePlayerSpectating(playerid, 1);
  60. SetPlayerPos(playerid, 155.3337, -1776.4384, 14.8978+5.0);
  61. TogglePlayerControllable(playerid, false);
  62. PlayAudioStreamForPlayer(playerid, "http://mp3.zing.vn/download/song/Freakshow-DJ-Blend/ZnJnTLmszLlZFFJyZbJyDGZn");
  63. SetPlayerCameraPos(playerid, 155.3337, -1776.4384, 14.8978);
  64. SetPlayerCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128);
  65. InterpolateCameraLookAt(playerid, 156.2734, -1776.0850, 14.2128, 156.2713, -1776.0797, 14.7078, 5000, CAMERA_MOVE);
  66. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 0);
  67. PlayerTextDrawShow(playerid, roleplay[playerid]);
  68. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  69. }
  70. return 1;
  71. }
  72.  
  73. public OnPlayerFinishInterpolateCamera(playerid, type)
  74. {
  75. switch(type)
  76. {
  77. case 0:
  78. {
  79. InterpolateCameraPos(playerid, 187.600982, -1791.727050, 119.087432, 193.731567, -1789.235473, 118.845245, 5000);
  80. InterpolateCameraLookAt(playerid, 189.006942, -1790.279785, 114.512641, 195.057144, -1788.512817, 114.078620, 5000);
  81. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 1);
  82. PlayerTextDrawSetString(playerid, roleplay[playerid], "Viet");
  83. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  84. }
  85. case 1:
  86. {
  87. InterpolateCameraPos(playerid, 300.803771, -1753.841796, 59.482250, 332.887237, -1753.466674, 60.534908, 4000);
  88. InterpolateCameraLookAt(playerid, 302.467315, -1749.504394, 57.633026, 334.005126, -1748.907470, 58.813385, 4000);
  89. SetTimerEx("OnPlayerFinishInterpolateCamera", 4000-600, 0, "id", playerid, 2);
  90. PlayerTextDrawSetString(playerid, roleplay[playerid], "VietNam");
  91. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  92. }
  93. case 2:
  94. {
  95. InterpolateCameraPos(playerid, 350.840972, -1794.716308, 13.146982, 346.193756, -1800.415649, 10.697548, 8000);
  96. InterpolateCameraLookAt(playerid, 348.053558, -1790.653564, 12.295993, 342.141357, -1797.657592, 9.712170, 8000);
  97. SetTimerEx("OnPlayerFinishInterpolateCamera", 8000-600, 0, "id", playerid, 3);
  98. PlayerTextDrawSetString(playerid, roleplay[playerid], "VietNam Role");
  99. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  100. }
  101. case 3:
  102. {
  103. InterpolateCameraPos(playerid, 169.602859, -1775.647705, 6.933395, 169.617141, -1776.156250, 12.790164, 5000);
  104. InterpolateCameraLookAt(playerid, 169.547332, -1770.651367, 7.117267, 169.588928, -1771.159301, 12.618641, 5000);
  105. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 4);
  106. PlayerTextDrawSetString(playerid, roleplay[playerid], "VietNam Roleplay");
  107. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  108. }
  109. case 4:
  110. {
  111. InterpolateCameraPos(playerid, 550.013793, -1772.057128, 16.024028, 552.169799, -1772.079223, 16.285087, 5000);
  112. InterpolateCameraLookAt(playerid, 546.803894, -1768.331054, 15.122734, 548.959899, -1768.353149, 15.383792, 5000);
  113. SetTimerEx("OnPlayerFinishInterpolateCamera", 5000-600, 0, "id", playerid, 5);
  114. TextDrawShowForPlayer(playerid, roleplaybox);
  115. for(new i = 0; i != 32; i++) SendClientMessage(playerid, -1, " ");
  116. }
  117. }
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement