Bug while fishing with random.
#1

Hello,

I created my Fisherman job a few days ago. Now it is bugging. For example: when I catch a 2kg fish, it counts always every fish like 34kg. Isn't that weird?

pawn Код:
new RandomFish[][] =
{
    {"* You caught a 2 kilogramm Carper.", 2 },
    {"* You caught a 3 kilogramm Carper.", 3 },
    {"* You caught a 4 kilogramm Carper.", 4 },
    {"* You caught a 5 kilogramm Carper.", 5 },
    {"* You caught a 2 kilogramm Driftfish.", 2 },
    {"* You caught a 3 kilogramm Driftfish.", 3 },
    {"* You caught a 4 kilogramm Driftfish.", 4 },
    {"* You caught a 5 kilogramm Driftfish.", 5 },
    {"* You caught a 6 kilogramm Driftfish.", 6 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 },
    {"* You didn't catch a fish, sorry.", 0 }
};
pawn Код:
dcmd_fish(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][gTeam] == TEAM_FISHERMANS)
    {
        if(IsPlayerInVehicle(playerid,FishermanBoat1) || IsPlayerInVehicle(playerid,FishermanBoat2)|| IsPlayerInVehicle(playerid,FishermanBoat3))
        {
            if(IsPlayerInRangeOfPoint(playerid,50,-2490.133300,2001.119873,-0.331034) || IsPlayerInRangeOfPoint(playerid,50,-1329.810913, 1586.480590, -0.475296) || IsPlayerInRangeOfPoint(playerid,50,1970.885742, -140.405670, -0.250106))
            {
                new rand = random(sizeof(RandomFish));
                SendClientMessage(playerid,COLOR_GREEN,RandomFish[rand][0]);
                PlayerInfo[playerid][CaughtFish] = PlayerInfo[playerid][CaughtFish] + RandomFish[rand][2];
            }
            else return SendClientMessage(playerid,COLOR_RED,"* There is no fish in this area, type /fisharea to go to one.");
        }
        else return SendClientMessage(playerid,COLOR_RED,"* You can't fish in this boat.");
    }
    else return SendClientMessage(playerid,COLOR_RED,"* You are not a Fisherman.");
    return 1;
}
I hope someone knows this bug

Regards, Jochem
Reply


Messages In This Thread
Bug while fishing with random. - by Jochemd - 27.08.2010, 07:34
Re: Bug while fishing with random. - by Jochemd - 27.08.2010, 09:11
Re: Bug while fishing with random. - by BuLLeT[LTU] - 27.08.2010, 09:22
Re: Bug while fishing with random. - by Jochemd - 27.08.2010, 09:26
Re: Bug while fishing with random. - by iggy1 - 27.08.2010, 09:36
Re: Bug while fishing with random. - by Jochemd - 27.08.2010, 09:44
Re: Bug while fishing with random. - by iggy1 - 27.08.2010, 09:51
Re: Bug while fishing with random. - by Jochemd - 27.08.2010, 09:57
Re: Bug while fishing with random. - by Jochemd - 27.08.2010, 10:12
Re: Bug while fishing with random. - by Hiddos - 27.08.2010, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)