Advertisement
Guest User

Untitled

a guest
Aug 19th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. public VaildFishPlace(playerid)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(IsPlayerInRangeOfPoint(playerid, 4,403.8266,-2088.7598,7.8359) || IsPlayerInRangeOfPoint(playerid, 4,398.7553,-2088.7490,7.8359))
  6. {
  7. return 1;
  8. }
  9. else if(IsPlayerInRangeOfPoint(playerid, 4,396.2197,-2088.6692,7.8359) || IsPlayerInRangeOfPoint(playerid, 4,391.1094,-2088.7976,7.8359))
  10. {
  11. return 1;
  12. }
  13. else if(IsPlayerInRangeOfPoint(playerid, 4,383.4157,-2088.7849,7.8359))
  14. {
  15. return 1;
  16. }
  17. }
  18. return 0;
  19. }
  20. CMD:fish(playerid, params[])
  21. {
  22. if(PlayerInfo[playerid][pJob] != 11) return SendClientMessage(playerid, COLOR_GREY, "Nu esti pescar!");
  23. if(JobWorking[playerid] == 0) return 1;
  24. if(!IsPlayerNearVehicle(playerid,JobVehicle[playerid],10)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti langa barca ta!");
  25. if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti pescui dintr-un vehicul!");
  26. if(StartFish[playerid] == 1) return 1;
  27. if(Undita[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai o undita!");
  28. if(Momeala[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai momeala!");
  29. if(VaildFishPlace(playerid) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu esti intr-o locatie buna, du-te la checkpoint-ul de pe harta.");
  30. new locatie = random(5);
  31. switch(locatie)
  32. {
  33. case 0: SetPlayerCheckpoint(playerid,403.8266,-2088.7598,7.8359,4.0),CP[playerid] = 43;
  34. case 1: SetPlayerCheckpoint(playerid,398.7553,-2088.7490,7.8359,4.0),CP[playerid] = 43;
  35. case 2: SetPlayerCheckpoint(playerid,396.2197,-2088.6692,7.8359,4.0),CP[playerid] = 43;
  36. case 3: SetPlayerCheckpoint(playerid,391.1094,-2088.7976,7.8359,4.0),CP[playerid] = 43;
  37. case 4: SetPlayerCheckpoint(playerid,383.4157,-2088.7849,7.8359,4.0),CP[playerid] = 43;
  38. }
  39. new need = 15*GetPlayerSkill(playerid);
  40. if(HaveFish[playerid] >= need) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai prea multe kilograme de peste!");
  41. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~w~Pescuiesti...",15000,3);
  42. SetTimerEx("Fish", 15000, 0, "d", playerid);
  43. //TogglePlayerControllable(playerid, 0);
  44. ApplyAnimation(playerid, "SAMP", "FishingIdle", 3.0,1,1,0,0,0);
  45. SetPlayerAttachedObject(playerid, 9, 18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000);
  46. StartFish[playerid] = 1;
  47. Freezed[playerid] = 1;
  48. Momeala[playerid] --;
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement