Guest User

Ciber007

a guest
Dec 13th, 2008
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define FILTERSCRIPT
  4. #if defined FILTERSCRIPT
  5. #define COLOR_LIGHTBLUE 0x33CCFFAA
  6. #define COLOR_RED 0xAA3333AA
  7. new Park;
  8. new Parkhilfe;
  9. #pragma tabsize 0
  10. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  11. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  12. {
  13. if(IsPlayerConnected(playerid))
  14. {
  15. new Float:oldposx, Float:oldposy, Float:oldposz;
  16. new Float:tempposx, Float:tempposy, Float:tempposz;
  17. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  18. tempposx = (oldposx -x);
  19. tempposy = (oldposy -y);
  20. tempposz = (oldposz -z);
  21. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  22. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  23. {
  24. return 1;
  25. }
  26. }
  27. return 0;
  28. }
  29. public OnFilterScriptInit()
  30. {
  31. CreateObject(971, 1181.533569, -897.506592, 47.013580, 90.2409, 4.2972, 3.4377);// BSN Park
  32. CreateObject(971, 1183.869263, -911.674988, 46.826981, 90.2409, 4.2972, 4.2972);//Bsn Park
  33. CreateObject(4639, 1183.000854, -910.254700, 43.990814, 0.0000, 0.0000, 186.0934);// BSN Park
  34. Park = CreateObject(971, 1182.252441, -904.438293, 42.308212, 90.2409, 4.2972, 3.4377);
  35. Parkhilfe = CreatePickup(1239,1,1179.9429,-910.6104,43.2481);
  36. print("\n--------------------------------------");
  37. print(" BSN Park Script von Ciber007");
  38. print("--------------------------------------\n");
  39. return 1;
  40. }
  41.  
  42.  
  43. #endif
  44.  
  45.  
  46. public OnPlayerCommandText(playerid, cmdtext[])
  47. {
  48. if (strcmp(cmdtext, "/Parkhilfe", true) == 0)
  49. {
  50. if (PlayerToPoint(5.0, playerid, 1179.9429,-910.6104,43.2481))
  51. {
  52. {
  53. SendClientMessage(playerid, COLOR_LIGHTBLUE,"------------------------BSN Parkplatz-------------------------");
  54. SendClientMessage(playerid, COLOR_LIGHTBLUE," Benutze /Hoch um den Aufzug Hochzufahren. (Kostet 100$) ");
  55. SendClientMessage(playerid, COLOR_LIGHTBLUE," Benutze /Runter um den Aufzug Runterzufahren. ");
  56. SendClientMessage(playerid, COLOR_LIGHTBLUE,"Information:Sie m�ssen am Parkplatz sein um mit ihm zu fahren.");
  57. SendClientMessage(playerid, COLOR_LIGHTBLUE,"--------------------------------------------------------------");
  58. }
  59. return 1;
  60. }
  61. else SendClientMessage(playerid, COLOR_RED,"Sie sind nicht am BSN Parkplatz!!!");
  62.  
  63. }
  64. if (strcmp(cmdtext, "/Hoch", true) == 0)
  65. {
  66. if (PlayerToPoint(5.0, playerid,1181.9728,-904.4827,43.4915))
  67. {
  68. {
  69. SendClientMessage(playerid, COLOR_LIGHTBLUE,"Vielen Dank, dass sie auf dem Dach parken.");
  70. GivePlayerMoney(playerid,-100);
  71. MoveObject(Park,1182.568237, -904.536377, 46.980690, 3.5);
  72. }
  73. return 1;
  74. }
  75. else SendClientMessage(playerid, COLOR_RED,"Sie sind nicht am BSN Parkplatz!!!");
  76.  
  77. }
  78. if (strcmp(cmdtext, "/Runter", true) == 0)
  79. {
  80. if (PlayerToPoint(5.0, playerid,1181.9728,-904.4827,48.1644))
  81. {
  82. {
  83. SendClientMessage(playerid, COLOR_LIGHTBLUE,"Vielen Dank, dass sie auf dem Dach geparkt haben.");
  84. MoveObject(Park,1182.252441, -904.438293, 42.308212, 3.5);
  85. }
  86. return 1;
  87. }
  88. else SendClientMessage(playerid, COLOR_RED,"Sie sind nicht am BSN Parkplatz!!!");
  89. }
  90. return 0;
  91. }
  92. public OnPlayerPickUpPickup(playerid, pickupid)
  93. {
  94. if(pickupid == Parkhilfe)
  95. {
  96. SendClientMessage(playerid,COLOR_LIGHTBLUE,"Schreibe /Parkhilfe um die Parkhilfe zu lesen.");
  97. }
  98.  
  99. return 1;
  100. }
  101.  
  102.  
Advertisement
Add Comment
Please, Sign In to add comment