Advertisement
Guest User

Don Corello

a guest
Aug 20th, 2009
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.78 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. //Door
  4. new Door1;
  5. new Door2;
  6. //Forwards
  7. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  8. // PRESSING(newkeys, keys)
  9. #define PRESSING(%0,%1) \
  10. (((%0) & (%1)) == (%1))
  11.  
  12. main()
  13. {
  14. print("\n----------------------------------");
  15. print(" Blank Gamemode by your name here");
  16. print("----------------------------------\n");
  17. }
  18.  
  19. public OnGameModeInit()
  20. {
  21. // Don't use these lines if it's a filterscript
  22. SetGameModeText("Blank Script");
  23. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  24. //----------------------[Bank Objs]--------------------------
  25. CreateObject(3997, 1989.555176, 308.669037, 3.816054, 0.0000, 0.0000, 0.0000);
  26. CreateObject(13007, 2044.595093, 260.997681, 5.863875, 0.0000, 0.0000, 268.8997);
  27. CreateObject(14576, 2037.848999, 265.887787, -0.319291, 0.0000, 0.0000, 0.0000);
  28. CreateObject(18553, 2052.441650, 267.986237, 5.366759, 0.0000, 0.0000, 357.4217);
  29. CreateObject(2395, 2037.617554, 251.057388, 4.094887, 0.0000, 0.0000, 0.0000);
  30. CreateObject(2395, 2040.489380, 251.059921, 6.153589, 0.0000, 0.0000, 0.0000);
  31. CreateObject(14592, 2052.075195, 231.292145, 6.823359, 0.0000, 0.0000, 180.3777);
  32. CreateObject(16773, 2043.223022, 214.320435, 3.889916, 0.0000, 0.0000, 270.6186);
  33. CreateObject(2025, 2066.053711, 243.225616, -0.106371, 0.0000, 0.0000, 181.2371);
  34. CreateObject(14651, 2046.059326, 244.582642, 2.148138, 0.0000, 0.0000, 272.3375);
  35. CreateObject(18070, 2054.164551, 241.114609, 0.407719, 0.0000, 0.0000, 270.6186);
  36. CreateObject(1670, 2052.541260, 239.019760, 0.953537, 0.0000, 0.0000, 0.0000);
  37. CreateObject(1716, 2050.742920, 238.504730, -0.097553, 0.0000, 0.0000, 0.0000);
  38. CreateObject(1716, 2050.831787, 240.421524, -0.095588, 0.0000, 0.0000, 0.0000);
  39. CreateObject(1716, 2050.865723, 242.472351, -0.092470, 0.0000, 0.0000, 0.0000);
  40. CreateObject(14455, 2044.725586, 247.495667, 1.575538, 0.0000, 0.0000, 0.0000);
  41. CreateObject(1726, 2044.988281, 241.707932, -0.105873, 0.0000, 0.0000, 0.0000);
  42. CreateObject(1726, 2047.553467, 239.715454, -0.129860, 0.0000, 0.0000, 271.4780);
  43. CreateObject(2193, 2044.358276, 254.830307, -1.110093, 0.0000, 0.0000, 0.0000);
  44. CreateObject(2193, 2044.339600, 257.891266, -1.110815, 0.0000, 0.0000, 0.0000);
  45. CreateObject(2193, 2044.325073, 261.030090, -1.110815, 0.0000, 0.0000, 0.0000);
  46. CreateObject(2182, 2044.251465, 265.843750, -1.110563, 0.0000, 0.0000, 0.0000);
  47. CreateObject(2181, 2040.987183, 266.773804, -1.110563, 0.0000, 0.0000, 0.0000);
  48. CreateObject(2207, 2036.854858, 254.356491, -1.112628, 0.0000, 0.0000, 142.6667);
  49. CreateObject(1714, 2034.747437, 253.100082, -1.109863, 0.0000, 0.0000, 141.8071);
  50. CreateObject(2737, 2036.071289, 252.356750, 0.866309, 0.0000, 0.0000, 179.5182);
  51. CreateObject(2608, 2038.938110, 267.486023, 0.996645, 0.0000, 0.0000, 0.0000);
  52. CreateObject(2604, 2038.611206, 267.040344, -0.311478, 0.0000, 0.0000, 0.0000);
  53. CreateObject(2576, 2033.704712, 266.705994, -1.095005, 0.0000, 0.0000, 0.0000);
  54. CreateObject(2200, 2033.991333, 263.553162, -1.109167, 0.0000, 0.0000, 88.5220);
  55. CreateObject(2199, 2034.026489, 261.241058, -1.111527, 0.0000, 0.0000, 87.6625);
  56. CreateObject(2191, 2044.941040, 263.009216, -1.110815, 0.0000, 0.0000, 179.5181);
  57. CreateObject(2164, 2039.727051, 252.323944, -1.111419, 0.0000, 0.0000, 180.3777);
  58. CreateObject(2007, 2034.447388, 257.894104, -1.108439, 0.0000, 0.0000, 94.5380);
  59. CreateObject(987, 2065.661865, 226.107651, -0.766953, 0.0000, 0.0000, 0.0000);
  60. CreateObject(987, 2054.454346, 225.972275, -0.766005, 0.0000, 0.0000, 0.0000);
  61. CreateObject(987, 2077.075928, 226.006500, -0.956544, 0.0000, 0.0000, 272.3374);
  62. CreateObject(987, 2077.387939, 219.311768, -0.949268, 0.0000, 0.0000, 272.3374);
  63. CreateObject(987, 2077.960938, 205.364334, -0.923791, 0.0000, 0.0000, 272.3374);
  64. CreateObject(987, 2077.879883, 207.331696, 2.894969, 0.0000, 0.0000, 271.4780);
  65. CreateObject(1499, 2051.496094, 247.332153, -0.096580, 0.0000, 0.0000, 0.0000);
  66. CreateObject(1499, 2043.505249, 248.716843, -0.096580, 0.0000, 0.0000, 90.2409);
  67. CreateObject(1499, 2066.251465, 247.452118, -0.090454, 0.0000, 0.0000, 181.3413);
  68. Door1 = CreateObject(2634, 2037.861938, 273.399597, -6.790209, 0.0000, 0.0000, 181.2371);
  69. Door2 = CreateObject(2634, 2071.608887, 229.182129, 1.328525, 0.0000, 0.0000, 0.0000);
  70. return 1;
  71. }
  72.  
  73. public OnGameModeExit()
  74. {
  75. return 1;
  76. }
  77.  
  78. public OnPlayerRequestClass(playerid, classid)
  79. {
  80. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  81. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  82. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  83. return 1;
  84. }
  85.  
  86. public OnPlayerRequestSpawn(playerid)
  87. {
  88. return 1;
  89. }
  90.  
  91. public OnPlayerConnect(playerid)
  92. {
  93. return 1;
  94. }
  95.  
  96. public OnPlayerDisconnect(playerid, reason)
  97. {
  98. return 1;
  99. }
  100.  
  101. public OnPlayerSpawn(playerid)
  102. {
  103. return 1;
  104. }
  105.  
  106. public OnPlayerDeath(playerid, killerid, reason)
  107. {
  108. return 1;
  109. }
  110.  
  111. public OnVehicleSpawn(vehicleid)
  112. {
  113. return 1;
  114. }
  115.  
  116. public OnVehicleDeath(vehicleid, killerid)
  117. {
  118. return 1;
  119. }
  120.  
  121. public OnPlayerText(playerid, text[])
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnPlayerPrivmsg(playerid, recieverid, text[])
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnPlayerCommandText(playerid, cmdtext[])
  132. {
  133. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  134. {
  135. // Do something here
  136. return 1;
  137. }
  138. return 0;
  139. }
  140.  
  141. public OnPlayerInfoChange(playerid)
  142. {
  143. return 1;
  144. }
  145.  
  146. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  147. {
  148. return 1;
  149. }
  150.  
  151. public OnPlayerExitVehicle(playerid, vehicleid)
  152. {
  153. return 1;
  154. }
  155.  
  156. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  157. {
  158. if (PRESSING(newkeys, KEY_ACTION))
  159. {
  160. if(PlayerToPoint(2.0,playerid,2037.7885,272.4348,-7.3889) || PlayerToPoint(2.0,playerid,2037.8192,274.6452,-7.5010))
  161. {
  162. MoveObject(Door1, 2039.837402, 273.399597, -6.790209,3);
  163. SetTimerEx("CloseGate", 2000, false, "i", playerid);
  164. }
  165. if(PlayerToPoint(2.0,playerid,2071.6594,227.9109,0.9116) || PlayerToPoint(2.0,playerid,2071.6550,230.5005,0.9159))
  166. {
  167. MoveObject(Door2, 2069.886719, 229.182007, 1.328525,3);
  168. SetTimerEx("CloseGate2", 2000, false, "i", playerid);
  169. }
  170. }
  171. if (PRESSING(newkeys, KEY_CROUCH))
  172. {
  173. SetPlayerPos(playerid, 2039.837402, 273.399597, -6.790209);
  174. SendClientMessage(playerid,0xFFFF00AA,".:: [BANK]: Welcome to the Bank!");
  175. }
  176. }
  177.  
  178. public OnPlayerStateChange(playerid, newstate, oldstate)
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnPlayerEnterCheckpoint(playerid)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnPlayerLeaveCheckpoint(playerid)
  189. {
  190. return 1;
  191. }
  192.  
  193. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  194. {
  195. new Float:oldposx, Float:oldposy, Float:oldposz;
  196. new Float:tempposx, Float:tempposy, Float:tempposz;
  197. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  198. tempposx = (oldposx -x);
  199. tempposy = (oldposy -y);
  200. tempposz = (oldposz -z);
  201. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  202. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  203. {
  204. return 1;
  205. }
  206. return 0;
  207. }
  208.  
  209. public OnPlayerEnterRaceCheckpoint(playerid)
  210. {
  211. return 1;
  212. }
  213.  
  214. public OnPlayerLeaveRaceCheckpoint(playerid)
  215. {
  216. return 1;
  217. }
  218.  
  219. public OnRconCommand(cmd[])
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnObjectMoved(objectid)
  225. {
  226. return 1;
  227. }
  228.  
  229. public OnPlayerObjectMoved(playerid, objectid)
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnPlayerPickUpPickup(playerid, pickupid)
  235. {
  236. return 1;
  237. }
  238.  
  239. public OnPlayerSelectedMenuRow(playerid, row)
  240. {
  241. return 1;
  242. }
  243.  
  244. public OnPlayerExitedMenu(playerid)
  245. {
  246. return 1;
  247. }
  248.  
  249. forward CloseGate(playerid);
  250. public CloseGate(playerid)
  251. {
  252. MoveObject(Door1, 2037.861938, 273.399597, -6.790209,3);
  253. return 1;
  254. }
  255. forward CloseGate2(playerid);
  256. public CloseGate2(playerid)
  257. {
  258. MoveObject(Door2, 2071.608887, 229.182129, 1.328525,3);
  259. return 1;
  260. }
  261.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement