Advertisement
Deathguise

/Work script. - AaronFarley

Apr 4th, 2013
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.22 KB | None | 0 0
  1. CMD:work(playerid, params[])
  2.     {
  3.             #pragma unused params
  4.             if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid);
  5.             if(GetPlayerTeam(playerid) == TEAM_PILOT) return P_NewJob(playerid);
  6.             if(GetPlayerTeam(playerid) == TEAM_COACH) return C_NewJob(playerid);
  7.             return 1;
  8.     }
  9.  
  10.  
  11. stock T_NewJob(playerid)
  12.     {
  13.         new vID = GetPlayerVehicleID(playerid);
  14.         if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514)
  15.             {
  16.                 if(IsTrailerAttachedToVehicle(vID))
  17.                 {
  18.                         MissionStatus[playerid] = 1;
  19.                         new MisRand = random(sizeof(TruckLocations));
  20.                         new LoadText[128], Float:x, Float:y, Float:z;
  21.                         x = TruckLocations[MisRand][LoadX];
  22.                         y = TruckLocations[MisRand][LoadY];
  23.                         z = TruckLocations[MisRand][LoadZ];
  24.                         unx[playerid] = TruckLocations[MisRand][UnloadX];
  25.                         uny[playerid] = TruckLocations[MisRand][UnloadY];
  26.                         unz[playerid] = TruckLocations[MisRand][UnloadZ];
  27.                         iPay[playerid] = TruckLocations[MisRand][Pay];
  28.                         SetPlayerCheckpoint(playerid, x, y, z, 7);
  29.                         format(LoadText, 128, "%s",TruckLocations[MisRand][LoadName]);
  30.                         SendClientMessage(playerid, ORANGE, LoadText);
  31.                     }
  32.                     else
  33.                     {
  34.                             SendClientMessage(playerid, RED, "You need a trailer!");
  35.                     }
  36.             }
  37.             else
  38.             {
  39.                 SendClientMessage(playerid, RED, "You must be in a Truck to perform this!");
  40.             }
  41.         return 1;
  42.     }
  43.  
  44. stock P_NewJob(playerid)
  45.     {
  46.         new vID = GetPlayerVehicleID(playerid);
  47.         if(GetVehicleModel(vID)== 519) //SHAMAL
  48.             {
  49.                         MissionStatus[playerid] = 1;
  50.                         new SMisRand = random(sizeof(ShamalLocations));
  51.                         new LoadText[128], Float:x, Float:y, Float:z;
  52.                         x = ShamalLocations[SMisRand][LoadX];
  53.                         y = ShamalLocations[SMisRand][LoadY];
  54.                         z = ShamalLocations[SMisRand][LoadZ];
  55.                         unx[playerid] = ShamalLocations[SMisRand][UnloadX];
  56.                         uny[playerid] = ShamalLocations[SMisRand][UnloadY];
  57.                         unz[playerid] = ShamalLocations[SMisRand][UnloadZ];
  58.                         iPay[playerid] = ShamalLocations[SMisRand][Pay];
  59.                         SetPlayerCheckpoint(playerid, x, y, z, 7);
  60.                         format(LoadText, 128, "%s",ShamalLocations[SMisRand][LoadName]);
  61.                         SendClientMessage(playerid, ORANGE, LoadText);
  62.             }
  63.         if(GetVehicleModel(vID)== 553) //Navada
  64.             {
  65.                         MissionStatus[playerid] = 1;
  66.                         new NMisRand = random(sizeof(NavLocations));
  67.                         new LoadText[128], Float:x, Float:y, Float:z;
  68.                         x = NavLocations[NMisRand][LoadX];
  69.                         y = NavLocations[NMisRand][LoadY];
  70.                         z = NavLocations[NMisRand][LoadZ];
  71.                         unx[playerid] = NavLocations[NMisRand][UnloadX];
  72.                         uny[playerid] = NavLocations[NMisRand][UnloadY];
  73.                         unz[playerid] = NavLocations[NMisRand][UnloadZ];
  74.                         iPay[playerid] = NavLocations[NMisRand][Pay];
  75.                         SetPlayerCheckpoint(playerid, x, y, z, 7);
  76.                         format(LoadText, 128, "%s",NavLocations[NMisRand][LoadName]);
  77.                         SendClientMessage(playerid, ORANGE, LoadText);
  78.             }
  79.  
  80.             else
  81.             {
  82.                 SendClientMessage(playerid, RED, "You must be in a Plane to perform this!");
  83.             }
  84.  
  85.         return 1;
  86.     }
  87.    
  88.     stock C_NewJob(playerid)
  89.     {
  90.         new vID = GetPlayerVehicleID(playerid);
  91.         if(GetVehicleModel(vID)== 437 )
  92.             {
  93.                         MissionStatus[playerid] = 1;
  94.                         new MisRand = random(sizeof(CoachLocations));
  95.                         new LoadText[128], Float:x, Float:y, Float:z;
  96.                         x = CoachLocations[MisRand][LoadX];
  97.                         y = CoachLocations[MisRand][LoadY];
  98.                         z = CoachLocations[MisRand][LoadZ];
  99.                         unx[playerid] = CoachLocations[MisRand][UnloadX];
  100.                         uny[playerid] = CoachLocations[MisRand][UnloadY];
  101.                         unz[playerid] = CoachLocations[MisRand][UnloadZ];
  102.                         iPay[playerid] = CoachLocations[MisRand][Pay];
  103.                         SetPlayerCheckpoint(playerid, x, y, z, 7);
  104.                         format(LoadText, 128, "%s",CoachLocations[MisRand][LoadName]);
  105.                         SendClientMessage(playerid, ORANGE, LoadText);
  106.                     }
  107.             else
  108.             {
  109.                 SendClientMessage(playerid, RED, "You must be in a Coach to perform this!");
  110.             }
  111.         return 1;
  112.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement