Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:work(playerid, params[]) {
- new Float: Pos[3], string[500];
- if(PlayerInfo[playerid][pJob] == 0) return SCM(playerid, COLOR_GREY, "Nu ai un job!");
- if(JobWorking[playerid] == 1) return SCM(playerid, COLOR_GREY, "Muncesti deja.");
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- switch (PlayerInfo[playerid][pJob]) {
- case 1: {
- return 1;
- }
- case 2: {
- if(PlayerToPoint(15.00, playerid, -209.6895, -228.4223, 0.9004)) {
- CP[playerid] = 150;
- DisablePlayerCheckpoint(playerid);
- new szDialog2[1024];
- strcat(szDialog2, "Destination\tSkill");
- strcat(szDialog2, "Dillimore\t1\n");
- strcat(szDialog2, "Palomino creek\t1\n");
- strcat(szDialog2, "Montgomery\t2\n");
- strcat(szDialog2, "Fort carson\t2\n");
- strcat(szDialog2, "Fallen tree\t3\n");
- strcat(szDialog2, "Red county\t3\n");
- strcat(szDialog2, "Flint county\t4\n");
- strcat(szDialog2, "Back o beyond\t4\n");
- strcat(szDialog2, "The farm\t5\n");
- strcat(szDialog2, "Whetstone\t5\n");
- strcat(szDialog2, "Bone county\t6\n");
- strcat(szDialog2, "The panopticon\t6\n");
- ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Trucker", szDialog2, "Select", "Cancel");
- }
- }
- case 3: {
- if(!PlayerToPoint(5.0, playerid, 2173.1504,-2267.9075,13.3782)) {
- SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
- SetPlayerCheckpointEx(playerid,2173.1504,-2267.9075,13.3782, 6.0);
- CP[playerid] = 43;
- return 1;
- }
- JobVehicle[playerid] = CreateVehicleEx(482, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
- SendClientMessage(playerid, -1, "{008080}(Job){FFFFFF} Du-te in checkpoint pentru a incarca coletele.");
- SetPlayerRaceCheckpointEx(playerid,1,2209.4661,-2218.4280,13.5469,0.0,0.0,0.0,4.0);
- CP[playerid] = CP_CURIER;
- MoneyEarned[playerid] = 0;
- CurseFacute[playerid] = 0;
- }
- case 4: {
- return 1;
- }
- case 5:{
- if(!PlayerToPoint(5.0, playerid, -2666.4829,271.0853,4.3359)){
- SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
- SetPlayerCheckpointEx(playerid,-2666.4829,271.0853,4.3359, 6.0);
- CP[playerid] = 43;
- return 1;
- }
- MoneyEarned[playerid] = 0;
- CurseFacute[playerid] = 0;
- JobVehicle[playerid] = CreateVehicleEx(448, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
- SCM(playerid, COLOR_NEWS, "Tasteaza comanda [/pizza].");
- }
- case 6: {
- if(PlayerToPoint(7.0, playerid, -516.0576,-1508.7822,10.6103))
- {
- MoneyEarned[playerid] = 0;
- CurseFacute[playerid] = 0;
- PlayerTextDrawSetString(playerid, InfoTD, "Urca viteza la 30 KM/H, conduci prea incet.");
- PlayerTextDrawShow(playerid, InfoTD);
- timerfarm[playerid] = 60;
- JobVehicle[playerid] = CreateVehicleEx(531, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
- }
- else
- {
- if(CP[playerid] != 0) return SendClientMessage(playerid, COLOR_YELLOW2, "Ai deja un punct rosu activ. Foloseste comanda '/cancel checkpoint' pentru a renunta la el.");
- CP[playerid] = 43;
- SendClientMessage(playerid, COLOR_YELLOW2, "Eroare: Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
- SetPlayerCheckpoint(playerid, -516.0576,-1508.7822,10.6103, 7.0);
- return 1;
- }
- }
- case 7: {
- return 1;
- }
- case 9: {
- return 1;
- }
- case 10: {
- if(!PlayerToPoint(5.0, playerid, 2524.9690,2779.6057,11.3776)){
- SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
- SetPlayerCheckpointEx(playerid,2524.9690,2779.6057,11.3776, 6.0);
- CP[playerid] = 43;
- return 1;
- }
- new find,Float:distance,Float:x,Float:y,Float:z;
- if(TrashID[playerid] == -1)
- {
- for(new t; t < 1000; t++)
- {
- new rand = random(sizeof(CHKGarbage));
- if(!IsPlayerInRangeOfPoint(playerid,1000.0, CHKGarbage[rand][0], CHKGarbage[rand][1], CHKGarbage[rand][2])) find = 1;
- if(find == 1)
- {
- GetPlayerPos(playerid, x, y, z);
- distance = GetDistanceBetweenPoints(x, y, z, CHKGarbage[rand][0], CHKGarbage[rand][1], CHKGarbage[rand][2]);
- format(string,sizeof(string),"Mergi la checkpoint pentru a incepe colectarea gunoiului. Distanta: %.0fm.",distance);
- if(floatround(distance, floatround_round) >= 1000 && floatround(distance, floatround_round) <= 1500) GarbageCollected[playerid] = 5 + random(5);
- else if(floatround(distance, floatround_round) >= 1501 && floatround(distance, floatround_round) <= 2000) GarbageCollected[playerid] = 7 + random(5);
- else if(floatround(distance, floatround_round) >= 2001 && floatround(distance, floatround_round) <= 2500) GarbageCollected[playerid] = 9 + random(5);
- else if(floatround(distance, floatround_round) >= 2501 && floatround(distance, floatround_round) <= 3000) GarbageCollected[playerid] = 11 + random(5);
- else if(floatround(distance, floatround_round) >= 3001) GarbageCollected[playerid] = 14 + random(5);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SetPlayerCheckpointEx(playerid, CHKGarbage[rand][0],CHKGarbage[rand][1],CHKGarbage[rand][2], 2.0);
- CP[playerid] = 10972;
- TrashID[playerid] = rand;
- break;
- }
- }
- }
- else
- {
- new r = TrashID[playerid];
- GetPlayerPos(playerid, x, y, z);
- distance = GetDistanceBetweenPoints(x, y, z, CHKGarbage[r][0], CHKGarbage[r][1], CHKGarbage[r][2]);
- format(string,sizeof(string),"Mergi la checkpoint pentru a incepe colectarea gunoiului. Distanta: %.0fm.",distance);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SetPlayerCheckpointEx(playerid, CHKGarbage[r][0],CHKGarbage[r][1],CHKGarbage[r][2], 2.0);
- CP[playerid] = 10972;
- }
- JobVehicle[playerid] = CreateVehicleEx(408, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
- }
- case 11: {
- return 1;
- }
- case 12: {
- return 1;
- }
- case 13: {
- return 1;
- }
- }
- if(PlayerInfo[playerid][pJob] == 10) {
- JobVehicle[playerid] = CreateVehicleEx(411, -209.6895, -228.4223, 0.9004, 90, -1, -1, -1);
- }
- PutPlayerInVehicle(playerid, JobVehicle[playerid], 0);
- DisableRemoteVehicleCollisions(playerid, 1);
- JobWorking[playerid] = 1;
- Gas[JobVehicle[playerid]] = 200;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement