WhiteAngels

Pizza Boy Job

Dec 6th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. //Pizzzzzzaaaaaaa....Yooohoooo
  2.  
  3. #include <a_samp> // Include
  4.  
  5. new PizzaJob[256]; // PizzaBoy Job
  6.  
  7. public OnPlayerCommandText(playerid, cmdtext[])
  8. {
  9. if (strcmp("/pizza", cmdtext, true, 10) == 0)
  10. {
  11. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  12. {
  13. PizzaJob[playerid] = 1;
  14. new name[MAX_PLAYER_NAME], string[48];
  15. GetPlayerName(playerid, name, sizeof(name));
  16.  
  17. format(string, sizeof(string), "{CE0000}%s is now a Pizzaboy.", name );
  18. SendClientMessageToAll(-1, string);
  19.  
  20. SetPlayerCheckpoint(playerid, 2012.6134,-1729.3796,13.1536,10);
  21. SendClientMessage(playerid, -1,"{CE0000}Job: Follow the red markers");
  22. return 1;
  23. }
  24. SendClientMessage(playerid, -1,"{CE0000}You have to be on a pizza bike to start the job!");
  25. }
  26. return 0;
  27. }
  28. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  29. {
  30. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  31. {
  32. SendClientMessage(playerid, -1, "{CE0000}Job: You can start the Pizzaboy job by using {00FF00}/pizza");
  33. }
  34. return 0;
  35. }
  36. public OnPlayerEnterCheckpoint(playerid)
  37. {
  38. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  39. {
  40. if(PizzaJob[playerid] == 1){
  41. PizzaJob[playerid] = 2;
  42. SetPlayerCheckpoint(playerid, 2012.4771,-1640.1229,13.1431,10);
  43. return 1;
  44. }
  45. if(PizzaJob[playerid] == 2){
  46. PizzaJob[playerid] = 3;
  47. SetPlayerCheckpoint(playerid, 2387.0063,-1667.1498,13.1249,10);
  48. return 1;
  49. }
  50. if(PizzaJob[playerid] == 3){
  51. PizzaJob[playerid] = 4;
  52. SetPlayerCheckpoint(playerid, 2414.9255,-1649.6678,13.1305,10);
  53. return 1;
  54. }
  55. if(PizzaJob[playerid] == 4){
  56. PizzaJob[playerid] = 5;
  57. SetPlayerCheckpoint(playerid, 2517.6394,-1678.3141,13.9862,10);
  58. return 1;
  59. }
  60. if(PizzaJob[playerid] == 5){
  61. PizzaJob[playerid] = 6;
  62. SetPlayerCheckpoint(playerid, 2441.1526,-2017.4093,13.1231,10);
  63. return 1;
  64. }
  65. if(PizzaJob[playerid] == 6){
  66. PizzaJob[playerid] = 7;
  67. SetPlayerCheckpoint(playerid, 2486.2058,-2017.6384,13.1309,10);
  68. return 1;
  69. }
  70. if(PizzaJob[playerid] == 7){
  71. PizzaJob[playerid] = 8;
  72. SetPlayerCheckpoint(playerid, 2520.9238,-2016.4714,13.1395,10);
  73. return 1;
  74. }
  75. if(PizzaJob[playerid] == 8){
  76. PizzaJob[playerid] = 9;
  77. SetPlayerCheckpoint(playerid, 2464.7258,-2000.3944,13.1430,10);
  78. return 1;
  79. }
  80. if(PizzaJob[playerid] == 9){
  81. PizzaJob[playerid] = 10;
  82. SetPlayerCheckpoint(playerid, 2240.8374,-1886.9504,13.1486,10);
  83. return 1;
  84. }
  85. if(PizzaJob[playerid] == 10){
  86. PizzaJob[playerid] = 11;
  87. SetPlayerCheckpoint(playerid, 2095.5488,-1815.7517,12.9792,10);
  88. return 1;
  89. }
  90. if(PizzaJob[playerid] == 11){
  91. PizzaJob[playerid] = 0;
  92. DisablePlayerCheckpoint(playerid);
  93. SendClientMessage(playerid, -1,"{CE0000}Job: You have recieved $300000 for delivering the pizzas");
  94. GivePlayerMoney(playerid,-300000);
  95. }
  96. }
  97. return 1;
  98. }
  99. public OnPlayerExitVehicle(playerid, vehicleid)
  100. {
  101. if(PizzaJob[playerid] > 0)
  102. {
  103. PizzaJob[playerid] = 0;
  104. SendClientMessage(playerid, -1, "{CE0000}Job: You have left your job");
  105. DisablePlayerCheckpoint(playerid);
  106. }
  107. }
Advertisement
Add Comment
Please, Sign In to add comment