SAMP Gitlab CI Test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
12 KiB

  1. // -----------------------------------------------------------------------------
  2. // Example Filterscript for the new Modular Island Objects
  3. // -------------------------------------------------------
  4. // By Matite in January 2015
  5. //
  6. // This script creates a Modular Island just off the coast in SF (next to the
  7. // docks near the hospital).
  8. //
  9. // Warning...
  10. // This script uses a total of 87 player objects
  11. // -----------------------------------------------------------------------------
  12. // -----------------------------------------------------------------------------
  13. // Includes
  14. // --------
  15. // SA-MP Include
  16. #include <a_samp>
  17. // -----------------------------------------------------------------------------
  18. // Callbacks
  19. // ---------
  20. // Un-comment the OnPlayerCommandText callback below (remove the "/*" and the "*/")
  21. // to enable a simple teleport command (/mi) which teleports the player to
  22. // the modular island in SF.
  23. /*
  24. public OnPlayerCommandText(playerid, cmdtext[])
  25. {
  26. // Check command text
  27. if (strcmp("/mi", cmdtext, true, 3) == 0)
  28. {
  29. // Set the interior
  30. SetPlayerInterior(playerid, 0);
  31. // Set player position and facing angle
  32. SetPlayerPos(playerid, -3343.57 + random(2), 194.34 + random(2), 6.2);
  33. SetPlayerFacingAngle(playerid, 315);
  34. // Fix camera position after teleporting
  35. SetCameraBehindPlayer(playerid);
  36. // Send a gametext message to the player
  37. GameTextForPlayer(playerid, "~b~~h~Modular Island!", 3000, 3);
  38. // Exit here
  39. return 1;
  40. }
  41. // Exit here (return 0 as the command was not handled in this filterscript)
  42. return 0;
  43. }
  44. */
  45. public OnFilterScriptInit()
  46. {
  47. // Display information in the Server Console
  48. print("\n");
  49. print(" |---------------------------------------------------");
  50. print(" |--- Modular Island Filterscript by Matite");
  51. print(" |-- Script v1.01");
  52. print(" |-- 12th January 2015");
  53. print(" |---------------------------------------------------");
  54. // Loop
  55. for (new i = 0; i < MAX_PLAYERS; i++)
  56. {
  57. // Check if the player is connected and not a NPC
  58. if (IsPlayerConnected(i) && !IsPlayerNPC(i))
  59. {
  60. // Create modular island objects for the player
  61. // (so any player currently ingame does not have to rejoin for them
  62. // to appear when this filterscript is loaded)
  63. CreateMIObjects(i);
  64. }
  65. }
  66. // Exit here
  67. return 1;
  68. }
  69. public OnFilterScriptExit()
  70. {
  71. // Display information in the Server Console
  72. print(" |---------------------------------------------------");
  73. print(" |-- Modular Island Filterscript Unloaded");
  74. print(" |---------------------------------------------------");
  75. // Exit here
  76. return 1;
  77. }
  78. public OnPlayerConnect(playerid)
  79. {
  80. // Create modular island objects for the player
  81. CreateMIObjects(playerid);
  82. // Exit here
  83. return 1;
  84. }
  85. CreateMIObjects(playerid)
  86. {
  87. // Create modular island player objects (with draw distance of 599m)
  88. CreatePlayerObject(playerid,19529,-3130.000000,0.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  89. CreatePlayerObject(playerid,19530,-3130.000000,140.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  90. CreatePlayerObject(playerid,19531,-3130.000000,280.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  91. CreatePlayerObject(playerid,19532,-3130.000000,70.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  92. CreatePlayerObject(playerid,19532,-3130.000000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  93. CreatePlayerObject(playerid,19533,-3238.750000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  94. CreatePlayerObject(playerid,19534,-3200.000000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  95. CreatePlayerObject(playerid,19532,-3200.000000,280.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  96. CreatePlayerObject(playerid,19534,-3200.000000,70.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  97. CreatePlayerObject(playerid,19532,-3200.000000,140.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  98. CreatePlayerObject(playerid,19534,-3200.000000,70.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  99. CreatePlayerObject(playerid,19532,-3200.000000,0.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  100. CreatePlayerObject(playerid,19535,-3277.500000,210.000000,4.000000,0.000000,0.000000,270.000000, 599.0);
  101. CreatePlayerObject(playerid,19532,-3277.500000,140.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  102. CreatePlayerObject(playerid,19532,-3277.500000,280.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  103. CreatePlayerObject(playerid,19532,-3277.500000,0.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  104. CreatePlayerObject(playerid,19535,-3277.500000,70.000000,4.000000,0.000000,0.000000,270.000000, 599.0);
  105. CreatePlayerObject(playerid,19533,-3238.750000,70.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  106. CreatePlayerObject(playerid,19536,-3238.750000,0.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  107. CreatePlayerObject(playerid,19537,-3238.750000,140.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  108. CreatePlayerObject(playerid,19538,-3238.750000,280.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  109. CreatePlayerObject(playerid,19542,-3052.500000,0.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  110. CreatePlayerObject(playerid,19541,-3052.500000,70.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  111. CreatePlayerObject(playerid,19535,-3060.000000,70.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  112. CreatePlayerObject(playerid,19532,-3060.000000,0.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  113. CreatePlayerObject(playerid,19532,-3060.000000,140.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  114. CreatePlayerObject(playerid,19535,-3060.000000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  115. CreatePlayerObject(playerid,19532,-3060.000000,280.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  116. CreatePlayerObject(playerid,19542,-3052.500000,140.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  117. CreatePlayerObject(playerid,19541,-3052.500000,210.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  118. CreatePlayerObject(playerid,19542,-3052.500000,280.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  119. CreatePlayerObject(playerid,19540,-3052.500000,-62.500000,4.000000,0.000000,0.000000,270.000000, 599.0);
  120. CreatePlayerObject(playerid,19541,-3060.000000,-62.500000,4.000000,0.000000,0.000000,-90.000000, 599.0);
  121. CreatePlayerObject(playerid,19542,-3130.000000,-62.500000,4.000000,0.000000,0.000000,270.000000, 599.0);
  122. CreatePlayerObject(playerid,19541,-3200.000000,-62.500000,4.000000,0.000000,0.000000,-90.000000, 599.0);
  123. CreatePlayerObject(playerid,19539,-3238.750000,-62.500000,4.000000,0.000000,0.000000,270.000000, 599.0);
  124. CreatePlayerObject(playerid,19541,-3277.500000,-62.500000,4.000000,0.000000,0.000000,-90.000000, 599.0);
  125. CreatePlayerObject(playerid,19540,-3285.000000,-62.500000,4.000000,0.000000,0.000000,180.000000, 599.0);
  126. CreatePlayerObject(playerid,19542,-3410.000488,0.000000,4.000000,0.000000,0.000000,270.000000, 599.0);
  127. CreatePlayerObject(playerid,19541,-3285.000000,70.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  128. CreatePlayerObject(playerid,19543,-3316.250000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  129. CreatePlayerObject(playerid,19546,-3285.000000,202.500000,4.000000,0.000000,0.000000,270.000000, 599.0);
  130. CreatePlayerObject(playerid,19540,-3472.500000,342.500000,4.000000,0.000000,0.000000,450.000000, 599.0);
  131. CreatePlayerObject(playerid,19546,-3285.000000,0.000000,4.000000,0.000000,0.000000,270.000000, 599.0);
  132. CreatePlayerObject(playerid,19546,-3285.000000,0.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  133. CreatePlayerObject(playerid,19542,-3410.000000,0.000000,4.000000,0.000000,0.000000,450.000000, 599.0);
  134. CreatePlayerObject(playerid,19540,-3472.500000,0.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  135. CreatePlayerObject(playerid,19540,-3472.500000,0.000000,4.000000,0.000000,0.000000,450.000000, 599.0);
  136. CreatePlayerObject(playerid,19547,-3347.500000,280.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  137. CreatePlayerObject(playerid,19539,-3285.000000,108.750000,4.000000,0.000000,0.000000,180.000000, 599.0);
  138. CreatePlayerObject(playerid,19542,-3410.000000,202.500000,4.000000,0.000000,0.000000,270.000000, 599.0);
  139. CreatePlayerObject(playerid,19543,-3378.750000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  140. CreatePlayerObject(playerid,19543,-3441.250000,210.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  141. CreatePlayerObject(playerid,19536,-3441.250000,280.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  142. CreatePlayerObject(playerid,19540,-3472.500000,202.500000,4.000000,0.000000,0.000000,180.000000, 599.0);
  143. CreatePlayerObject(playerid,19542,-3472.500000,265.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  144. CreatePlayerObject(playerid,19541,-3472.500000,335.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  145. CreatePlayerObject(playerid,19542,-3410.000000,342.500000,4.000000,0.000000,0.000000,90.000000, 599.0);
  146. CreatePlayerObject(playerid,19535,-3277.500000,350.000000,4.000000,0.000000,0.000000,270.000000, 599.0);
  147. CreatePlayerObject(playerid,19535,-3200.000000,350.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  148. CreatePlayerObject(playerid,19535,-3060.000000,350.000000,4.000000,0.000000,0.000000,180.000000, 599.0);
  149. CreatePlayerObject(playerid,19532,-3130.000000,350.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  150. CreatePlayerObject(playerid,19533,-3238.750000,350.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  151. CreatePlayerObject(playerid,19546,-3285.000000,342.500000,4.000000,0.000000,0.000000,180.000000, 599.0);
  152. CreatePlayerObject(playerid,19540,-3285.000000,482.500000,4.000000,0.000000,0.000000,450.000000, 599.0);
  153. CreatePlayerObject(playerid,19542,-3222.500000,482.500000,4.000000,0.000000,0.000000,90.000000, 599.0);
  154. CreatePlayerObject(playerid,19536,-3238.750000,420.000000,4.000000,0.000000,0.000000,90.000000, 599.0);
  155. CreatePlayerObject(playerid,19541,-3285.000000,412.500000,4.000000,0.000000,0.000000,180.000000, 599.0);
  156. CreatePlayerObject(playerid,19541,-3052.500000,350.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  157. CreatePlayerObject(playerid,19540,-3052.500000,482.500000,4.000000,0.000000,0.000000,0.000000, 599.0);
  158. CreatePlayerObject(playerid,19539,-3052.500000,388.750000,4.000000,0.000000,0.000000,0.000000, 599.0);
  159. CreatePlayerObject(playerid,19539,-3083.750000,482.500000,4.000000,0.000000,0.000000,90.000000, 599.0);
  160. CreatePlayerObject(playerid,19541,-3122.500000,482.500000,4.000000,0.000000,0.000000,90.000000, 599.0);
  161. CreatePlayerObject(playerid,19541,-3137.500000,482.500000,4.000000,0.000000,0.000000,90.000000, 599.0);
  162. CreatePlayerObject(playerid,19541,-3152.500000,482.500000,4.000000,0.000000,0.000000,90.000000, 599.0);
  163. CreatePlayerObject(playerid,19529,-3130.000000,420.000000,4.000000,0.000000,0.000000,0.000000, 599.0);
  164. CreatePlayerObject(playerid,19543,-3277.500000,388.750000,4.000000,0.000000,0.000000,0.000000, 599.0);
  165. CreatePlayerObject(playerid,19543,-3277.500000,451.250000,4.000000,0.000000,0.000000,0.000000, 599.0);
  166. CreatePlayerObject(playerid,19543,-3200.000000,388.750000,4.000000,0.000000,0.000000,0.000000, 599.0);
  167. CreatePlayerObject(playerid,19543,-3200.000000,451.250000,4.000000,0.000000,0.000000,0.000000, 599.0);
  168. CreatePlayerObject(playerid,19543,-3060.000000,388.750000,4.000000,0.000000,0.000000,0.000000, 599.0);
  169. CreatePlayerObject(playerid,19543,-3060.000000,451.250000,4.000000,0.000000,0.000000,0.000000, 599.0);
  170. CreatePlayerObject(playerid,19539,-3285.000000,451.250000,4.000000,0.000000,0.000000,180.000000, 599.0);
  171. CreatePlayerObject(playerid,19539,-3052.500000,451.250000,4.000000,0.000000,0.000000,0.000000, 599.0);
  172. // Exit here
  173. return 1;
  174. }