Advertisement
Guest User

PizzaBoy Job - Pawn

a guest
Aug 10th, 2014
1,125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.83 KB | None | 0 0
  1. /*==============================================================================
  2. *                                                                              *
  3. *       -PizzaBoy Job Filterscript By: [Phoenix-]                              *
  4. *           -Yahoo: Mhmmd480@Yahoo.Com                                         *
  5. *               -Skype: Mamad.Venom                                            *
  6. *                                                                              *
  7. ==============================================================================*/
  8. // This Job Is In SF [ -1812.0 , 937.0 , 24.7422 ]
  9. #include <a_samp>
  10.  
  11. new PizzaJob[MAX_PLAYERS];
  12. new PJPickup;
  13.  
  14. new Float: CheckPoints[5][4] =
  15. {
  16.     {-1820.5520, 1113.3737, 45.4375, 3.0},
  17.     {-2016.4229, 970.1193, 45.5578, 3.0},
  18.     {-2210.8459, 908.2916, 69.0007, 3.0},
  19.     {-1706.9905, 785.6998, 24.7344, 3.0},
  20.     {-2094.2607, 798.5289, 69.5576, 3.0}
  21. };
  22. public OnGameModeInit()
  23. {
  24.     AddStaticVehicleEx(448, -1810.0000, 941.0000, 24.3700, -180.0000, -1, -1, 100);
  25.     AddStaticVehicleEx(448, -1812.0000, 941.0000, 24.3700, -180.0000, -1, -1, 100);
  26.     AddStaticVehicleEx(448, -1814.0000, 941.0000, 24.3700, -180.0000, -1, -1, 100);
  27.     PJPickup = CreatePickup(1274,1,-1812.0,937.0,24.7422,0);
  28.    
  29.     print("\n+++++ PizzaBoy Job FilterScript +++++");
  30.     print("**************************************");
  31.     print("*                                    *");
  32.     print("*  -Filterscript By: [Phoenix-]      *");
  33.     print("*    -Yahoo: Mhmmd480@Yahoo.Com      *");
  34.     print("*      -Skype: Mamad.Venom           *");
  35.     print("*                                    *");
  36.     print("**************************************\n");
  37.     return 1;
  38. }
  39.  
  40. public OnGameModeExit()
  41. {
  42.     return 1;
  43. }
  44.  
  45. public OnPlayerSpawn(playerid)
  46. {
  47.     RemoveBuildingForPlayer(playerid, 1226, -1814.4453, 938.3359, 27.7031, 0.25);
  48.     return 1;
  49. }
  50.  
  51. public OnPlayerDeath(playerid, killerid, reason)
  52. {
  53.     PizzaJob[playerid] =0;
  54.     return 1;
  55. }
  56.  
  57. public OnPlayerCommandText(playerid, cmdtext[])
  58. {
  59.     if (strcmp("/Pizza", cmdtext, true, 10) == 0)
  60.     {
  61.         if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  62.         {
  63.             new rand = random(sizeof(CheckPoints)), PName[MAX_PLAYER_NAME], string[128];
  64.             GetPlayerName(playerid, PName, sizeof(PName));
  65.             PizzaJob[playerid] =1;
  66.             SetPlayerCheckpoint(playerid,CheckPoints[rand][0],CheckPoints[rand][1],CheckPoints[rand][2],CheckPoints[rand][3]);
  67.             GameTextForPlayer(playerid, "~w~Follow The ~w~CheckPoints", 5000, 5);
  68.             format(string, sizeof(string), "[PIZZAJOB] {ffc8ff}%s(%d) {FFFFFF}Is Now A PizzaBoy.",PName,playerid);
  69.             SendClientMessageToAll(0xFFA500AA, string);
  70.             return 1;
  71.         }
  72.         SendClientMessage(playerid, 0xD2691EAA,"You Must Be On A Pizza Bike To Start The Job.");
  73.         return 1;
  74.     }
  75.     return 0;
  76. }
  77.  
  78. public OnPlayerExitVehicle(playerid, vehicleid)
  79. {
  80.     if(PizzaJob[playerid] == 1)
  81.     {
  82.         PizzaJob[playerid] =0;
  83.         DisablePlayerCheckpoint(playerid);
  84.     }
  85.     return 1;
  86. }
  87.  
  88. public OnPlayerEnterCheckpoint(playerid)
  89. {
  90.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
  91.     {
  92.         if(PizzaJob[playerid] == 1)
  93.         {
  94.             new string[128];
  95.             new PName[MAX_PLAYER_NAME];
  96.             GetPlayerName(playerid, PName, sizeof(PName));
  97.             PizzaJob[playerid] =0;
  98.             DisablePlayerCheckpoint(playerid);
  99.             GameTextForPlayer(playerid, "~w~You Have Done You Job~n~And Recived ~g~$500 + 1 Score", 5000, 5);
  100.             GivePlayerMoney(playerid,500);
  101.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  102.             format(string, sizeof(string), "[PIZZAJOB] {ffc8ff}%s(%d) {FFFFFF}Has Done His Pizza Job And Recived {00ae00}$500 + 1 Score ",PName,playerid);
  103.             SendClientMessageToAll(0xFFA500AA, string);
  104.             return 1;
  105.         }
  106.         DisablePlayerCheckpoint(playerid);
  107.         PizzaJob[playerid] =0;
  108.     }
  109.     return 1;
  110. }
  111.  
  112. public OnPlayerPickUpPickup(playerid, pickupid)
  113. {
  114.     if(pickupid == PJPickup)
  115.     {
  116.         GameTextForPlayer(playerid, "/Pizza", 5000, 1);
  117.         return 1;
  118.     }
  119.     return 1;
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement