14.02.2011, 15:18
Quote:
No,you don't understand what his asking xD
Healian,what do you use to check if the are is captured? What variable? |
You will have to save the area stats, but even if you do not do that, you will have to check it like that:
pawn Код:
if(Area1 == 1)
{
if(gTeam[playerid] == TEAM_Arabian)
{
SendClientMessage(playerid,0xADFF2FAA, "This area is already captured by your team");
KillTimer(timer1);
}
else
{
new Float:x, Float:y, Float:z;
for(new i = 0; i< MAX_PLAYERS; i++)
{
GetPlayerPos(i, x, y, z);
if (IsPlayerInRangeOfPoint(i, 15.0,AREA_X,AREA_Y,AREA_Z)) return 1; // won't do anything since there is already somebody in a different team in this area
//AREA_X/AREA_Y/AREA_Z - You area position. Change it!
}
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);
}
}