Posts: 122
Threads: 29
Joined: Feb 2011
Reputation:
0
i need a thing that prevents me to capture an area that already being captured by another one !!
In Another way i need that no 2 teams can capture the same area at the same time if the area being captured by a player you need to kill him or move him from the checkpoint to be able to capture the area else you are prevented cuz another one is already capturing this area
no 2 teams can capture the same area at the same time
Posts: 119
Threads: 10
Joined: Jan 2011
Reputation:
0
Find the function which checks if a player is inside an area (so he can capture it), then check if any other player(s) (in a different team) is/are inside the same area.
Just run a loop and check for each player's X,Y,Z information.
Posts: 122
Threads: 29
Joined: Feb 2011
Reputation:
0
can you explain it more or just give me an example
Posts: 1,701
Threads: 110
Joined: Aug 2010
Reputation:
0
No,you don't understand what his asking xD
Healian,what do you use to check if the are is captured?
What variable?
Posts: 122
Threads: 29
Joined: Feb 2011
Reputation:
0
if(Area1 == 1)
{
if(gTeam[playerid] == TEAM_Arabian)
SendClientMessage(playerid,0xADFF2FAA, "This area is already captured by your team");
KillTimer(timer1);
}
else
{
if(gTeam[playerid] == TEAM_Arabian) timer1;
SendClientMessage(playerid,0xADFF2FAA, "Stay here for 30 seconds to capture the area");
KillTimer(timoo2);
KillTimer(timoo3);
KillTimer(timoo4);
KillTimer(timoo5);
Posts: 122
Threads: 29
Joined: Feb 2011
Reputation:
0
new timer1;
forward MyTimer(playerid);
public MyTimer(playerid)//Belltimer
{
if(gTeam[playerid] == TEAM_Arabian)
GangZoneShowForAll(a1,0xB8860BAA);
SendClientMessageToAll(0xFF9900AA, "The Bell has been controlled by the Arabians");
Area1 = 1;
KillTimer(timer1);
}
Posts: 122
Threads: 29
Joined: Feb 2011
Reputation:
0
i need if i am standing in the check point capturing the area no one can come capture it with me only clear check point without any one inside it can be captured