Little help
#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


Messages In This Thread
Little help - by Sanady - 22.06.2015, 09:08
Re: Little help - by AlonzoTorres - 22.06.2015, 09:13
Re: Little help - by Sanady - 22.06.2015, 09:48
Re: Little help - by Sanady - 22.06.2015, 10:15
Re: Little help - by Gammix - 22.06.2015, 10:28
Re: Little help - by Sanady - 22.06.2015, 11:05
Re: Little help - by Sanady - 23.06.2015, 09:49

Forum Jump:


Users browsing this thread: 2 Guest(s)