Advertisement
Guest User

fish

a guest
Apr 15th, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.38 KB | None | 0 0
  1. function Fisher(playerid)
  2. {
  3. FishTimer[playerid]--;
  4. switch(FishTimer[playerid]) {
  5. case 1: {
  6. new string[MAX_STRING],sendername[30],money;
  7. GetPlayerName(playerid, sendername, sizeof(sendername));
  8. KillTimer(FishTimerr[playerid]);
  9. Fishing[playerid] = 0;
  10. FishTimer[playerid] = 0;
  11. ClearAnimations(playerid);
  12. ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
  13. TogglePlayerControllable(playerid, 1);
  14. RemovePlayerAttachedObject(playerid, 4);
  15. if(TipPeste[playerid] == 1)
  16. {
  17. money = 20000 + random(40000);
  18. PlayerInfo[playerid][pFishPrice] = money;
  19. SCM(playerid, COLOR_DARKPINK, "Ai prins un peste obisnuit!");
  20. format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
  21. SCM(playerid, COLOR_DARKPINK, string);
  22. SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
  23. format(string,sizeof(string),"* %s caught a common fish that can be sold for about $%s.", sendername, FormatNumber(money));
  24. ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  25. PlayerInfo[playerid][pFishes] = 1;
  26. }
  27. else if(TipPeste[playerid] == 2)
  28. {
  29. money = 25000 + random(30000);
  30. PlayerInfo[playerid][pFishPrice] = money;
  31. SCM(playerid, COLOR_BLUE, "Ai prins un peste rar!");
  32. format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
  33. SCM(playerid, COLOR_DARKPINK, string);
  34. SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
  35. format(string,sizeof(string),"* %s caught a rare fish that can be sold for about $%s.", sendername, FormatNumber(money));
  36. ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  37. PlayerInfo[playerid][pFishes] = 1;
  38. }
  39. else if(TipPeste[playerid] == 3)
  40. {
  41. money = 100000 + random(300000);
  42. PlayerInfo[playerid][pFishPrice] = money;
  43. SCM(playerid, COLOR_YELLOW, "Ai prins un peste foarte rar!");
  44. format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
  45. SCM(playerid, COLOR_DARKPINK, string);
  46. SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
  47. format(string,sizeof(string),"* %s caught a very rare fish that can be sold for about $%s.", sendername, FormatNumber(money));
  48. ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  49. PlayerInfo[playerid][pFishes] = 1;
  50. }
  51. else
  52. {
  53. new x = random(99);
  54. if(x >= 0 && x <= 49)
  55. {
  56. money = 100000 + random(300000);
  57. PlayerInfo[playerid][pFishPrice] = money;
  58. SCM(playerid, COLOR_YELLOW, "Ai prins un peste foarte rar!");
  59. format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
  60. SCM(playerid, COLOR_DARKPINK, string);
  61. SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
  62. format(string,sizeof(string),"* %s caught a very rare fish that can be sold for about $%s.", sendername, FormatNumber(money));
  63. ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  64. PlayerInfo[playerid][pFishes] = 1;
  65. }
  66. }
  67. TipPeste[playerid] = 0;
  68. }
  69. case 2: {
  70. new randfish = random(99);
  71. if(PlayerInfo[playerid][pFishSkill] == 1)
  72. {
  73. if(randfish >= 0 && randfish <= 87) TipPeste[playerid] = 1;
  74. else if(randfish >= 88 && randfish <= 98) TipPeste[playerid] = 2;
  75. else if(randfish >= 99) TipPeste[playerid] = 3;
  76. }
  77. else if(PlayerInfo[playerid][pFishSkill] == 2)
  78. {
  79. if(randfish >= 0 && randfish <= 83) TipPeste[playerid] = 1;
  80. else if(randfish >= 84 && randfish <= 97) TipPeste[playerid] = 2;
  81. else if(randfish >= 98) TipPeste[playerid] = 3;
  82. }
  83. else if(PlayerInfo[playerid][pFishSkill] == 3)
  84. {
  85. if(randfish >= 0 && randfish <= 79) TipPeste[playerid] = 1;
  86. else if(randfish >= 80 && randfish <= 96) TipPeste[playerid] = 2;
  87. else if(randfish >= 97) TipPeste[playerid] = 3;
  88. }
  89. else if(PlayerInfo[playerid][pFishSkill] == 4)
  90. {
  91. if(randfish >= 0 && randfish <= 75) TipPeste[playerid] = 1;
  92. else if(randfish >= 76 && randfish <= 95) TipPeste[playerid] = 2;
  93. else if(randfish >= 96) TipPeste[playerid] = 3;
  94. }
  95. else if(PlayerInfo[playerid][pFishSkill] == 5)
  96. {
  97. if(randfish >= 0 && randfish <= 71) TipPeste[playerid] = 1;
  98. else if(randfish >= 72 && randfish <= 94) TipPeste[playerid] = 2;
  99. else if(randfish >= 95) TipPeste[playerid] = 3;
  100. }
  101. else if(PlayerInfo[playerid][pFishSkill] >= 6)
  102. {
  103. if(randfish >= 0 && randfish <= 67) TipPeste[playerid] = 1;
  104. else if(randfish >= 68 && randfish <= 93) TipPeste[playerid] = 2;
  105. else if(randfish >= 94) TipPeste[playerid] = 3;
  106. }
  107. }
  108. case 7: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
  109. case 12: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
  110. case 19: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
  111. case 26: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
  112. case 33: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
  113. }
  114. return 1;
  115. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement