Guest User

samp script

a guest
Jul 24th, 2014
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. #include <a_samp>
  2. #include <streamer>
  3.  
  4. #define COLOR_DARKGOLD 0x808000AA
  5. #define COLOR_RED 0xFF0000AA
  6. #define COLOR_YELLOW 0xFFFF00AA
  7.  
  8. new PizzaJob[256];
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.  
  13. AddStaticVehicle(448,2122.1677,-1784.2250,12.9837,180.4585,0,0); // Pizza 1
  14. AddStaticVehicle(448,2121.9895,-1784.7623,12.9867,181.5936,0,0); // Pizza 1
  15. AddStaticVehicle(448,2118.8469,-1784.5692,12.9880,181.5090,0,0); // Pizza 2
  16. AddStaticVehicle(448,2115.7837,-1784.6464,12.9860,181.6605,0,0); // Pizza 3
  17.  
  18. }
  19.  
  20. public OnPlayerCommandText(playerid, cmdtext[])
  21. {
  22. if (strcmp("/pizza", cmdtext, true, 10) == 0)
  23. {
  24. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  25. {
  26. PizzaJob[playerid] = 1;
  27. new name[MAX_PLAYER_NAME], string[48];
  28. GetPlayerName(playerid, name, sizeof(name));
  29. format(string, sizeof(string), "* %s is now a Pizza-Boy.", name );
  30. SendClientMessageToAll(COLOR_YELLOW, string);
  31. SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
  32. SendClientMessage(playerid,COLOR_YELLOW,"* Deliver Pizza's to the Red Markers to Complete this Job!");
  33. return 1;
  34. }
  35. SendClientMessage(playerid, COLOR_RED,"You Have to be On a Pizza Boy to Start this Job!");
  36. }
  37. return 0;
  38. }
  39. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  40. {
  41. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  42. {
  43. SendClientMessage(playerid, COLOR_RED, "* You can Start the Pizza-Boy Job by using /pizza.");
  44. }
  45. return 0;
  46. }
  47. public OnPlayerEnterCheckpoint(playerid)
  48. {
  49. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  50. {
  51. if(PizzaJob[playerid] == 1){
  52. PizzaJob[playerid] = 2;
  53. SetPlayerCheckpoint(playerid,2012.4771,-1640.1229,13.1431,10);
  54. SendClientMessage(playerid,COLOR_YELLOW,"* Please Drive to the next Delivery Point!");
  55. return 1;
  56. }
  57. if(PizzaJob[playerid] == 2){
  58. PizzaJob[playerid] = 3;
  59. SetPlayerCheckpoint(playerid,2387.0063,-1667.1498,13.1249,10);
  60. return 1;
  61. }
  62. if(PizzaJob[playerid] == 3){
  63. PizzaJob[playerid] = 4;
  64. SetPlayerCheckpoint(playerid,2414.9255,-1649.6678,13.1305,10);
  65. return 1;
  66. }
  67. if(PizzaJob[playerid] == 4){
  68. PizzaJob[playerid] = 5;
  69. SetPlayerCheckpoint(playerid,2517.6394,-1678.3141,13.9862,10);
  70. return 1;
  71. }
  72. if(PizzaJob[playerid] == 5){
  73. PizzaJob[playerid] = 6;
  74. SetPlayerCheckpoint(playerid,2441.1526,-2017.4093,13.1231,10);
  75. return 1;
  76. }
  77. if(PizzaJob[playerid] == 6){
  78. PizzaJob[playerid] = 7;
  79. SetPlayerCheckpoint(playerid,2486.2058,-2017.6384,13.1309,10);
  80. return 1;
  81. }
  82. if(PizzaJob[playerid] == 7){
  83. PizzaJob[playerid] = 8;
  84. SetPlayerCheckpoint(playerid,2520.9238,-2016.4714,13.1395,10);
  85. return 1;
  86. }
  87. if(PizzaJob[playerid] == 8){
  88. PizzaJob[playerid] = 9;
  89. SetPlayerCheckpoint(playerid,2464.7258,-2000.3944,13.1430,10);
  90. return 1;
  91. }
  92. if(PizzaJob[playerid] == 9){
  93. PizzaJob[playerid] = 10;
  94. SetPlayerCheckpoint(playerid,2240.8374,-1886.9504,13.1486,10);
  95. return 1;
  96. }
  97. if(PizzaJob[playerid] == 10){
  98. PizzaJob[playerid] = 11;
  99. SetPlayerCheckpoint(playerid,2095.5488,-1815.7517,12.9792,10);
  100. return 1;
  101. }
  102. if(PizzaJob[playerid] == 11){
  103. PizzaJob[playerid] = 0;
  104. DisablePlayerCheckpoint(playerid);
  105. SendClientMessage(playerid,COLOR_YELLOW,"* You have received $2000 and +1 Score for Delivering the Pizzas! Nice Job.");
  106. GivePlayerMoney(playerid,2000);
  107. SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
  108. }
  109. }
  110. return 1;
  111. }
  112. public OnPlayerExitVehicle(playerid, vehicleid)
  113. {
  114. if(PizzaJob[playerid] > 0)
  115. {
  116. PizzaJob[playerid] = 0;
  117. SendClientMessage(playerid, COLOR_RED, "* You have Left your Job, you won't be Paid.");
  118. DisablePlayerCheckpoint(playerid);
  119. }
  120. }
Advertisement
Add Comment
Please, Sign In to add comment