Advertisement
BanhVo

Untitled

Jan 9th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new pddoor1, pddoor2, pddoor3;
  4.  
  5. forward doorclose1(playerid);
  6. forward doorclose2(playerid);
  7. forward doorclose3(playerid);
  8.  
  9.  
  10. public OnGameModeInit()
  11. {
  12. pddoor1 = CreateObject (19859, 587.841918, -3233.680908, 110.116477, 0.000000, 0.000000, 90.000000, 300.00);
  13. pddoor2 = CreateObject (19859, 579.981933, -3237.977783, 113.629692, 0.000000, 0.000000, 180.000000, 300.00);
  14. pddoor3 = CreateObject (19859, 579.9819, -3237.9858, 113.6297, 0.000000, 0.000000, 0.000000, 300.00);
  15. return 1;
  16. }
  17.  
  18. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
  19. {
  20. if(newkeys & 16)
  21. {
  22. if(IsPlayerInRangeOfPoint(playerid, 4.0, 588.5473,-3234.3591,110.1165))
  23. {
  24. if (IsPlayerAdmin (playerid))
  25. {
  26. MoveObject(pddoor1, 587.841918, -3233.680908, 110.116477,1.5);
  27. SetTimerEx("doorclose1", 5000, false, "i", playerid);
  28. }
  29. }
  30. if(IsPlayerInRangeOfPoint(playerid, 4.0, 580.5657, -3237.5479, 113.6297))
  31. {
  32. if (IsPlayerAdmin (playerid))
  33. {
  34. MoveObject(pddoor2, 579.981933, -3237.977783, 113.629692,1.5);
  35. SetTimerEx("doorclose2", 5000, false, "i", playerid);
  36. }
  37. }
  38. if(IsPlayerInRangeOfPoint(playerid, 4.0, 600.8785, -3239.9939, 110.0865))
  39. {
  40. if (IsPlayerAdmin (playerid))
  41. {
  42. MoveObject(pddoor3, 579.9819, -3237.9858, 113.6297,1.5);
  43. SetTimerEx("doorclose3", 5000, false, "i", playerid);
  44. }
  45. }
  46. }
  47. return 1;
  48. }
  49. public doorclose1(playerid)
  50. {
  51. MoveObject(pddoor1, 599.9600, -3239.4077, 110.0865,1.5);
  52. return 1;
  53. }
  54.  
  55. public doorclose2(playerid)
  56. {
  57. MoveObject(pddoor2, 587.8419, -3235.1840, 110.1165,1.5);
  58. return 1;
  59. }
  60.  
  61. public doorclose3(playerid)
  62. {
  63. MoveObject(pddoor3, 581.4840, -3237.9858, 113.6297,1.5);
  64. return 1;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement