Capture Zones Basic needs more.
#7

Quote:
Originally Posted by Pinguinn
View Post
Try this. I don't know if it works but as Lorenc_ also said, this is an example

If you got a function like "GetTeamArea" then you need to replace "if(gTeam[i] ==)"
Add this at the area capture

NOTE: You don't have to add the loops everywhere. At the top of the public function start with "for(new i; i < MAX_PLAYERS; i++)".
Open with a bracket and then end with a bracket.

pawn Code:
for(new i; i < MAX_PLAYERS; i++)
{
    if(gTeam[i] == gTeam[playerid])
    {
        SetPVarInt(i, "areaTaken/*add the area here for example Area69*/", 1);
    }
}
Add this when he enters the area

pawn Code:
for(new i; i < MAX_PLAYERS; i++)
{
    if(gTeam[i] == /* add team here*/ && (GetPVarInt(i, "areaTaken/*add the area here for example Area69*/") == 1))
    {
        SendClientMessage(playerid, "Your team has already taken over this area");
        SetPVarInt(playerid, "team/*team name*/_area/*area name*/", 1);
    }
}
Add this when the area is taken over from an other team

pawn Code:
for(new i; i < MAX_PLAYERS; i++)
{
    if(GetPVarInt(i, teamEurope_areaArea69) == 1)   // THIS IS AN EXAMPLE
    {
        SetPVarInt(i, teamEurope_areaArea69, 0);
    }
   
    if(gTeam[i] == /* add team here*/ && (GetPVarInt(i, "areaTaken/*add the area here for example Area69*/") == 1))
    {
        SetPVarInt(playerid, "team/*team name*/_area/*area name*/", 1);
    }
}
How can i make this in a timer so the player needs to be 20 seconds in pickup to capture?
Reply


Messages In This Thread
Capture Zones Basic needs more. - by Admigo - 20.08.2011, 14:35
Re: Capture Zones Basic needs more. - by Lorenc_ - 20.08.2011, 14:58
Re: Capture Zones Basic needs more. - by Admigo - 20.08.2011, 15:11
Re: Capture Zones Basic needs more. - by Admigo - 20.08.2011, 15:42
Re: Capture Zones Basic needs more. - by Babul - 20.08.2011, 16:17
Re: Capture Zones Basic needs more. - by Pinguinn - 20.08.2011, 16:52
Re: Capture Zones Basic needs more. - by Admigo - 20.08.2011, 20:27
Re: Capture Zones Basic needs more. - by FearLe$$ - 29.06.2012, 05:09

Forum Jump:


Users browsing this thread: 1 Guest(s)