Advertisement
BanhVo

Untitled

Nov 17th, 2017
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3. #include <a_samp>
  4. #include <Streamer>
  5.  
  6. new Gate1, Gate2;
  7.  
  8. public OnGameModeInit()
  9. {
  10. Gate1 = CreateDynamicObject(19859, 1294.623168, -1862.670776, 13.796877, 0.000000, 0.000000, 0.000000)
  11. SetTimer("Close", 1000, 1);
  12. Gate2 = CreateDynamicObject(19859, 1297.616333, -1862.673706, 13.796883, 0.000000, 0.000000, 180.000000)
  13. SetTimer("Close", 1000, 1);
  14.  
  15. forward Gate1();
  16. public Gate1()
  17. {
  18. new open;
  19. for(new i=GetMaxPlayers(); i > -1; i--)
  20. {
  21. if(IsPlayerInRangeOfPoint(i,2.0,1296.8699,-1862.1085,13.7969))
  22. {
  23. open = 1;
  24. MoveDynamicObject(Gate1,1294.0632, -1862.6708, 13.7969,1.0,0.0000, 0.0000, 0.0000);
  25. break;
  26. }
  27. }
  28. if (! open)
  29. MoveDynamicObject(Gate1, 1294.623168,-1862.670776,13.796877,1.0,0.000000,0.000000,0.000000);
  30. open = 0;
  31. }
  32. forward Gate2();
  33. public Gate2()
  34. {
  35. new open;
  36. for(new i=GetMaxPlayers(); i > -1; i--)
  37. {
  38. if(IsPlayerInRangeOfPoint(i,2.0,1296.8699,-1862.1085,13.7969))
  39. {
  40. open = 1;
  41. MoveDynamicObject(Gate2,1298.2083, -1862.6737, 13.7969,1.0,0.000000,0.000000,180.000000);
  42. break;
  43. }
  44. }
  45. if (! open)
  46. MoveDynamicObject(Gate2, 1297.616333, -1862.673706, 13.796883,1.0,0.000000,0.000000,180.000000);
  47. open = 0;
  48. }
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement