Guest User

SAMP LOADSC

a guest
Mar 21st, 2016
1,681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. /////SAMP loading screen by UltraScripter////////////////////////////
  2.  
  3. #include <a_samp>
  4.  
  5. new Text:LOADSCS;
  6. new Spawned[MAX_PLAYERS];
  7. new Timer;
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. #endif
  12.  
  13. public OnPlayerConnect(playerid)
  14. {
  15. LOADSCS = TextDrawCreate(0.0, 0.0, "loadsc1:loadsc1");
  16. TextDrawFont(LOADSCS, 4);
  17. TextDrawUseBox(LOADSCS, 1);
  18. TextDrawTextSize(LOADSCS, 650.0, 470.0);
  19. Spawned[playerid] = 0;
  20. return 1;
  21. }
  22.  
  23. public OnPlayerDisconnect(playerid, reason)
  24. {
  25. Spawned[playerid] = 0;
  26. TextDrawDestroy(LOADSCS);
  27. return 1;
  28. }
  29.  
  30. public OnPlayerSpawn(playerid)
  31. {
  32. if(Spawned[playerid] == 0)
  33. {
  34. PlayAudioStreamForPlayer(playerid, "https://dl.dropbox.com/s/otw0f6mk0w1ouha/GTA%20San%20Andreas%20Theme%20Song%20Full%20%21%20%21.mp3");
  35. SetPlayerHealth(playerid, 999999);
  36. TogglePlayerControllable(playerid, 0);
  37. Timer = SetTimerEx("LOADSCS1", 100, false, "i", playerid);
  38. Spawned[playerid] = 1;
  39. }
  40. else return 0;
  41. return 1;
  42. }
  43.  
  44. forward LOADSCS1(playerid);
  45.  
  46. public LOADSCS1(playerid)
  47. {
  48. TextDrawShowForPlayer(playerid, LOADSCS);
  49. SetTimerEx("LOADSCS2", 3000, false, "i", playerid);
  50. return 1;
  51. }
  52.  
  53. forward LOADSCS2(playerid);
  54.  
  55. public LOADSCS2(playerid)
  56. {
  57. TextDrawSetString(LOADSCS, "loadsc2:loadsc2");
  58. SetTimerEx("LOADSCS3", 3000, false, "i", playerid);
  59. return 1;
  60. }
  61.  
  62. forward LOADSCS3(playerid);
  63.  
  64. public LOADSCS3(playerid)
  65. {
  66. TextDrawSetString(LOADSCS, "loadsc3:loadsc3");
  67. SetTimerEx("LOADSCS4", 3000, false, "i", playerid);
  68. return 1;
  69. }
  70.  
  71. forward LOADSCS4(playerid);
  72.  
  73. public LOADSCS4(playerid)
  74. {
  75. TextDrawSetString(LOADSCS, "loadsc4:loadsc4");
  76. SetTimerEx("LOADSCS5", 3000, false, "i", playerid);
  77. return 1;
  78. }
  79.  
  80. forward LOADSCS5(playerid);
  81.  
  82. public LOADSCS5(playerid)
  83. {
  84. TextDrawSetString(LOADSCS, "loadsc5:loadsc5");
  85. SetTimerEx("LOADSCS6", 3000, false, "i", playerid);
  86. return 1;
  87. }
  88.  
  89. forward LOADSCS6(playerid);
  90.  
  91. public LOADSCS6(playerid)
  92. {
  93. TextDrawSetString(LOADSCS, "loadsc6:loadsc6");
  94. SetTimerEx("LOADSCS7", 3000, false, "i", playerid);
  95. return 1;
  96. }
  97.  
  98. forward LOADSCS7(playerid);
  99.  
  100. public LOADSCS7(playerid)
  101. {
  102. TextDrawSetString(LOADSCS, "loadsc7:loadsc7");
  103. SetTimerEx("LOADSCS8", 3000, false, "i", playerid);
  104. return 1;
  105. }
  106.  
  107. forward LOADSCS8(playerid);
  108.  
  109. public LOADSCS8(playerid)
  110. {
  111. TextDrawSetString(LOADSCS, "loadsc8:loadsc8");
  112. SetTimerEx("LOADSCS9", 3000, false, "i", playerid);
  113. return 1;
  114. }
  115.  
  116. forward LOADSCS9(playerid);
  117.  
  118. public LOADSCS9(playerid)
  119. {
  120. TextDrawSetString(LOADSCS, "loadsc9:loadsc9");
  121. SetTimerEx("LOADSCS10", 3000, false, "i", playerid);
  122. return 1;
  123. }
  124.  
  125. forward LOADSCS10(playerid);
  126.  
  127. public LOADSCS10(playerid)
  128. {
  129. TextDrawSetString(LOADSCS, "loadsc10:loadsc10");
  130. SetTimerEx("LOADSCS11", 3000, false, "i", playerid);
  131. return 1;
  132. }
  133.  
  134. forward LOADSCS11(playerid);
  135.  
  136. public LOADSCS11(playerid)
  137. {
  138. TextDrawSetString(LOADSCS, "loadsc11:loadsc11");
  139. SetTimerEx("LOADSCS12", 3000, false, "i", playerid);
  140. return 1;
  141. }
  142.  
  143. forward LOADSCS12(playerid);
  144.  
  145. public LOADSCS12(playerid)
  146. {
  147. TextDrawSetString(LOADSCS, "loadsc12:loadsc12");
  148. SetTimerEx("LOADSCS13", 3000, false, "i", playerid);
  149. return 1;
  150. }
  151.  
  152. forward LOADSCS13(playerid);
  153.  
  154. public LOADSCS13(playerid)
  155. {
  156. TextDrawSetString(LOADSCS, "loadsc13:loadsc13");
  157. SetTimerEx("LOADSCS14", 3000, false, "i", playerid);
  158. return 1;
  159. }
  160.  
  161. forward LOADSCS14(playerid);
  162.  
  163. public LOADSCS14(playerid)
  164. {
  165. StopAudioStreamForPlayer(playerid);
  166. TextDrawDestroy(LOADSCS);
  167. TogglePlayerControllable(playerid, 1);
  168. SetPlayerHealth(playerid, 100);
  169. KillTimer(Timer);
  170. return 1;
  171. }
  172.  
  173. /////SAMP loading screen by UltraScripter////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment