Guest User

Untitled

a guest
Jul 2nd, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. YCMD:uzmipoklon(playerid, params[], help)
  2. {
  3. if(ukupnopaketica == 0) return SCM(playerid, -1, ""ZUTA"ERROR: "BELA"Nema ni jedog paketica da bi ste ga trazili!!");
  4. {
  5. for(new weed = 0; weed < sizeof(GiftInfo); weed++)
  6. {
  7. if(IsPlayerInRangeOfPoint(playerid,2.0,GiftInfo[weed][giX],GiftInfo[weed][giY],GiftInfo[weed][giZ]))
  8. {
  9. if(GiftInfo[weed][giPlanted] == 1 && GiftInfo[weed][giX] != 0.0 && GiftInfo[weed][giY] != 0.0 && GiftInfo[weed][giZ] != 0.0)
  10. {
  11. new rands = randomExx(1,8);
  12. if(rands == 1)
  13. {
  14. PlayerInfo[playerid][pEuro] += 300;
  15. SCM(playerid, GRAD2, "Dobili ste 300€ u ovom poklonu.");
  16. }
  17. if(rands == 2)
  18. {
  19. g_NovacPlus(playerid,5000);
  20. SCM(playerid, GRAD2, "Dobili ste 5000$ u ovom poklonu.");
  21. }
  22. if(rands == 3)
  23. {
  24. PlayerInfo[playerid][pMats] += 1000;
  25. SCM(playerid, GRAD2, "Dobili ste 1KG matsa u ovom poklonu.");
  26. }
  27. if(rands == 4)
  28. {
  29. PlayerInfo[playerid][pDroga] += 250;
  30. SCM(playerid, GRAD2, "Dobili ste 250g Droge u poklonu");
  31. }
  32. if(rands == 5)
  33. {
  34. g_GivePlayerWeapon(playerid, 24, 120);
  35. SCM(playerid, GRAD2, "Dobili ste Deagle sa 120 metaka");
  36. }
  37. if(rands == 6)
  38. {
  39. g_NovacPlus(playerid,50000);
  40. SCM(playerid, GRAD2, "Dobili ste 50000$ u ovom poklonu.");
  41. }
  42. if(rands == 7)
  43. {
  44. PlayerInfo[playerid][pEuro] += 500;
  45. SCM(playerid, GRAD2, "Dobili ste 500€ u ovom poklonu.");
  46. }
  47. if(rands == 8)
  48. {
  49. g_GivePlayerWeapon(playerid, 31, 500);
  50. SCM(playerid, GRAD2, "Dobili ste M4 sa 500 metaka");
  51. }
  52. new string[256];
  53. ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
  54. DestroyDynamicObject(GiftInfo[weed][giObject]);
  55. GiftInfo[weed][giX] = 0.0;
  56. GiftInfo[weed][giY] = 0.0;
  57. GiftInfo[weed][giZ] = 0.0;
  58. GiftInfo[weed][giPlanted] = 0;
  59. format(string, sizeof(string), "%s je naso poklon na lokaci %s", GetName(playerid),GetPlayerLocation(playerid));
  60. SCMTA(-1, string);
  61. DestroyDynamic3DTextLabel(GiftText[weed]);
  62. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  63. ukupnopaketica--;
  64. }
  65. }
  66. }
  67. }
  68. return 1;
  69. }
Advertisement
Add Comment
Please, Sign In to add comment