Advertisement
Guest User

Driveinsystem v0.1 by Tochnas

a guest
Oct 25th, 2010
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. /*
  2. ********************************
  3. ********************************
  4. ** Driveinsystem v0.1 **
  5. ** by Tochnas **
  6. ** DEUTSCH **
  7. ** **
  8. ** Letztes Update **
  9. ** 24.10.2010 **
  10. ********************************
  11. ********************************
  12. */
  13.  
  14. #include <a_samp>
  15.  
  16. #if defined FILTERSCRIPT
  17.  
  18. forward AtDrivein(playerid);
  19. forward Drivein(playerid);
  20. forward CustomPickups();
  21.  
  22. new Pickup1;
  23.  
  24. public OnFilterScriptInit()
  25. {
  26. print("\n--------------------------------------");
  27. print(" Driveinsystem by Tochnas wird geladen.");
  28. print(" Driveinsystem by Tochnas wurde erfolgreich geladen.");
  29. print("--------------------------------------\n");
  30.  
  31. AddStaticPickup(1318, 23, 1214.6777 ,-904.5129 ,42.9203); //Burger Shot Nord (LS)
  32. return 1;
  33. }
  34.  
  35. public OnFilterScriptExit()
  36. {
  37. print("\n--------------------------------------");
  38. print(" Driveinsystem by Tochnas wird entladen.");
  39. print(" Driveinsystem by Tochnas wurde erfolgreich entladen.");
  40. print("--------------------------------------\n");
  41.  
  42. DestroyPickup(Pickup1);
  43. return 1;
  44. }
  45.  
  46. public OnPlayerCommandText(playerid, cmdtext[])
  47. {
  48. if(strcmp(cmdtext, "/drivein", true) == 0)
  49. {
  50. if(IsPlayerConnected(playerid))
  51. {
  52. if(!IsPlayerInAnyVehicle(playerid))
  53. {
  54. SendClientMessage(playerid, 0xB4B4B4FF, "Du musst in einem Fahrzeug sein!");
  55. return 1;
  56. }
  57. if(AtDrivein(playerid))
  58. {
  59. SendClientMessage(playerid, 0x0FFF00FF,"Willkommen beim Driveinschalter");
  60. SendClientMessage(playerid, 0x0A00FFFF,"___________________________________");
  61. SendClientMessage(playerid, 0xFEFEFEFF,"Bitte warten sie bis ihr essen zubereitet ist...");
  62. SetTimerEx("Drivein",7000,0,"i",playerid);
  63. TogglePlayerControllable(playerid, 0);
  64. }
  65. else
  66. {
  67. SendClientMessage(playerid, 0xB4B4B4FF, "Du bist nicht beim Driveinschalter");
  68. return 1;
  69. }
  70. }
  71. return 1;
  72. }
  73.  
  74. public CustomPickups()
  75. {
  76. if(AtDrivein(playerid))
  77. {
  78. GameTextForPlayer(playerid, "~w~Tippe ~n~~g~/drivein~w~~n~ um dir was beim Drive-in Schalter zu bestellen.", 5000, 3);
  79. }
  80. return 1;
  81. }
  82.  
  83. public Drivein(playerid)
  84. {
  85. SetPlayerHealth(playerid,100.0);
  86. SendClientMessage(playerid, 0xFFFA00FF," ");
  87. SendClientMessage(playerid, 0xFFFA00FF," ");
  88. SendClientMessage(playerid, 0xFFFA00FF," ");
  89. SendClientMessage(playerid, 0xFFFA00FF," ");
  90. SendClientMessage(playerid, 0xFFFA00FF," ");
  91. SendClientMessage(playerid, 0xFFFA00FF,"Ihr Essen ist fertig, Guten Appetit.");
  92. TogglePlayerControllable(playerid, 1);
  93. }
  94.  
  95. stock AtDrivein(playerid)
  96. { //Burger Shot Nord (LS)
  97. if(IsPlayerInRangeOfPoint(2.0, playerid, 1214.6777 ,-904.5129 ,42.9203))
  98. {
  99. return 1;
  100. }
  101. return 0;
  102. }
  103. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement