Advertisement
Guest User

Untitled

a guest
Mar 20th, 2010
2,258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define COLOR_DARKGOLD 0x808000AA
  4. #define COLOR_RED 0xFF0000AA
  5. #define COLOR_YELLOW 0xFFFF00AA
  6.  
  7.  
  8. #define HotPoint1 2009.0814,-1728.1830,13.4533
  9. #define HotPoint2 2009.0692,-1640.7626,13.4465
  10. #define HotPoint3 2075.3311,-1643.5902,13.4073
  11. #define HotPoint4 2138.3816,-1616.8345,13.4692
  12. #define HotPoint5 2172.3430,-1675.6588,14.9697
  13. #define HotPoint6 2308.7888,-1665.8096,14.3982
  14. #define HotPoint7 2503.9426,-1658.8201,13.3568
  15. #define HotPoint8 2376.7712,-1907.2572,13.2880
  16. #define HotPoint9 2238.4990,-1902.2578,13.4472
  17. #define HotPoint10 1131.9427,-2037.3005,68.9129
  18. #define HotPoint11 1623.0204,-1858.5880,13.4557
  19. #define Refillpoint 1618.9200,-1892.1852,13.4540
  20.  
  21. new hotdog = 0;
  22. new hotinfo;
  23.  
  24. public OnFilterScriptInit()
  25. {
  26. AddStaticVehicle(588,1647.9491,-1890.8440,13.4599,1.1164,1,1); // dog1
  27. AddStaticVehicle(588,1653.8723,-1886.4052,13.4567,359.2593,1,1); // dog2
  28. AddStaticVehicle(588,1658.9525,-1886.4708,13.4531,359.2592,1,1); // dog3
  29. AddStaticVehicle(588,1664.5953,-1886.5439,13.4496,359.2583,1,1); // dog4
  30.  
  31. hotinfo = CreatePickup(1239,1,1671.2996,-1881.1387,13.5448,-1);
  32. }
  33.  
  34. public OnPlayerCommandText(playerid, cmdtext[])
  35. {
  36. if (strcmp("/hotdog", cmdtext, true, 10) == 0)
  37. {
  38. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
  39. {
  40. hotdog = 1;
  41. SetPlayerCheckpoint(playerid, HotPoint1, 3.0);
  42. GameTextForPlayer(playerid, "~g~You started the job, good luck!", 3000, 3);
  43. new name[MAX_PLAYER_NAME], string[48];
  44. GetPlayerName(playerid, name, sizeof(name));
  45. format(string, sizeof(string), "%s is now a HotDog seller.", name );
  46. SendClientMessageToAll(COLOR_RED, string);
  47. return 1;
  48. }
  49. SendClientMessage(playerid, COLOR_RED,"You have to be in a hotdog van to start the job");
  50. }
  51. if (strcmp("/hotdoginfo", cmdtext, true, 10) == 0)
  52. {
  53. SendClientMessage(playerid, COLOR_YELLOW, "You need to bring the hotdogs to people's house.");
  54. SendClientMessage(playerid, COLOR_YELLOW, "There they will reward you for your help.");
  55. SendClientMessage(playerid, COLOR_YELLOW, "If you enter a hotdog van, type /hotdog and red markers will appear.");
  56. SendClientMessage(playerid, COLOR_YELLOW, "Just drive to the markers and get you're reward!");
  57. return 1;
  58. }
  59. return 0;
  60. }
  61. public OnPlayerEnterCheckpoint(playerid)
  62. {
  63. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
  64. {
  65. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint1))
  66. {
  67. SetPlayerCheckpoint(playerid, HotPoint2, 7.0);
  68. GameTextForPlayer(playerid, "~g~1 House done!", 3000, 3);
  69. }
  70. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint2))
  71. {
  72. SetPlayerCheckpoint(playerid, HotPoint3, 7.0);
  73. GameTextForPlayer(playerid, "~g~2 Houses done!", 3000, 3);
  74. }
  75. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint3))
  76. {
  77. SetPlayerCheckpoint(playerid, HotPoint4, 7.0);
  78. GameTextForPlayer(playerid, "~g~3 Houses done!", 3000, 3);
  79. }
  80. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint4))
  81. {
  82. SetPlayerCheckpoint(playerid, HotPoint5, 7.0);
  83. GameTextForPlayer(playerid, "~g~4 Houses done!", 3000, 3);
  84. }
  85. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint5))
  86. {
  87. SetPlayerCheckpoint(playerid, Refillpoint, 7.0);
  88. GameTextForPlayer(playerid, "~g~5 Houses done, refill your hotdogs at the marker!", 3000, 3);
  89. }
  90. if (IsPlayerInRangeOfPoint(playerid, 7.0,Refillpoint))
  91. {
  92. SetPlayerCheckpoint(playerid, HotPoint6, 7.0);
  93. GameTextForPlayer(playerid, "~g~Hotdogs refilled!", 3000, 3);
  94. }
  95. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint6))
  96. {
  97. SetPlayerCheckpoint(playerid, HotPoint7, 7.0);
  98. GameTextForPlayer(playerid, "~g~6 Houses done!", 3000, 3);
  99. }
  100. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint7))
  101. {
  102. SetPlayerCheckpoint(playerid, HotPoint8, 7.0);
  103. GameTextForPlayer(playerid, "~g~7 Houses done!", 3000, 3);
  104. }
  105. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint8))
  106. {
  107. SetPlayerCheckpoint(playerid, HotPoint9, 7.0);
  108. GameTextForPlayer(playerid, "~g~8 Houses done!", 3000, 3);
  109. }
  110. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint9))
  111. {
  112. SetPlayerCheckpoint(playerid, HotPoint10, 7.0);
  113. GameTextForPlayer(playerid, "~g~9 Houses done!", 3000, 3);
  114. }
  115. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint10))
  116. {
  117. SetPlayerCheckpoint(playerid, HotPoint11, 7.0);
  118. GameTextForPlayer(playerid, "~g~10 Houses done, get back to the startpoint!", 3000, 3);
  119. }
  120. if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint11))
  121. {
  122. GivePlayerMoney(playerid, 800);
  123. GameTextForPlayer(playerid, "~g~You collected a total of $800,-!", 3000, 3);
  124. new veh;
  125. veh = GetPlayerVehicleID(playerid);
  126. SetVehicleToRespawn(veh);
  127. DisablePlayerCheckpoint(playerid);
  128. hotdog = 0;
  129. }
  130. }
  131. }
  132.  
  133. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  134. {
  135. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
  136. {
  137. SendClientMessage(playerid, COLOR_RED, "You can start the hotdog-mission with /hotdog");
  138. }
  139. return 0;
  140. }
  141. public OnPlayerExitVehicle(playerid, vehicleid)
  142. {
  143. if((hotdog) == 1)
  144. {
  145. hotdog = 0;
  146. SendClientMessage(playerid, COLOR_RED, "You left your hotdog van behind, get in again if you want to continue your job.");
  147.  
  148. }else if((hotdog) == 0){
  149.  
  150. //Nothing
  151. }
  152. }
  153. public OnPlayerDeath(playerid, killerid, reason)
  154. {
  155. DisablePlayerCheckpoint(playerid);
  156. hotdog = 0;
  157. return 1;
  158. }
  159.  
  160. public OnPlayerPickUpPickup(playerid, pickupid)
  161. {
  162. if(pickupid == hotinfo)
  163. {
  164. GameTextForPlayer(playerid, "~g~Welcome at the Hot dog job, use /hotdoginfo to know more", 3000, 3);
  165. }
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement