Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Fisher(playerid)
- {
- FishTimer[playerid]--;
- switch(FishTimer[playerid]) {
- case 1: {
- new string[MAX_STRING],sendername[30],money;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- KillTimer(FishTimerr[playerid]);
- Fishing[playerid] = 0;
- FishTimer[playerid] = 0;
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
- TogglePlayerControllable(playerid, 1);
- RemovePlayerAttachedObject(playerid, 4);
- if(TipPeste[playerid] == 1)
- {
- money = 20000 + random(40000);
- PlayerInfo[playerid][pFishPrice] = money;
- SCM(playerid, COLOR_DARKPINK, "Ai prins un peste obisnuit!");
- format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
- SCM(playerid, COLOR_DARKPINK, string);
- SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
- format(string,sizeof(string),"* %s caught a common fish that can be sold for about $%s.", sendername, FormatNumber(money));
- ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- PlayerInfo[playerid][pFishes] = 1;
- }
- else if(TipPeste[playerid] == 2)
- {
- money = 25000 + random(30000);
- PlayerInfo[playerid][pFishPrice] = money;
- SCM(playerid, COLOR_BLUE, "Ai prins un peste rar!");
- format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
- SCM(playerid, COLOR_DARKPINK, string);
- SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
- format(string,sizeof(string),"* %s caught a rare fish that can be sold for about $%s.", sendername, FormatNumber(money));
- ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- PlayerInfo[playerid][pFishes] = 1;
- }
- else if(TipPeste[playerid] == 3)
- {
- money = 100000 + random(300000);
- PlayerInfo[playerid][pFishPrice] = money;
- SCM(playerid, COLOR_YELLOW, "Ai prins un peste foarte rar!");
- format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
- SCM(playerid, COLOR_DARKPINK, string);
- SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
- format(string,sizeof(string),"* %s caught a very rare fish that can be sold for about $%s.", sendername, FormatNumber(money));
- ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- PlayerInfo[playerid][pFishes] = 1;
- }
- else
- {
- new x = random(99);
- if(x >= 0 && x <= 49)
- {
- money = 100000 + random(300000);
- PlayerInfo[playerid][pFishPrice] = money;
- SCM(playerid, COLOR_YELLOW, "Ai prins un peste foarte rar!");
- format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
- SCM(playerid, COLOR_DARKPINK, string);
- SCM(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.");
- format(string,sizeof(string),"* %s caught a very rare fish that can be sold for about $%s.", sendername, FormatNumber(money));
- ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- PlayerInfo[playerid][pFishes] = 1;
- }
- }
- TipPeste[playerid] = 0;
- }
- case 2: {
- new randfish = random(99);
- if(PlayerInfo[playerid][pFishSkill] == 1)
- {
- if(randfish >= 0 && randfish <= 87) TipPeste[playerid] = 1;
- else if(randfish >= 88 && randfish <= 98) TipPeste[playerid] = 2;
- else if(randfish >= 99) TipPeste[playerid] = 3;
- }
- else if(PlayerInfo[playerid][pFishSkill] == 2)
- {
- if(randfish >= 0 && randfish <= 83) TipPeste[playerid] = 1;
- else if(randfish >= 84 && randfish <= 97) TipPeste[playerid] = 2;
- else if(randfish >= 98) TipPeste[playerid] = 3;
- }
- else if(PlayerInfo[playerid][pFishSkill] == 3)
- {
- if(randfish >= 0 && randfish <= 79) TipPeste[playerid] = 1;
- else if(randfish >= 80 && randfish <= 96) TipPeste[playerid] = 2;
- else if(randfish >= 97) TipPeste[playerid] = 3;
- }
- else if(PlayerInfo[playerid][pFishSkill] == 4)
- {
- if(randfish >= 0 && randfish <= 75) TipPeste[playerid] = 1;
- else if(randfish >= 76 && randfish <= 95) TipPeste[playerid] = 2;
- else if(randfish >= 96) TipPeste[playerid] = 3;
- }
- else if(PlayerInfo[playerid][pFishSkill] == 5)
- {
- if(randfish >= 0 && randfish <= 71) TipPeste[playerid] = 1;
- else if(randfish >= 72 && randfish <= 94) TipPeste[playerid] = 2;
- else if(randfish >= 95) TipPeste[playerid] = 3;
- }
- else if(PlayerInfo[playerid][pFishSkill] >= 6)
- {
- if(randfish >= 0 && randfish <= 67) TipPeste[playerid] = 1;
- else if(randfish >= 68 && randfish <= 93) TipPeste[playerid] = 2;
- else if(randfish >= 94) TipPeste[playerid] = 3;
- }
- }
- case 7: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
- case 12: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
- case 19: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
- case 26: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
- case 33: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement