26.06.2012, 08:42
You can use following to detect that if its already captured
Example Code:
pawn Code:
new tCP[30];
new iCP[30];
pawn Code:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP[UnityStation])
{
if(tCP[UnityStation] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
if(UnderAttack[UnityStation] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
UnderAttack[UnityStation] = 1;
timer[playerid][UnityStation] = SetTimerEx("CaptureZone",30000,false,"i", playerid);
SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
new string[128];
format(string, sizeof(string),"[ATTENTION]: Unity Station is Being taken Over!");
SendClientMessageToAll(COLOR_RED,string);
iCP[playerid] = UnityStation;
}