Jump to content
  • 0

Problema fish


97fresh

Question

Folosesc comanda /fish, trec acele secunde si nu imi prinde nici un fel de peste 

In gm nu este nici un fel de eroare 

comanda fish:

Quote

CMD:fish(playerid,params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(PlayerInfo[playerid][pJob] != 13) return SCM(playerid,COLOR_WHITE,"You are not a fisherman.");
    if(VaildFishPlace(playerid) && !IsPlayerInAnyVehicle(playerid))
    {
        if(PlayerInfo[playerid][pFishes] > 0) return SCM(playerid,COLOR_WHITE,"Mergi la un magazin 24/7 pentru a vinde pestele prins inainte de a pescui din nou.");
        if(Fishing[playerid] == 1) return SCM(playerid,COLOR_WHITE,"You are already fishing.");
        SetPlayerAttachedObject(playerid, 4, 18632, 5, 0.217000, 0.089999, -0.139999, -34.000007, 5.899998, -61.399993);
          ApplyAnimation(playerid, "SAMP", "FishingIdle", 4.0, 0, 1, 1, 1, 0, 1);
        Fishing[playerid] = 1;
        new timer = 20 + random(20);
        FishTimer[playerid] = timer;
        SendClientMessage(playerid, COLOR_WHITE, "You're now fishing. It will take a few seconds to reel your fish in.");
        GetPlayerPos(playerid, LastPos[playerid][0], LastPos[playerid][1], LastPos[playerid][2]);
        FishTimerr[playerid] = SetTimerEx("Fisher", 1000, 1, "i", playerid);
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 4110, 5);
    }
    else return SendClientMessage(playerid, COLOR_WHITE, "You are not in the fishing zone. [/jobs > Fisherman]");
    return 1;
}

public fisher si fisher2

Quote

public Fisher(playerid)
{
    FishTimer[playerid]--;
    switch(FishTimer[playerid]) {
        case 1: {
            new string[MAX_STRING],sendername[30],money,string2[128];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            KillTimer(FishTimerr[playerid]);
            Fishing[playerid] = 0;
            FishTimer[playerid] = 0;
            if(TipPeste[playerid] == 1)
            {
                money = 5000 + random(10000);
                PlayerInfo[playerid][pFishPrice] = money;
                SS(playerid, COLOR_DARKPINK, "Ai prins un peste obisnuit!", "You caught a COMMON fish!");
                format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
                format(string2, sizeof(string2), "The value of the fish you caught is $%s!", FormatNumber(money));
                SS(playerid, COLOR_DARKPINK, string, string2);
                SS(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.", "To sell the fish, go to a 24/7 store.");
                 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 = 15000 + random(20000);
                PlayerInfo[playerid][pFishPrice] = money;
                SS(playerid, COLOR_BLUE, "Ai prins un peste rar!", "You caught a RARE fish!");
                format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
                format(string2, sizeof(string2), "The value of the fish you caught is $%s!", FormatNumber(money));
                SS(playerid, COLOR_DARKPINK, string, string2);
                SS(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.", "To sell the fish, go to a 24/7 store.");
                 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)
            {
                if(SvarInfo[2][svValue] == 0)
                {
                    money = 50000 + random(200000);
                    PlayerInfo[playerid][pFishPrice] = money;
                    SS(playerid, COLOR_YELLOW, "Ai prins un peste foarte rar!", "You caught a VERY RARE fish!");
                    format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
                    format(string2, sizeof(string2), "The value of the fish you caught is $%s!", FormatNumber(money));
                       SS(playerid, COLOR_DARKPINK, string, string2);
                    SS(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.", "To sell the fish, go to a 24/7 store.");
                     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 = 50000 + random(200000);
                        PlayerInfo[playerid][pFishPrice] = money;
                        SS(playerid, COLOR_YELLOW, "Ai prins un peste foarte rar!", "You caught a VERY RARE fish!");
                        format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
                        format(string2, sizeof(string2), "The value of the fish you caught is $%s!", FormatNumber(money));
                        SS(playerid, COLOR_DARKPINK, string, string2);
                        SS(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.", "To sell the fish, go to a 24/7 store.");
                         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 if(x >= 50)
                    {
                        money = 500000 + random(2000000);
                        PlayerInfo[playerid][pFishPrice] = money;
                        SS(playerid, COLOR_YELLOW, "Ai prins un peste special de Craciun!", "You caught a SPECIAL CHRISTMAS fish!");
                        format(string,sizeof(string),"Pestele prins de tine valoreaza $%s!", FormatNumber(money));
                        format(string2, sizeof(string2), "The value of the fish you caught is $%s!", FormatNumber(money));
                        SS(playerid, COLOR_DARKPINK, string, string2);
                        SS(playerid, COLOR_WHITE, "Pentru a vinde pestele, mergi la un magazin 24/7.", "To sell the fish, go to a 24/7 store.");
                        format(string,sizeof(string),"* %s caught a special Christmas 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: {
            ClearAnimations(playerid);
             TogglePlayerControllable(playerid, 1);
             RemovePlayerAttachedObject(playerid, 4);
             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...", 5110, 5);
        case 19: GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~w~FISHING...", 5110, 5);
    }
     return 1;
}

public Fisher2(playerid)
{
    Fishing[playerid] = 0;
    SCM(playerid,COLOR_WHITE,"{999999}Now you can fish again.");
    return 1;
}

 

Edited by 97fresh
 

 

430x73_FFFFFF_FF9900_000000_000000.png

 
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.