Advertisement
Guest User

Untitled

a guest
Feb 27th, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. //šalmas ir liemenė
  2. SetPlayerAttachedObject(playerid, 6, 18638, 2, 0.188000,0.026000,0.006000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
  3. SetPlayerAttachedObject(playerid, 7, 19904, 1, 0.059999,0.050999,0.000000,0.000000,84.799980,179.699981,1.350999,1.320999,1.000000);
  4. //transportas
  5. new kurjmasina[1], kurjobj[1];
  6.  
  7. kurjmasina[0] = AC_CreateVehicle(578, -2114.7881, -28.7326, 35.7390, 0.0000, 1, 1, 360);
  8. kurjobj[0] = CreateDynamicObject(11702,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
  9. AttachDynamicObjectToVehicle(kurjobj[0], kurjmasina[0], 0.000, 3.509, 1.389, 0.000, 0.000, 0.000);
  10. kurjobj[0] = CreateDynamicObject(19803,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
  11. AttachDynamicObjectToVehicle(kurjobj[0], kurjmasina[0], 0.000, 4.150, 0.010, 0.000, 0.000, 0.000);
  12. kurjobj[0] = CreateDynamicObject(3572,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
  13. AttachDynamicObjectToVehicle(kurjobj[0], kurjmasina[0], 0.036, -1.650, 1.059, 0.000, 0.000, -89.899);
  14.  
  15. //Pačio darbo mini skriptas, paemam dėžę su N ir nunešam į kitą vietą, tuo pačiu atliekame specialų veiksmą (nešti dėžę) bei gauname objektą į rankas.
  16.  
  17. if(PRESSED(KEY_NO)) // paspaudus N mygtuką
  18. {
  19. if(PlayerInfo[playerid][Ldarbas] == 1) // nustatom koks darbas galės naudoti
  20. {
  21. if(IsPlayerInRangeOfPoint(playerid, 5, -2115.7578, -35.4989, 35.5827)) // kordinatės kuriose galima paimti 5 metrų spinduliu.
  22. {
  23. if(PlayerInfo[playerid][paemedeze] == false) // ar paemęs dėžę iš sandelio
  24. {
  25. SetPlayerAttachedObject(playerid, 5, 2358, 6, 0.051999,0.039999,-0.187999,-107.599990,0.000000,86.099983,1.000000,1.000000,1.000000); // uždedame objektą į dešnę ranką ar kairę nepamenu
  26. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY); // duodam specialu veiksma dėl kurio negalės bėgti
  27. PlayerInfo[playerid][paemedeze] = true; // paėmė dėžę sėkmingai
  28. }
  29. }
  30. }
  31. if(PlayerInfo[playerid][Ldarbas] == 1)
  32. {
  33. if(IsPlayerInRangeOfPoint(playerid, 5, -2111.7988, 7.5966, 35.5827))
  34. {
  35. if(PlayerInfo[playerid][paemedeze] == true)
  36. {
  37. PlayerInfo[playerid][paemedeze] = false; //padėjo dėžę sėkmingai
  38. /*
  39. Norint duoti random pinigu: new money = 50 + random(500); // gaus 50 ir random būdų dar 500
  40. */
  41. GivePlayerMoneyA(playerid, 150);// kiek gauna pinigų
  42. RemovePlayerAttachedObject(playerid, 5); // panaikinam dėžę iš rankų
  43. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); //panaikinam specialų veiksmą.
  44.  
  45. }
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement