Advertisement
Guest User

Untitled

a guest
Apr 18th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. if ((newkeys & KEY_YES) && !(oldkeys & KEY_YES)) {
  2. if(BizzInfo[InBussines[playerid]][bType] == 6 && IsPlayerInRangeOfPoint(playerid, 2.0, -27.4162,-89.9254,1003.5469))
  3. {
  4. 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");
  5. }
  6. if(BizzInfo[InBussines[playerid]][bType] == 2 && IsPlayerInRangeOfPoint(playerid, 2.0, 295.5967,-80.2080,1001.5156))
  7. {
  8. 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");
  9. }
  10. if(InBG[playerid]!=0&&GetPlayerVirtualWorld(playerid)==9999) {
  11. showInventory(playerid);
  12. }
  13. }
  14.  
  15.  
  16. if (newkeys & KEY_YES)
  17. {
  18. if(GarbageTimer[playerid] == 0)
  19. {
  20. if(TrashID[playerid] != -1)
  21. {
  22. for(new x; x < sizeof(CHKGarbage); x++)
  23. {
  24. if(TrashID[playerid] == x)
  25. {
  26. if(IsPlayerInRangeOfPoint(playerid,2,CHKGarbage[x][0], CHKGarbage[x][1], CHKGarbage[x][2]))
  27. {
  28. SetPlayerAttachedObject(playerid, 3, 1265, 6, -0.083000, 0.326000, -0.324999, -115.199836, -26.500011, 3.699998, 0.729000, 0.830000, 0.915000);
  29. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  30. GarbageTimer[playerid] = 60;
  31. TrashID[playerid] = -1;
  32. GameTextForPlayer(playerid, "~w~press ~r~y~w~ behind the garbage vehicle.", 5000, 3);
  33. }
  34. }
  35. }
  36. }
  37. }
  38. else
  39. {
  40. new Float:rot,Float:x,Float:y,Float:z,strings[128];
  41. GetVehicleZAngle(JobCar[playerid], rot);
  42. rot = 360 - rot;
  43. GetVehiclePos(JobCar[playerid], x, y, z);
  44. x = floatsin(rot,degrees) * -4.0 + floatcos(rot,degrees) * 0.0 + x;
  45. y = floatcos(rot,degrees) * -4.0 - floatsin(rot,degrees) * 0.0 + y;
  46. z = 0.0 + z;
  47. if(IsPlayerInRangeOfPoint(playerid,2.0, x, y, z))
  48. {
  49. RemovePlayerAttachedObject(playerid, 3);
  50. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  51. GarbageTimer[playerid] = 0;
  52. new find,Float:distance,maxim;
  53.  
  54. switch(PlayerInfo[playerid][pGarbageSkill])
  55. {
  56. case 1: maxim = 75;
  57. case 2: maxim = 125;
  58. case 3: maxim = 175;
  59. case 4: maxim = 250;
  60. case 5: maxim = 350;
  61. case 6: maxim = 500;
  62. }
  63.  
  64. if((GarbageInCar[JobCar[playerid]] + GarbageCollected[playerid]) >= maxim)
  65. {
  66. GarbageInCar[JobCar[playerid]] = maxim;
  67. }
  68. else
  69. {
  70. GarbageInCar[JobCar[playerid]] += GarbageCollected[playerid];
  71. }
  72. 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);
  73. GameTextForPlayer(playerid, strings, 5000, 3);
  74. for(new t; t < 1000; t++)
  75. {
  76. new rand = random(sizeof(CHKGarbage));
  77. if(!IsPlayerInRangeOfPoint(playerid,1000.0, CHKGarbage[rand][0], CHKGarbage[rand][1], CHKGarbage[rand][2])) find = 1;
  78. if(find == 1)
  79. {
  80. GetPlayerPos(playerid, x, y, z);
  81. distance = GetDistanceBetweenPoints(x, y, z, CHKGarbage[rand][0], CHKGarbage[rand][1], CHKGarbage[rand][2]);
  82. format(strings,sizeof(strings),"Mergi la checkpoint pentru a incepe colectarea gunoiului. Distanta: %.0fm.",distance);
  83. SendClientMessage(playerid, COLOR_YELLOW, strings);
  84. SetPlayerCheckpoint(playerid, CHKGarbage[rand][0],CHKGarbage[rand][1],CHKGarbage[rand][2], 2.0);
  85. if(floatround(distance, floatround_round) >= 1000 && floatround(distance, floatround_round) <= 1500) GarbageCollected[playerid] = 5 + random(5);
  86. else if(floatround(distance, floatround_round) >= 1501 && floatround(distance, floatround_round) <= 2000) GarbageCollected[playerid] = 7 + random(5);
  87. else if(floatround(distance, floatround_round) >= 2001 && floatround(distance, floatround_round) <= 2500) GarbageCollected[playerid] = 9 + random(5);
  88. else if(floatround(distance, floatround_round) >= 2501 && floatround(distance, floatround_round) <= 3000) GarbageCollected[playerid] = 11 + random(5);
  89. else if(floatround(distance, floatround_round) >= 3001) GarbageCollected[playerid] = 14 + random(5);
  90. CP[playerid] = 10972;
  91. TrashID[playerid] = rand;
  92. break;
  93. }
  94. }
  95. }
  96. else
  97. {
  98. format(strings,sizeof(strings),"Nu esti in spatele masinii tale de gunoi (id %d).",JobCar[playerid]);
  99. SendClientMessage(playerid, COLOR_LIGHTGREEN3, strings);
  100. }
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement