20.01.2014, 06:33
!pTeam[POST] or other zone ? that's incorrect,
variable pTeam Correct definition is
Players, not zones, so it's pTeam[playerid]
here's my code i'm using, it's works fine:
variable pTeam Correct definition is
pawn Код:
new pTeam[MAX_PLAYERS]
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;
}