Guest User

Untitled

a guest
Mar 30th, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.64 KB | None | 0 0
  1. if(strcmp(cmd, "/opendoor", true) == 0 || strcmp(cmd, "/od", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(IsACop(playerid) || IsAPrisonGuard(playerid) || PlayerInfo[playerid][pFLeader] == 11 || PlayerInfo[playerid][pFMember] == 11)
  6. {
  7. if(PlayerToPoint(2, playerid,239.649917,117.577560,1003.218688) && IsACop(playerid))
  8. {
  9. MoveObject(pdd1, 239.549917,119.577560,1003.218688,1); // V
  10. }
  11. else if(PlayerToPoint(2, playerid,253.191696,109.082427,1003.225708))
  12. {
  13. MoveObject(pdd2, 253.19169616699,106.88,1003.2257080078,2);
  14. }
  15. else if(PlayerToPoint(2, playerid,253.207733,125.242126,1003.218750))
  16. {
  17. MoveObject(pdd3, 253.207733,123.242126,1003.218750,2); //V
  18. }
  19. else if(!IsPlayerInAnyVehicle(playerid) && PlayerToPoint(2, playerid,1583.2721,-1637.9640,13.3785))
  20. {
  21. MoveObject(pdd8, 1582.5775146484, -1637.9163818359, 9.3, 2); //V
  22. }
  23. else if(PlayerToPoint(2, playerid,232.931304,109.093315,1010.208679) && IsACop(playerid))//d.chief
  24. {
  25. if(PlayerInfo[playerid][pRank] >= 10)
  26. {
  27. MoveObject(pdddc, 233.031304,107.093315,1010.208679,1);
  28. }
  29. else
  30. {
  31. SendClientMessage(playerid, COLOR_DARKRED, "Access Deny!");
  32. return 1;
  33. }
  34. }
  35. else if(PlayerToPoint(2, playerid,392.2387,-1109.1343,4500.6982) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  36. {
  37. if(PlayerInfo[playerid][pRank] >= 6)
  38. {
  39. MoveObject(spysgate1, 392.25534057617, -1109.1999511719, 4493.9418945313, 2);
  40. }
  41. else
  42. {
  43. SendClientMessage(playerid, COLOR_DARKRED, "Access Deny!");
  44. return 1;
  45. }
  46. }
  47. else if(PlayerToPoint(2, playerid,382.5016,-1109.7456,4500.6982) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  48. {
  49. if(PlayerInfo[playerid][pRank] >= 6)
  50. {
  51. MoveObject(spysgate2, 382.2333984375, -1109.21484375, 4493.9418945313, 2);
  52. }
  53. else
  54. {
  55. SendClientMessage(playerid, COLOR_DARKRED, "Access Deny!");
  56. return 1;
  57. }
  58. }
  59. else if(PlayerToPoint(2, playerid,385.4749,-1133.6451,4499.2998) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  60. {
  61. MoveObject(spysgate3, 384.95587158203, -1133.3823242188, 4493.4438476563, 2);
  62. }
  63. else if(PlayerToPoint(2, playerid,402.8811,-1145.5759,4498.1045) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  64. {
  65. MoveObject(spysgate4, 404.35098266602, -1146.4134521484, 4493.1909179688, 2);
  66. }
  67. else if(PlayerToPoint(2, playerid,399.6227,-1135.6549,4499.1841) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  68. {
  69. MoveObject(spysgate5, 400.3720703125, -1135.2624511719, 4493.5971679688, 2);
  70. }
  71. else if(PlayerToPoint(2, playerid,231.135330,119.553451,1010.218750) && IsACop(playerid))//chief
  72. {
  73. if(PlayerInfo[playerid][pRank] >= 11)
  74. {
  75. MoveObject(pddc, 229.135330,119.653451,1010.218750,1);
  76. }
  77. else
  78. {
  79. SendClientMessage(playerid, COLOR_DARKRED, "Access Deny!");
  80. return 1;
  81. }
  82. }
  83. else if(PlayerToPoint(2, playerid,275.642517,117.420158,1004.617187) && IsACop(playerid))
  84. {
  85. MoveObject(pdd4, 275.542517,119.420158,1004.617187,1);
  86. }
  87. else if(PlayerToPoint(2, playerid,265.835815,112.502014,1004.617187) && IsACop(playerid))
  88. {
  89. MoveObject(pdd5, 263.835815,112.302014,1004.617187,1);
  90. }
  91. else if(PlayerToPoint(2, playerid,265.989532,115.889060,1004.617187) && IsACop(playerid))
  92. {
  93. MoveObject(pdd6, 267.989532,115.999060,1004.617187,1);
  94. }
  95. else if(PlayerToPoint(2, playerid,239.628219,125.069351,1003.218750) && IsACop(playerid))
  96. {
  97. MoveObject(pdd7, 239.543219,127.069351,1003.218750,1);
  98. }
  99. else if(PlayerToPoint(2, playerid,1095.8867, 1528.6118, 5.9823))
  100. {
  101. MoveObject(prisond1, 1095.8867, 1528.6118, 2.9823,1.5);
  102. }
  103. else if(PlayerToPoint(2, playerid,1095.9008, 1513.7515, 5.9805))
  104. {
  105. MoveObject(prisond2, 1095.9008, 1513.7515, 2.9805,1.5);
  106. }
  107. else if(PlayerToPoint(2, playerid,1102.1108, 1505.8970, 6.0055))
  108. {
  109. MoveObject(prisond3, 1102.1108, 1505.8970, 3.0055,1.5);
  110. }
  111. else
  112. {
  113. SendClientMessage(playerid, COLOR_GREY, "you are not near any door!");
  114. return 1;
  115. }
  116. //GetPlayerName(playerid, sendername, sizeof(sendername));
  117. format(string, sizeof(string), "* %s types the access code **** while covering with his free hand.", sendername);
  118. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  119. }
  120. else {SendClientMessage(playerid, COLOR_GREY, " You are not a Cop!");}
  121. }
  122. return 1;
  123. }
  124. if(strcmp(cmd, "/closedoor", true) == 0 || strcmp(cmd, "/cd", true) ==0)
  125. {
  126. if(IsPlayerConnected(playerid))
  127. {
  128. if(IsACop(playerid) || IsAPrisonGuard(playerid) || PlayerInfo[playerid][pFLeader] == 11 || PlayerInfo[playerid][pFMember] == 11)
  129. {
  130. if(PlayerToPoint(2, playerid,239.649917,117.577560,1003.218688))
  131. {
  132. MoveObject(pdd1, 239.649917,117.577560,1003.218688,1);
  133. }
  134. else if(PlayerToPoint(2, playerid,253.191696,109.082427,1003.225708))
  135. {
  136. MoveObject(pdd2, 253.191696,109.082427,1003.225708,1);
  137. }
  138. else if(PlayerToPoint(2, playerid,253.207733,125.242126,1003.218750))
  139. {
  140. MoveObject(pdd3, 253.207733,125.242126,1003.218750,1);
  141. }
  142. else if(PlayerToPoint(2, playerid,1583.2721,-1637.9640,13.3785))
  143. {
  144. MoveObject(pdd8, 1582.5775146484, -1637.9163818359, 12.458126068115,2);
  145. }
  146. else if(PlayerToPoint(2, playerid,232.931304,109.093315,1010.208679))//d.chief
  147. {
  148. MoveObject(pdddc, 232.931304,109.093315,1010.208679,1);
  149. }
  150. else if(PlayerToPoint(2, playerid,231.135330,119.553451,1010.218750))//chief
  151. {
  152. MoveObject(pddc, 231.135330,119.553451,1010.218750,1);
  153. }
  154. else if(PlayerToPoint(2, playerid,392.2387,-1109.1343,4500.6982) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  155. {
  156. MoveObject(spysgate1, 392.25534057617, -1109.1999511719, 4500.9418945313, 2);
  157. }
  158. else if(PlayerToPoint(2, playerid,382.5016,-1109.7456,4500.6982) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  159. {
  160. MoveObject(spysgate2, 382.2333984375, -1109.21484375, 4500.9418945313, 2);
  161. }
  162. else if(PlayerToPoint(2, playerid,385.4749,-1133.6451,4499.2998) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  163. {
  164. MoveObject(spysgate3, 384.95587158203, -1133.3823242188, 4499.4438476563, 2);
  165. }
  166. else if(PlayerToPoint(2, playerid,402.8811,-1145.5759,4498.1045) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  167. {
  168. MoveObject(spysgate4, 404.35098266602, -1146.4134521484, 4498.1909179688, 2);
  169. }
  170. else if(PlayerToPoint(2, playerid,399.6227,-1135.6549,4499.1841) && PlayerInfo[playerid][pFMember] == 11 || PlayerInfo[playerid][pFLeader] == 11)
  171. {
  172. MoveObject(spysgate5, 400.3720703125, -1135.2624511719, 4499.5971679688, 2);
  173. }
  174. else if(PlayerToPoint(2, playerid,275.642517,117.420158,1004.617187))
  175. {
  176. MoveObject(pdd4, 275.642517,117.420158,1004.617187,1);
  177. }
  178. else if(PlayerToPoint(2, playerid,265.835815,112.502014,1004.617187))
  179. {
  180. MoveObject(pdd5, 265.835815,112.502014,1004.617187,1);
  181. }
  182. else if(PlayerToPoint(2, playerid,265.989532,115.889060,1004.617187))
  183. {
  184. MoveObject(pdd6, 265.989532,115.889060,1004.617187,1);
  185. }
  186. else if(PlayerToPoint(2, playerid,239.628219,125.069351,1003.218750))
  187. {
  188. MoveObject(pdd7, 239.628219,125.069351,1003.218750,1);
  189. }
  190. else if(PlayerToPoint(2, playerid,1095.8867, 1528.6118, 5.9823))
  191. {
  192. MoveObject(prisond1, 1095.8867, 1528.6118, 5.9823,1.5);
  193. }
  194. else if(PlayerToPoint(2, playerid,1095.9008, 1513.7515, 5.9805))
  195. {
  196. MoveObject(prisond2, 1095.9008, 1513.7515, 5.9805,1.5);
  197. }
  198. else if(PlayerToPoint(2, playerid,1102.1108, 1505.8970, 6.0055))
  199. {
  200. MoveObject(prisond3, 1102.1108, 1505.8970, 6.0055,1.5);
  201. }
  202. else
  203. {
  204. SendClientMessage(playerid, COLOR_GREY, "you are not near any door!");
  205. return 1;
  206. }
  207. //GetPlayerName(playerid, sendername, sizeof(sendername));
  208. format(string, sizeof(string), "* %s closes the door", sendername);
  209. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  210. }
  211. else {SendClientMessage(playerid, COLOR_GREY, " You are not a Cop!");}
  212. }
  213. return 1;
  214. }
Advertisement
Add Comment
Please, Sign In to add comment