the commands where working now they are not?
#1

Ok, So I was making a fishing system for my mates server and everything was working at first, Then I decided to add a second timer because at first when you typed the command after the timer ran out it wouldn't let you catch a fish / the fish thing wouldn't show up, So I changed it and it worked but when you type /catchfish again after it dosn't work or show up.

pawn Код:
CMD:catchfish(playerid,params[])
{
    if(FInfo[playerid][waitingforfish] == 1) return SendClientMessage(playerid,COLOR_RED,"Please wait before using this command again!");
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -420.6635,1162.7756,1.8786))
    {
        new fishtimer[MAX_PLAYERS];
        new message[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        SendClientMessage(playerid,COLOR_CYAN,"You are starting to fish, Please wait!");
        fishtimer[playerid] = SetTimer("fishcatch", 6000, false); // Set a timer of 1000 miliseconds (1 second)
        format(message, sizeof(message), "*%s casts his fishing rod into the sea.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        TogglePlayerControllable(playerid, 0);
        FInfo[playerid][waitingforfish] = 1;
    }
    else {
        SendClientMessage(playerid,COLOR_RED,"You are not near the fishing area!");
    }
    return 1;
}
heres the timer

pawn Код:
forward fishwaittime(playerid);
public fishwaittime(playerid)
{
    new fishwait[MAX_PLAYERS];
    KillTimer(fishwait[playerid]);
    SendClientMessage(playerid,COLOR_GREEN,"You can now /catchfish");
    FInfo[playerid][waitingforfish] = 0;
}

forward fishcatch(playerid);
public fishcatch(playerid)
{
    new fishtimer[MAX_PLAYERS];
    new fishwait[MAX_PLAYERS];
    new Fishrandom = random(sizeof(RandomFish));
    new Randomlbs = random(sizeof(RandomFishlbs));
    new message[128];
    new fishmessage[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    FInfo[playerid][fishcurrentid] = RandomFish[Fishrandom][0];
    FInfo[playerid][fishcurrentlbs] = RandomFishlbs[Randomlbs][0];
    TogglePlayerControllable(playerid, 1);
    //fish invent part 1
    if(FInfo[playerid][fishcurrentid] == 1)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find an old boot.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s takes the boot of the fishing hook and throws it back into the sea.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish1] < 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish1] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish1lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish1] < 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish1] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish1lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish1] < 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish1] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish1lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish2] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish2lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish2] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish2lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish2] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish2lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish3] < 1 && FInfo[playerid][fish2] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish3] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish3lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish3] < 1 && FInfo[playerid][fish2] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish3] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish3lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish3] < 1 && FInfo[playerid][fish2] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish3] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish3lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish4] < 1 && FInfo[playerid][fish3] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish4] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish4lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish4] < 1 && FInfo[playerid][fish3] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish4] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish4lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish4] < 1 && FInfo[playerid][fish3] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish4] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish4lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish5] < 1 && FInfo[playerid][fish4] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish5] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish5lbs] = FInfo[playerid][fishcurrentlbs];
        FInfo[playerid][hasallfish] = 1;
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish5] < 1 && FInfo[playerid][fish4] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish5] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish5lbs] = FInfo[playerid][fishcurrentlbs];
        FInfo[playerid][hasallfish] = 1;
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish5] < 1 && FInfo[playerid][fish4] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish5] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish5lbs] = FInfo[playerid][fishcurrentlbs];
        FInfo[playerid][hasallfish] = 1;
        KillTimer(fishtimer[playerid]);
    }
    fishwait[playerid] = SetTimer("fishwaittime", 5000, false); // Set a timer of 1000 miliseconds (1 second)
    return 1;
}
heres full code
pawn Код:
forward fishwaittime(playerid);
public fishwaittime(playerid)
{
    new fishwait[MAX_PLAYERS];
    KillTimer(fishwait[playerid]);
    SendClientMessage(playerid,COLOR_GREEN,"You can now /catchfish");
    FInfo[playerid][waitingforfish] = 0;
}

forward fishcatch(playerid);
public fishcatch(playerid)
{
    new fishtimer[MAX_PLAYERS];
    new fishwait[MAX_PLAYERS];
    new Fishrandom = random(sizeof(RandomFish));
    new Randomlbs = random(sizeof(RandomFishlbs));
    new message[128];
    new fishmessage[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    FInfo[playerid][fishcurrentid] = RandomFish[Fishrandom][0];
    FInfo[playerid][fishcurrentlbs] = RandomFishlbs[Randomlbs][0];
    TogglePlayerControllable(playerid, 1);
    //fish invent part 1
    if(FInfo[playerid][fishcurrentid] == 1)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find an old boot.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s takes the boot of the fishing hook and throws it back into the sea.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish1] < 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish1] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish1lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish1] < 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish1] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish1lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish1] < 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish1] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish1lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish2] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish2lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish2] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish2lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish2] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish2lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish3] < 1 && FInfo[playerid][fish2] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish3] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish3lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish3] < 1 && FInfo[playerid][fish2] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish3] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish3lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish3] < 1 && FInfo[playerid][fish2] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish3] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish3lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish4] < 1 && FInfo[playerid][fish3] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish4] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish4lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish4] < 1 && FInfo[playerid][fish3] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish4] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish4lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish4] < 1 && FInfo[playerid][fish3] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish4] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish4lbs] = FInfo[playerid][fishcurrentlbs];
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish5] < 1 && FInfo[playerid][fish4] > 1 && FInfo[playerid][fishcurrentid] == 2)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a lobster.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the lobster of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a lobster which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish5] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish5lbs] = FInfo[playerid][fishcurrentlbs];
        FInfo[playerid][hasallfish] = 1;
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish5] < 1 && FInfo[playerid][fish4] > 1 && FInfo[playerid][fishcurrentid] == 3)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a swordfish.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the swordfish of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a swordfish which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish5] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish5lbs] = FInfo[playerid][fishcurrentlbs];
        FInfo[playerid][hasallfish] = 1;
        KillTimer(fishtimer[playerid]);
    }
    if(FInfo[playerid][fish5] < 1 && FInfo[playerid][fish4] > 1 && FInfo[playerid][fishcurrentid] == 4)
    {
        format(message, sizeof(message), "*%s pulls his line back in and checks the hook to find a tuna.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(message, sizeof(message), "*%s pulls the tuna of the fishing hook and puts it down beside him self.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        format(fishmessage, sizeof(fishmessage), "*You have catched a tuna which is %d lbs /fishinfo.", FInfo[playerid][fishcurrentlbs]);
        SendClientMessage(playerid,COLOR_CYAN,fishmessage);
        FInfo[playerid][fish5] = FInfo[playerid][fishcurrentid];
        FInfo[playerid][fish5lbs] = FInfo[playerid][fishcurrentlbs];
        FInfo[playerid][hasallfish] = 1;
        KillTimer(fishtimer[playerid]);
    }
    fishwait[playerid] = SetTimer("fishwaittime", 5000, false); // Set a timer of 1000 miliseconds (1 second)
    return 1;
}

//fish commands
CMD:catchfish(playerid,params[])
{
    if(FInfo[playerid][waitingforfish] == 1) return SendClientMessage(playerid,COLOR_RED,"Please wait before using this command again!");
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -420.6635,1162.7756,1.8786))
    {
        new fishtimer[MAX_PLAYERS];
        new message[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        SendClientMessage(playerid,COLOR_CYAN,"You are starting to fish, Please wait!");
        fishtimer[playerid] = SetTimer("fishcatch", 6000, false); // Set a timer of 1000 miliseconds (1 second)
        format(message, sizeof(message), "*%s casts his fishing rod into the sea.", name);
        ProxDetector(30.0, playerid, message, COLOR_PURPLE);
        TogglePlayerControllable(playerid, 0);
        FInfo[playerid][waitingforfish] = 1;
    }
    else {
        SendClientMessage(playerid,COLOR_RED,"You are not near the fishing area!");
    }
    return 1;
}

CMD:sellfish(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -420.6635,1162.7756,1.8786))
    {
        if(FInfo[playerid][fish1] == 1 && FInfo[playerid][fish1lbs] == 55)
        {
            GivePlayerMoney(playerid,150);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your lobster for $150!");
        }
        if(FInfo[playerid][fish1] == 1 && FInfo[playerid][fish1lbs] == 100)
        {
            GivePlayerMoney(playerid,275);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your lobster for $275!");
        }
        if(FInfo[playerid][fish1] == 1 && FInfo[playerid][fish1lbs] == 125)
        {
            GivePlayerMoney(playerid,300);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your lobster for $300!");
        }
        if(FInfo[playerid][fish1] == 1 && FInfo[playerid][fish1lbs] == 150)
        {
            GivePlayerMoney(playerid,325);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your lobster for $325!");
        }
        if(FInfo[playerid][fish1] == 1 && FInfo[playerid][fish1lbs] >= 200)
        {
            GivePlayerMoney(playerid,500);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your lobster for $500!");
        }
        if(FInfo[playerid][fish1] == 2 && FInfo[playerid][fish1lbs] == 55)
        {
            GivePlayerMoney(playerid,125);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Swordfish for $125!");
        }
        if(FInfo[playerid][fish1] == 2 && FInfo[playerid][fish1lbs] == 100)
        {
            GivePlayerMoney(playerid,245);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Swordfish for $245!");
        }
        if(FInfo[playerid][fish1] == 2 && FInfo[playerid][fish1lbs] == 125)
        {
            GivePlayerMoney(playerid,275);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your SwordFish for $275!");
        }
        if(FInfo[playerid][fish1] == 2 && FInfo[playerid][fish1lbs] == 150)
        {
            GivePlayerMoney(playerid,300);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your SwordFish for $300!");
        }
        if(FInfo[playerid][fish1] == 2 && FInfo[playerid][fish1lbs] >= 200)
        {
            GivePlayerMoney(playerid,450);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your lobster for $450!");
        }
        if(FInfo[playerid][fish1] == 3 && FInfo[playerid][fish1lbs] == 55)
        {
            GivePlayerMoney(playerid,76);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Tuna for $76!");
        }
        if(FInfo[playerid][fish1] == 3 && FInfo[playerid][fish1lbs] == 100)
        {
            GivePlayerMoney(playerid,150);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Tuna for $150!");
        }
        if(FInfo[playerid][fish1] == 3 && FInfo[playerid][fish1lbs] == 125)
        {
            GivePlayerMoney(playerid,200);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Tuna for $200!");
        }
        if(FInfo[playerid][fish1] == 3 && FInfo[playerid][fish1lbs] == 150)
        {
            GivePlayerMoney(playerid,250);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Tuna for $250!");
        }
        if(FInfo[playerid][fish1] == 3 && FInfo[playerid][fish1lbs] >= 200)
        {
            GivePlayerMoney(playerid,400);
            SendClientMessage(playerid,COLOR_GREEN,"You sold your Tuna for $400!");
        }
    }
    return 1;
}

CMD:fishtele(playerid,params[])
{
    SetPlayerPos(playerid,-420.7876,1163.7433,1.8548);
    return 1;
}

CMD:fishinfo(playerid,params[])
{
    if(FInfo[playerid][fish1] == 2) return SendClientMessage(playerid,COLOR_GREY,"1)Lobster");
    if(FInfo[playerid][fish2] == 2) return SendClientMessage(playerid,COLOR_GREY,"2)Lobster");
    if(FInfo[playerid][fish3] == 2) return SendClientMessage(playerid,COLOR_GREY,"3)Lobster");
    if(FInfo[playerid][fish4] == 2) return SendClientMessage(playerid,COLOR_GREY,"4)Lobster");
    if(FInfo[playerid][fish5] == 2) return SendClientMessage(playerid,COLOR_GREY,"5)Lobster");
    if(FInfo[playerid][fish1] == 3) return SendClientMessage(playerid,COLOR_GREY,"1)SwordFish");
    if(FInfo[playerid][fish2] == 3) return SendClientMessage(playerid,COLOR_GREY,"2)SwordFish");
    if(FInfo[playerid][fish3] == 3) return SendClientMessage(playerid,COLOR_GREY,"3)SwordFish");
    if(FInfo[playerid][fish4] == 3) return SendClientMessage(playerid,COLOR_GREY,"4)SwordFish");
    if(FInfo[playerid][fish5] == 3) return SendClientMessage(playerid,COLOR_GREY,"5)SwordFish");
    if(FInfo[playerid][fish1] == 4) return SendClientMessage(playerid,COLOR_GREY,"1)Tuna");
    if(FInfo[playerid][fish2] == 4) return SendClientMessage(playerid,COLOR_GREY,"2)Tuna");
    if(FInfo[playerid][fish3] == 4) return SendClientMessage(playerid,COLOR_GREY,"3)Tuna");
    if(FInfo[playerid][fish4] == 4) return SendClientMessage(playerid,COLOR_GREY,"4)Tuna");
    if(FInfo[playerid][fish5] == 4) return SendClientMessage(playerid,COLOR_GREY,"5)Tuna");
    return 1;
}

CMD:fishhelp(playerid,params[])
{
    SendClientMessage(playerid,COLOR_GREEN,"Fish System Made by Jueix");
    SendClientMessage(playerid,COLOR_GREEN,"Commands: /Fishinfo, /Catchfish and /sellfish.");
    return 1;
}

stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
        {
            SendClientMessage(i,color,string);
        }
    }
}
parts I changed, Where the first timer which is known as fishcatch I edited it to have an other settimer in due to a glitch when the player typed /catchfish it wouldn't show a fish at first then when he typed it again it would catch one and also this
pawn Код:
FInfo[playerid][fish2] < 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 2 //basicly all them from that to
FInfo[playerid][fish2] == 1 && FInfo[playerid][fish1] > 1 && FInfo[playerid][fishcurrentid] == 2
heres the random code
pawn Код:
 
pawn Код:
new RandomFish[][] =
{
{4}, // tuna
{3}, // swordfish
{0},  // boot
{0}, // boot
{0},
{2} //lobster
};

new RandomFishlbs[][] =
{
{55},
{55},
{55},
{100},
{100},
{125},
{150},
{200},
{250}
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)