Capture zone can be captured again bug help
#7

!pTeam[POST] or other zone ? that's incorrect,
variable pTeam Correct definition is
pawn Код:
new pTeam[MAX_PLAYERS]
Players, not zones, so it's pTeam[playerid]
here's my code i'm using, it's works fine:
pawn Код:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == CP[AREA])
    {
        if(UnderAttack[AREA] == 0)
        {
            if(tCP[AREA] !=gTeam[playerid])
            {
                CountVar[playerid][CAPZONE] = 25;
                ActiveAREA(playerid);
            }else return SendClientMessage(playerid, -1, "[ZONE] This Zone is already Captured by your team");
        }else return SendClientMessage(playerid, -1, "This zone is already Under Attack!");
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)