Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((newkeys & KEY_YES) && !(oldkeys & KEY_YES)) {
- if(BizzInfo[InBussines[playerid]][bType] == 6 && IsPlayerInRangeOfPoint(playerid, 2.0, -27.4162,-89.9254,1003.5469))
- {
- ShowPlayerDialog(playerid,Dialog_24,DIALOG_STYLE_LIST,"SERVER: 24/7","Cellphone ($500)\nPhone Book ($50)\nPhone Credit ($500)\nWalkie Talkie ($2,500)\nPhoto Camera ($2,000)\nGas Can ($5,000)","Select","Exit");
- }
- if(BizzInfo[InBussines[playerid]][bType] == 2 && IsPlayerInRangeOfPoint(playerid, 2.0, 295.5967,-80.2080,1001.5156))
- {
- ShowPlayerDialog(playerid,Dialog_gunshop,DIALOG_STYLE_LIST,"Select:","Baseball bat($1,000)\nSD Pistol($2,000)\nDesert eagle($3,000)\nShotgun($4,200)\nMP5($4,600)\nAK47($7,000)\nM4($7,000)","Select","Cancel");
- }
- if(InBG[playerid]!=0&&GetPlayerVirtualWorld(playerid)==9999) {
- showInventory(playerid);
- }
- }
- if (newkeys & KEY_YES)
- {
- if(GarbageTimer[playerid] == 0)
- {
- if(TrashID[playerid] != -1)
- {
- for(new x; x < sizeof(CHKGarbage); x++)
- {
- if(TrashID[playerid] == x)
- {
- if(IsPlayerInRangeOfPoint(playerid,2,CHKGarbage[x][0], CHKGarbage[x][1], CHKGarbage[x][2]))
- {
- SetPlayerAttachedObject(playerid, 3, 1265, 6, -0.083000, 0.326000, -0.324999, -115.199836, -26.500011, 3.699998, 0.729000, 0.830000, 0.915000);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- GarbageTimer[playerid] = 60;
- TrashID[playerid] = -1;
- GameTextForPlayer(playerid, "~w~press ~r~y~w~ behind the garbage vehicle.", 5000, 3);
- }
- }
- }
- }
- }
- else
- {
- new Float:rot,Float:x,Float:y,Float:z,strings[128];
- GetVehicleZAngle(JobCar[playerid], rot);
- rot = 360 - rot;
- GetVehiclePos(JobCar[playerid], x, y, z);
- x = floatsin(rot,degrees) * -4.0 + floatcos(rot,degrees) * 0.0 + x;
- y = floatcos(rot,degrees) * -4.0 - floatsin(rot,degrees) * 0.0 + y;
- z = 0.0 + z;
- if(IsPlayerInRangeOfPoint(playerid,2.0, x, y, z))
- {
- RemovePlayerAttachedObject(playerid, 3);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- GarbageTimer[playerid] = 0;
- new find,Float:distance,maxim;
- switch(PlayerInfo[playerid][pGarbageSkill])
- {
- case 1: maxim = 75;
- case 2: maxim = 125;
- case 3: maxim = 175;
- case 4: maxim = 250;
- case 5: maxim = 350;
- case 6: maxim = 500;
- }
- if((GarbageInCar[JobCar[playerid]] + GarbageCollected[playerid]) >= maxim)
- {
- GarbageInCar[JobCar[playerid]] = maxim;
- }
- else
- {
- GarbageInCar[JobCar[playerid]] += GarbageCollected[playerid];
- }
- format(strings,sizeof(strings),"ai colectat %d kg de gunoi~n~~r~gunoi colectat in masina:~n~~g~%d/%d kg",GarbageCollected[playerid],GarbageInCar[JobCar[playerid]],maxim);
- GameTextForPlayer(playerid, strings, 5000, 3);
- 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(strings,sizeof(strings),"Mergi la checkpoint pentru a incepe colectarea gunoiului. Distanta: %.0fm.",distance);
- SendClientMessage(playerid, COLOR_YELLOW, strings);
- SetPlayerCheckpoint(playerid, CHKGarbage[rand][0],CHKGarbage[rand][1],CHKGarbage[rand][2], 2.0);
- 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);
- CP[playerid] = 10972;
- TrashID[playerid] = rand;
- break;
- }
- }
- }
- else
- {
- format(strings,sizeof(strings),"Nu esti in spatele masinii tale de gunoi (id %d).",JobCar[playerid]);
- SendClientMessage(playerid, COLOR_LIGHTGREEN3, strings);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement