Advertisement
tom1412

LSPD Gate System

Oct 12th, 2011
2,302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.50 KB | None | 0 0
  1. // LSPD Gate Mapped by 12kelvin12 and scripted by Tom.1412
  2. // Don't remove credits or claim it as yours.
  3. #include <a_samp>
  4. #define FILTERSCRIPT
  5. #define Message 0xFFFFFFAA
  6. #if defined FILTERSCRIPT
  7. #endif
  8. new lspdgate1;
  9. new lspdgate2;
  10. new lspdgate3;
  11. new lspdgate4;
  12. forward GateClose0(playerid);
  13. forward GateClose02(playerid);
  14. forward GateClose03(playerid);
  15. forward PDEXIT(playerid);
  16. forward PDEXIT2(playerid);
  17. forward PDEXIT3(playerid);
  18. public OnFilterScriptInit()
  19. {
  20. print("\n--------------------------------------");
  21. print(" LSPD Gate Mapped by 12kelvin12 and scripted by Tom.1412 ");
  22. print("--------------------------------------\n");
  23. lspdgate1 = CreateObject(988, 1539.6418457031, -1630.5640869141, 12, 0, 0, 270);
  24. lspdgate2 = CreateObject(988, 1539.6505126953, -1625.1252441406, 12, 0, 0, 270);
  25. lspdgate3 = CreateObject(988, 1549.2589111328, -1630.8956298828, 12, 0, 0, 270);
  26. lspdgate4 = CreateObject(988, 1549.2487792969, -1625.4670410156, 12, 0, 0, 270);
  27. CreateObject(997, 1534.5986328125, -1681.638671875, 12.546875, 0, 0, 0);
  28. CreateObject(997, 1534.5634765625, -1663.716796875, 12.546875, 0, 0, 0);
  29. CreateObject(996, 1534.6552734375, -1662.9423828125, 13.295630455017, 0, 0, 90);
  30. CreateObject(996, 1534.583984375, -1654.796875, 13.295630455017, 0, 0, 90);
  31. CreateObject(996, 1534.66796875, -1646.6513671875, 13.295630455017, 0, 0, 90);
  32. CreateObject(996, 1534.5634765625, -1682.2041015625, 13.295630455017, 0, 0, 269.99450683594);
  33. CreateObject(996, 1534.5635986328, -1690.2080078125, 13.295630455017, 0, 0, 269.99450683594);
  34. CreateObject(996, 1534.634765625, -1698.2705078125, 13.295630455017, 0, 0, 269.98901367188);
  35. CreateObject(1361, 1538.1005859375, -1673.6728515625, 13.290218353271, 0, 0, 0);
  36. CreateObject(1361, 1538.0458984375, -1667.2744140625, 13.290218353271, 0, 0, 0);
  37. CreateObject(1361, 1538.1151123047, -1679.5211181641, 13.290218353271, 0, 0, 0);
  38. CreateObject(987, 1539.638671875, -1605.8525390625, 12.451058387756, 0, 0, 269.91760253906);
  39. CreateObject(987, 1539.6668701172, -1602.3726806641, 12.451058387756, 0, 0, 269.91760253906);
  40. CreateObject(987, 1551.6217041016, -1602.3498535156, 12.451058387756, 0, 0, 180.62121582031);
  41. CreateObject(987, 1563.5257568359, -1602.2956542969, 12.451058387756, 0, 0, 180.62072753906);
  42. CreateObject(987, 1575.5502929688, -1602.3790283203, 12.451058387756, 0, 0, 179.62072753906);
  43. CreateObject(987, 1587.4641113281, -1602.3509521484, 12.451058387756, 0, 0, 180.09423828125);
  44. CreateObject(987, 1599.4165039063, -1602.3077392578, 12.451058387756, 0, 0, 180.34069824219);
  45. CreateObject(987, 1608.0374755859, -1602.3475341797, 12.451058387756, 0, 0, 180.09069824219);
  46. CreateObject(987, 1607.9322509766, -1614.2145996094, 12.451058387756, 0, 0, 89.762390136719);
  47. CreateObject(987, 1607.9489746094, -1626.1324462891, 12.451058387756, 0, 0, 89.75830078125);
  48. CreateObject(987, 1607.9357910156, -1638.0140380859, 12.451058387756, 0, 0, 89.75830078125);
  49. CreateObject(987, 1596.0131835938, -1638.84375, 12.451058387756, 0, 0, 4.1143798828125);
  50. CreateObject(970, 1551.5568847656, -1617.6177978516, 13.098356246948, 0, 0, 0);
  51. CreateObject(970, 1559.8994140625, -1617.6291503906, 13.098356246948, 0, 0, 0);
  52. CreateObject(970, 1564.0150146484, -1617.6455078125, 13.098356246948, 0, 0, 0);
  53. CreateObject(970, 1568.0375976563, -1617.6365966797, 13.098356246948, 0, 0, 0);
  54. CreateObject(970, 1572.1741943359, -1617.6512451172, 13.098356246948, 0, 0, 0);
  55. CreateObject(970, 1575.6446533203, -1617.6606445313, 13.098356246948, 0, 0, 0);
  56. CreateObject(3934, 1565.6787109375, -1645.189453125, 27.402114868164, 0, 0, 359.21997070313);
  57. CreateObject(3881, 1541.732421875, -1634.6865234375, 14.214325904846, 0, 0, 0);
  58. CreateObject(970, 1555.736328125, -1617.626953125, 13.098356246948, 0, 0, 0);
  59. CreateObject(1269, 1537.865234375, -1670.3577880859, 13.268968582153, 0, 0, 90.85302734375);
  60. CreateObject(1269, 1538.1125488281, -1677.0135498047, 13.364785194397, 0, 0, 90.851440429688);
  61. CreateObject(3881, 1541.7333984375, -1621.7998046875, 14.214325904846, 0, 0, 0);
  62. CreateObject(3881, 1546.7053222656, -1634.7111816406, 14.214325904846, 0, 0, 0);
  63. CreateObject(3881, 1546.7021484375, -1621.802734375, 14.214325904846, 0, 0, 0);
  64. CreateObject(8673, 1539.5, -1627.1667480469, 17.60000038147, 0, 0, 90);
  65. CreateObject(8673, 1549.8707275391, -1638.3000488281, 17.60000038147, 0, 0, 356);
  66. CreateObject(8673, 1549.4123535156, -1627.5999755859, 17.60000038147, 0, 0, 90);
  67. CreateObject(8572, 1542.63671875, -1616.7047119141, 14.607976913452, 0, 0, 180);
  68. return 1;
  69. }
  70.  
  71. public GateClose0(playerid)
  72. {
  73. MoveObject(lspdgate1, 1539.6418457031, -1630.5640869141, 12, 2);
  74. MoveObject(lspdgate2, 1539.6505126953, -1625.1252441406, 12, 2);
  75. SetTimer("GateClose02", 3400, 0);
  76. return 1;
  77. }
  78.  
  79. public GateClose02(playerid)
  80. {
  81. MoveObject(lspdgate3, 1549.2487792969,-1634.4000244141,12.3828125, 2);
  82. MoveObject(lspdgate4, 1549.2487792969,-1621,12.3828125, 2);
  83. SetTimer("GateClose03", 3400, 0);
  84. return 1;
  85. }
  86.  
  87. public GateClose03(playerid)
  88. {
  89. MoveObject(lspdgate3,1549.2487792969, -1630.8956298828, 12, 2);
  90. MoveObject(lspdgate4,1549.2487792969, -1625.4670410156, 12, 2);
  91. return 1;
  92. }
  93.  
  94. public PDEXIT(playerid)
  95. {
  96. MoveObject(lspdgate3,1549.2487792969, -1630.8956298828, 12, 2);
  97. MoveObject(lspdgate4,1549.2487792969, -1625.4670410156, 12, 2);
  98.  
  99. SetTimerEx("PDEXIT2",3400,0,"i",playerid);
  100. return 1;
  101. }
  102.  
  103. public PDEXIT2(playerid)
  104. {
  105. MoveObject(lspdgate1, 1539.6505126953, -1634.3499755859, 12, 2);
  106. MoveObject(lspdgate2, 1539.6505126953, -1621, 12, 2);
  107. SetTimer("PDEXIT3", 3400, 0);
  108. return 1;
  109. }
  110.  
  111. public PDEXIT3()
  112. {
  113. MoveObject(lspdgate1, 1539.6418457031, -1630.5640869141, 12, 2);
  114. MoveObject(lspdgate2, 1539.6505126953, -1625.1252441406, 12, 2);
  115. return 1;
  116. }
  117.  
  118. public OnPlayerCommandText(playerid, cmdtext[])
  119. {
  120. if(!strcmp(cmdtext, "/gateopen", true))
  121. {
  122. if(GetPlayerSkin(playerid) == 265 || 280 || 281 || 282 || 283 || 284 || 288)
  123. {
  124. if (IsPlayerInRangeOfPoint(playerid,15,1533.4419,-1627.7628,13.4876))
  125. {
  126. MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
  127. MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
  128. SetTimer("GateClose0", 3400, 0);
  129. }
  130. else if (IsPlayerInRangeOfPoint(playerid,15,1553.3512,-1628.0248,13.4897))
  131. {
  132. MoveObject(lspdgate3, 1549.2487792969,-1634.4000244141,12, 2);
  133. MoveObject(lspdgate4, 1549.2487792969,-1621,12, 2);
  134. SetTimer("PDEXIT", 3400, 0);
  135. }
  136. }
  137. else SendClientMessage(playerid, Message,"You are not a Police Officer");
  138. }
  139. return 1;
  140. }
  141.  
  142.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement