Advertisement
Guest User

hoernzon

a guest
Jul 23rd, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 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. new PizzaJob[256];
  8.  
  9. public OnFilterScriptInit()
  10. {
  11.  
  12. AddStaticVehicle(457,2122.1677,-1784.2250,12.9837,180.4585,0,0); // Pizza 1
  13. AddStaticVehicle(457,2121.9895,-1784.7623,12.9867,181.5936,0,0); // Pizza 1
  14. AddStaticVehicle(457,2118.8469,-1784.5692,12.9880,181.5090,0,0); // Pizza 2
  15. AddStaticVehicle(457,2115.7837,-1784.6464,12.9860,181.6605,0,0); // Pizza 3
  16.  
  17. }
  18. public OnPlayerCommandText(playerid, cmdtext[])
  19. {
  20. if (strcmp("/pizza", cmdtext, true, 10) == 0)
  21. {
  22. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 457)
  23. {
  24. PizzaJob[playerid] = 1;
  25. new name[MAX_PLAYER_NAME], string[48];
  26. GetPlayerName(playerid, name, sizeof(name));
  27. format(string, sizeof(string), "* %s is now a Pizzaboy.", name );
  28. SendClientMessageToAll(COLOR_YELLOW, string);
  29. SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
  30. SendClientMessage(playerid,COLOR_YELLOW,"* Follow the checkpoints and you'll recieve money!");
  31. return 1;
  32. }
  33. SendClientMessage(playerid, COLOR_RED,"You have to be on a golf car to start the job!");
  34. }
  35. return 0;
  36. }
  37. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  38. {
  39. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 457)
  40. {
  41. SendClientMessage(playerid, COLOR_RED, "* You can start the pizza courier by using /pizza");
  42. }
  43. return 0;
  44. }
  45. public OnPlayerEnterCheckpoint(playerid)
  46. {
  47. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 457)
  48. {
  49. if(PizzaJob[playerid] == 1){
  50. PizzaJob[playerid] = 2;
  51. SetPlayerCheckpoint(playerid,2012.4771,-1640.1229,13.1431,10);
  52. SendClientMessage(playerid,COLOR_YELLOW,"* Deliver those pizzas, and you'll be payed!");
  53. return 1;
  54. }
  55. if(PizzaJob[playerid] == 2){
  56. PizzaJob[playerid] = 3;
  57. SetPlayerCheckpoint(playerid,2387.0063,-1667.1498,13.1249,10);
  58. return 1;
  59. }
  60. if(PizzaJob[playerid] == 3){
  61. PizzaJob[playerid] = 4;
  62. SetPlayerCheckpoint(playerid,2414.9255,-1649.6678,13.1305,10);
  63. return 1;
  64. }
  65. if(PizzaJob[playerid] == 4){
  66. PizzaJob[playerid] = 5;
  67. SetPlayerCheckpoint(playerid,2517.6394,-1678.3141,13.9862,10);
  68. return 1;
  69. }
  70. if(PizzaJob[playerid] == 5){
  71. PizzaJob[playerid] = 6;
  72. SetPlayerCheckpoint(playerid,2441.1526,-2017.4093,13.1231,10);
  73. return 1;
  74. }
  75. if(PizzaJob[playerid] == 6){
  76. PizzaJob[playerid] = 7;
  77. SetPlayerCheckpoint(playerid,2486.2058,-2017.6384,13.1309,10);
  78. return 1;
  79. }
  80. if(PizzaJob[playerid] == 7){
  81. PizzaJob[playerid] = 8;
  82. SetPlayerCheckpoint(playerid,2520.9238,-2016.4714,13.1395,10);
  83. return 1;
  84. }
  85. if(PizzaJob[playerid] == 8){
  86. PizzaJob[playerid] = 9;
  87. SetPlayerCheckpoint(playerid,2464.7258,-2000.3944,13.1430,10);
  88. return 1;
  89. }
  90. if(PizzaJob[playerid] == 9){
  91. PizzaJob[playerid] = 10;
  92. SetPlayerCheckpoint(playerid,2240.8374,-1886.9504,13.1486,10);
  93. return 1;
  94. }
  95. if(PizzaJob[playerid] == 10){
  96. PizzaJob[playerid] = 11;
  97. SetPlayerCheckpoint(playerid,2095.5488,-1815.7517,12.9792,10);
  98. return 1;
  99. }
  100. if(PizzaJob[playerid] == 11){
  101. PizzaJob[playerid] = 0;
  102. DisablePlayerCheckpoint(playerid);
  103. SendClientMessage(playerid,COLOR_YELLOW,"* You have recieved $150 for delivering the pizzas.");
  104. GivePlayerMoney(playerid,150);
  105. }
  106. }
  107. return 1;
  108. }
  109. public OnPlayerExitVehicle(playerid, vehicleid)
  110. {
  111. if(PizzaJob[playerid] > 0)
  112. {
  113. PizzaJob[playerid] = 0;
  114. SendClientMessage(playerid, COLOR_RED, "* You have left the job, you won't be payed fool!.");
  115. DisablePlayerCheckpoint(playerid);
  116. }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement