Advertisement
Guest User

AMUNRA'S Pilot Jobs

a guest
Dec 28th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.79 KB | None | 0 0
  1. /*==============================================================================
  2.         __________
  3.       /      A    \
  4.      /      A A    \
  5.     /     A    A    \
  6.     |   A        A  |
  7.     | AAAAAAAAAAAAA | M        M    U     U     N      N    R R R       A
  8.     | A           A | M M     M M   U     U     N N    N    R    R     A A
  9.     | A   _____   A | M  M   M  M   U     U     N  N   N    R     R  A     A
  10.     | A  |     |  A | M   M M   M   U     U     N   N  N    R R  R   A A A A
  11.     | A  |     |  A | M    M    M   U     U     N    N N    RR  R    A     A
  12.     |_A__|     |__A_| M         M    UUUUU      N      N    R    R   A     A
  13.  
  14.   _____________________________________________________________________________*/
  15.  
  16.  
  17. #include <a_samp>
  18. #include <streamer>
  19. #include <zcmd>
  20.  
  21. #define COLOR_YELLOW        0xFFFF00AA
  22. #define COLOR_WHITE         0xFFFFFFAA
  23. #define COLOR_RED           0xFF0000AA
  24.  
  25. new Pilot[MAX_PLAYERS];
  26. new Pickuppilot;
  27. new LVehicleId;
  28. new colour1,colour2;
  29. new Float:x, Float:y, Float:z,angle;
  30.  
  31. forward Fix(playerid, vehicleid);
  32.  
  33. public OnFilterScriptInit()
  34. {
  35.     print("\n++++++++++++++++$$$$$$$+++++++++++++");
  36.     print(" FilterScript By Amunra Are Loaded   ");
  37.     print("++++++++++++++++++$$$$$$+++++++++++++\n");
  38.  
  39.     Pickuppilot = CreatePickup(1239,1,2737.7542,-1760.2360,44.1451);
  40.     return 1;
  41. }
  42.  
  43. public OnFilterScriptExit()
  44. {
  45.     DestroyPickup(Pickuppilot);
  46.     return 1;
  47. }
  48. public OnPlayerConnect(playerid)
  49. {
  50.     Pilot[playerid] = 0;
  51.     return 1;
  52. }
  53.  
  54. public OnPlayerDisconnect(playerid, reason)
  55. {
  56.     Pilot[playerid] = 0;
  57.     return 1;
  58. }
  59.  
  60. public OnPlayerSpawn(playerid)
  61. {
  62.     Pilot[playerid] = 0;
  63.     return 1;
  64. }
  65.  
  66. public OnPlayerDeath(playerid, killerid, reason)
  67. {
  68.     Pilot[playerid] = 0;
  69.     return 1;
  70. }
  71.  
  72. public OnPlayerExitVehicle(playerid, vehicleid)
  73. {
  74.     if(Pilot[playerid] > 0)
  75.     {
  76.         Pilot[playerid] = 0;
  77.         DestroyVehicle(GetPlayerVehicleID(playerid));
  78.         DisablePlayerCheckpoint(playerid);
  79.         SendClientMessage(playerid,0xFF0000AA,"You Leave the Pilot Job");
  80.     }
  81.     return 1;
  82. }
  83.  
  84. public OnPlayerEnterCheckpoint(playerid)
  85. {
  86.     if(Pilot[playerid] == 1){
  87.        Pilot[playerid] = 2;
  88.        SetPlayerCheckpoint(playerid,351.2875,2500.7703,16.4844,12.0);
  89.        return 1;
  90.     }
  91.     if(Pilot[playerid] == 2){
  92.        Pilot[playerid] = 3;
  93.        SetPlayerCheckpoint(playerid,955.8745,2071.4685,21.7015,12.0);
  94.        GameTextForPlayer(playerid,"Fix you're Heli for 7 second!",6000,6);
  95.        SetTimer("Fix",7000,false);
  96.        return 1;
  97.     }
  98.     if(Pilot[playerid] == 3){
  99.        Pilot[playerid] = 4;
  100.        SetPlayerCheckpoint(playerid,1108.7338,1529.2932,52.4059,12.0);
  101.        return 1;
  102.     }
  103.     if(Pilot[playerid] == 4){
  104.        Pilot[playerid] = 0;
  105.        GameTextForPlayer(playerid,"You're Finish Your Pilot Job",3000,1);
  106.        GivePlayerMoney(playerid,150000);
  107.        DestroyVehicle(GetPlayerVehicleID(playerid));
  108.        DisablePlayerCheckpoint(playerid);
  109.     }
  110.     return 1;
  111. }
  112. public OnPlayerPickUpPickup(playerid, pickupid)
  113. {
  114.     if(pickupid == Pickuppilot)
  115.     GameTextForPlayer(playerid,"Type /pilot to Start Job Pilot",3000,1);
  116.     return 1;
  117. }
  118. CMD:pilot(playerid,params[])
  119. {
  120.     if(IsPlayerInRangeOfPoint(playerid, 2,2737.7542,-1760.2360,44.1451))
  121.     {
  122.         if(Pilot[playerid] == 1 || Pilot[playerid] == 2 || Pilot[playerid] == 3 || Pilot[playerid] == 4)
  123.         {
  124.             SendClientMessage(playerid,0xFF0000AA,"You have started a Pilot Job and can't use this command again.");
  125.             return 1;
  126.         }
  127.         else
  128.         Pilot[playerid] = 1;
  129.         new name[MAX_PLAYER_NAME], string[128];
  130.         GetPlayerName(playerid, name, sizeof(name));
  131.         format(string, sizeof(string), "%s Was To be a Pilot. Type /jobpilot for go to work a pilot jobs By Amunra's.", name );
  132.         SendClientMessageToAll(0xFFFF00AA, string);
  133.         SendClientMessage(playerid,0xFFFF00AA,"Please follow the red checkpoint to Stay and still your Vehicle.");
  134.         SetPlayerCheckpoint(playerid,351.2875,2500.7703,16.4844,12.0);
  135.  
  136.         LVehicleId = CreateVehicle(487,2750.7383,-1799.7063,41.6439,angle,colour1,colour2,-1);
  137.         SetVehicleVirtualWorld(LVehicleId, GetPlayerVirtualWorld(playerid));
  138.         LinkVehicleToInterior(LVehicleId, GetPlayerInterior(playerid));
  139.         GetPlayerPos(playerid,x,y,z);
  140.         SetPlayerPos(playerid,2750.7383,-1799.7063,41.6439);
  141.         PutPlayerInVehicle(playerid,LVehicleId,0);
  142.         return 1;
  143.     }
  144.     else
  145.     {
  146.         SendClientMessage(playerid,0xFF0000AA,"You must be at Pickup Job Pilot To use this commands");
  147.     }
  148.     return 1;
  149. }
  150. CMD:jobpilot(playerid,params[])
  151. {
  152.     if(Pilot[playerid] == 1 || Pilot[playerid] == 2 || Pilot[playerid] == 3 || Pilot[playerid] == 4)
  153.     {
  154.         SendClientMessage(playerid,0xFF0000AA,"Now you on work ,and You can't Use this Commands");
  155.     }
  156.     else
  157.     SetPlayerInterior(playerid,0);
  158.     SetPlayerPos(playerid,2750.7383,-1799.7063,41.6439);
  159.     return 1;
  160. }
  161. public Fix(playerid, vehicleid)
  162. {
  163.     SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
  164.     GameTextForPlayer(playerid,"Your VEHICLE Still Fix",2000,1);
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement