Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:work(playerid, params[])
- {
- #pragma unused params
- if(GetPlayerTeam(playerid) == TEAM_TRUCKER) return T_NewJob(playerid);
- if(GetPlayerTeam(playerid) == TEAM_PILOT) return P_NewJob(playerid);
- if(GetPlayerTeam(playerid) == TEAM_COACH) return C_NewJob(playerid);
- return 1;
- }
- stock T_NewJob(playerid)
- {
- new vID = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514)
- {
- if(IsTrailerAttachedToVehicle(vID))
- {
- MissionStatus[playerid] = 1;
- new MisRand = random(sizeof(TruckLocations));
- new LoadText[128], Float:x, Float:y, Float:z;
- x = TruckLocations[MisRand][LoadX];
- y = TruckLocations[MisRand][LoadY];
- z = TruckLocations[MisRand][LoadZ];
- unx[playerid] = TruckLocations[MisRand][UnloadX];
- uny[playerid] = TruckLocations[MisRand][UnloadY];
- unz[playerid] = TruckLocations[MisRand][UnloadZ];
- iPay[playerid] = TruckLocations[MisRand][Pay];
- SetPlayerCheckpoint(playerid, x, y, z, 7);
- format(LoadText, 128, "%s",TruckLocations[MisRand][LoadName]);
- SendClientMessage(playerid, ORANGE, LoadText);
- }
- else
- {
- SendClientMessage(playerid, RED, "You need a trailer!");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You must be in a Truck to perform this!");
- }
- return 1;
- }
- stock P_NewJob(playerid)
- {
- new vID = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vID)== 519) //SHAMAL
- {
- MissionStatus[playerid] = 1;
- new SMisRand = random(sizeof(ShamalLocations));
- new LoadText[128], Float:x, Float:y, Float:z;
- x = ShamalLocations[SMisRand][LoadX];
- y = ShamalLocations[SMisRand][LoadY];
- z = ShamalLocations[SMisRand][LoadZ];
- unx[playerid] = ShamalLocations[SMisRand][UnloadX];
- uny[playerid] = ShamalLocations[SMisRand][UnloadY];
- unz[playerid] = ShamalLocations[SMisRand][UnloadZ];
- iPay[playerid] = ShamalLocations[SMisRand][Pay];
- SetPlayerCheckpoint(playerid, x, y, z, 7);
- format(LoadText, 128, "%s",ShamalLocations[SMisRand][LoadName]);
- SendClientMessage(playerid, ORANGE, LoadText);
- }
- if(GetVehicleModel(vID)== 553) //Navada
- {
- MissionStatus[playerid] = 1;
- new NMisRand = random(sizeof(NavLocations));
- new LoadText[128], Float:x, Float:y, Float:z;
- x = NavLocations[NMisRand][LoadX];
- y = NavLocations[NMisRand][LoadY];
- z = NavLocations[NMisRand][LoadZ];
- unx[playerid] = NavLocations[NMisRand][UnloadX];
- uny[playerid] = NavLocations[NMisRand][UnloadY];
- unz[playerid] = NavLocations[NMisRand][UnloadZ];
- iPay[playerid] = NavLocations[NMisRand][Pay];
- SetPlayerCheckpoint(playerid, x, y, z, 7);
- format(LoadText, 128, "%s",NavLocations[NMisRand][LoadName]);
- SendClientMessage(playerid, ORANGE, LoadText);
- }
- else
- {
- SendClientMessage(playerid, RED, "You must be in a Plane to perform this!");
- }
- return 1;
- }
- stock C_NewJob(playerid)
- {
- new vID = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vID)== 437 )
- {
- MissionStatus[playerid] = 1;
- new MisRand = random(sizeof(CoachLocations));
- new LoadText[128], Float:x, Float:y, Float:z;
- x = CoachLocations[MisRand][LoadX];
- y = CoachLocations[MisRand][LoadY];
- z = CoachLocations[MisRand][LoadZ];
- unx[playerid] = CoachLocations[MisRand][UnloadX];
- uny[playerid] = CoachLocations[MisRand][UnloadY];
- unz[playerid] = CoachLocations[MisRand][UnloadZ];
- iPay[playerid] = CoachLocations[MisRand][Pay];
- SetPlayerCheckpoint(playerid, x, y, z, 7);
- format(LoadText, 128, "%s",CoachLocations[MisRand][LoadName]);
- SendClientMessage(playerid, ORANGE, LoadText);
- }
- else
- {
- SendClientMessage(playerid, RED, "You must be in a Coach to perform this!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement