Advertisement
Guest User

Untitled

a guest
Jul 10th, 2023
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. YCMD:fish(playerid, params[], help) {
  2. if(PlayerInfo[playerid][pJob] != 11) return SCM(playerid, COLOR_GREY, "Nu esti pescar!");
  3. if(!PlayerToPoint(35.0, playerid, 377.8837,-2086.3262,7.8359)) return SCM(playerid, COLOR_GREY, "Nu esti in zona in care poti pescui.");
  4. if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti aceasta comanda dintr-un vehicul!");
  5. if(HaveFish[playerid] != 0) return SCM(playerid, -1, "Ai prins deja un peste! Du-te si vinde-l la unul dintre magazinele 24/7.");
  6. if(StartFish[playerid] == 1) return 1;
  7. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~w~YOU'RE FISHING NOW...",15000,3);
  8. SetTimerEx("Fish", 15000, 0, "d", playerid);
  9. TogglePlayerControllable(playerid, 0);
  10. ApplyAnimation(playerid, "SAMP", "FishingIdle", 3.0,1,1,0,0,0);
  11. SetPlayerAttachedObject(playerid, 0, 18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000);
  12. StartFish[playerid] = 1;
  13. Freezed[playerid] = 1;
  14. return 1;
  15. }
  16.  
  17. function Fish(playerid) {
  18. new x, string[180];
  19. if(!IsPlayerConnected(playerid)) return 1;
  20. if(PlayerInfo[playerid][pJob] == 11) {
  21. RemovePlayerAttachedObject(playerid, 0);
  22. x = 3000 + random(1000) + GetPlayerSkill(playerid)*500;
  23. if(PlayerInfo[playerid][pPremiumAccount] == 1) x += x/2;
  24. new rar = random(500);
  25. if(rar >= 490 && rar < 495) {
  26. x += 3000 + random(5000);
  27. format(string, sizeof(string), "Ai prins un peste rar care valoreaza $%s!", FormatNumber(x));
  28. SCM(playerid, COLOR_YELLOW, string);
  29. SCM(playerid, -1, "Pentru a vinde pestele, trebuie sa mergi intr-un 24/7. (/gps)");
  30. format(string, sizeof(string), "* %s a prins un peste rar ce valoreaza $%s.", GetName(playerid), FormatNumber(x));
  31. NearMessage(playerid, COLOR_YELLOW, string);
  32. }
  33. else if(rar >= 495) {
  34. format(string, sizeof(string), "Ai prins un peste foarte rar!", FormatNumber(x));
  35. SCM(playerid, COLOR_BLUE, string);
  36. SCM(playerid, -1, "Pentru a vinde pestele, trebuie sa mergi intr-un 24/7. (/gps)");
  37. format(string, sizeof(string), "* %s a prins un peste foarte rar care valoreaza %s.", GetName(playerid), FormatNumber(x));
  38. NearMessage(playerid, COLOR_YELLOW, string);
  39.  
  40. }
  41. else {
  42. format(string, sizeof(string), "Ai prins un peste normal care valoreaza $%s!", FormatNumber(x));
  43. SCM(playerid, COLOR_DARKPINK, string);
  44. SCM(playerid, -1, "Pentru a vinde pestele, trebuie sa mergi intr-un 24/7. (/gps)");
  45. format(string, sizeof(string), "* %s a prins un peste normal ce valoreaza $%s.", GetName(playerid), FormatNumber(x));
  46. NearMessage(playerid, COLOR_YELLOW, string);
  47. }
  48.  
  49. HaveFish[playerid] = x;
  50. StartFish[playerid] = 0;
  51. TogglePlayerControllable(playerid, 1);
  52. Freezed[playerid] = 0;
  53. }
  54. return 1;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement