Little help
#1

Hello everybody, I got problem, again. I created Gangzone system, when player enters dynamic CP, zone should start being captured. But here the problem, code or streamer somehow is not indicating that player is in CP, I don`t know why, I am hooking OnPlayerEnterDynamicCP and OnPlayerExitDynamicCP but script somehow can`t see that player is in Zone, first I thought it`s becouse of ID of CP, but it`s not, I checked three times whole system, everything looks fine. But bug is showing up again and again. Please take a look what I wrote here, and feel free give me suggestion how to fix that.

Also here are the screens too:




When player enter CP, message should show up but nothing happend... :/
Reply
#2

When do you create the checkpoint? Show us OnPlayerEnterDynamicCP? We need some code to work with. It's hard to guess what could be wrong.
Reply
#3

pawn Код:
hook OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    SendDebug(playerid, "Enter CP: 1");
    for(new i = 0; i < sizeof(GangZone); i++)
    {
        SendDebug(playerid, "Enter CP: 2");
        if(GangZone[i][cpID] == checkpointid)
        {
            SendDebug(playerid, "Enter CP: 3");
            if(GangZone[i][OwnerTeam] == pTeam[playerid]) return 1;
            SendDebug(playerid, "Enter CP: 4");
            if(GangZone[i][Capturing] != INVALID_PLAYER_ID) return 1;
            new ZonesCount;

            for(new x = 0; x < sizeof(GangZone); x++)
            {
                SendDebug(playerid, "Enter CP: 5");
                if(GangZone[x][OwnerTeam] == GangZone[i][OwnerTeam])
                SendDebug(playerid, "Enter CP: 6");
                ZonesCount ++;

            }
            SendDebug(playerid, "Enter CP: 7");
            if(GangZone[i][OwnerTeam] != 0 && ZonesCount <= 1)
            {
                SendClientMessage(playerid,0xFFFFFFFF,"{FFBB00}[Turf] "embed_white"You can`t capture this zone!");
                return 1;
            }

            SendMessageToAll(-1, "{FFBB00}[Turf] "embed_white"Capturing zone %s(%d)!", GangZone[i][ZoneName], i);

            GangZone[i][Capturing] = playerid;
            pCapturing[playerid] = i;
            GangZoneFlashForAll(i, GetTeamColor(pTeam[playerid]));

            GangZone[i][CapturingTimer] = SetTimerEx("OnPlayerCaptureGangZone", GangZone[i][CaptureTime], 0, "dd", playerid, i);
            return 1;
        }

    }
    return 1;
}
Reply
#4

Sorry for double posting but anyone checked?
Reply
#5

The streamer has a bad range check so it may return true even if you are a bit near the outline of the CP.

Did you try going out of the CP far from the point?
Reply
#6

Quote:
Originally Posted by Gammix
Посмотреть сообщение
The streamer has a bad range check so it may return true even if you are a bit near the outline of the CP.

Did you try going out of the CP far from the point?
Yes, I did, nothing changed
Reply
#7

Anyone?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)