Making GangZones To TakeOver ..
#1

Hello i think this is going to be a hard one :/ i cant figure out how to make takeovers for places.

Now i have teams.
Код:
#define TEAM_BALLAS 1
#define TEAM_GROVE 2
#define TEAM_VAGOS 3
#define TEAM_AZTECAS 4
#define TEAM_BIKERS 5
They are all set up so is the spawning so i dont think it matters much.

I did make zones but they wern't very good so i removed them so i have no zones. Now when i have made the zones, How do i make it so When 3 people in that area have been killed, it flashes, then continues to flash for 2 Mins, then changes to take over if the team is able to stay there.

Sorry i didn't have much code:/ I would appritiate any help.
I have also tried looking for a filterscript which would do this but i got no luck:/
Reply
#2

Start off with 3 people dying.
pawn Код:
new deaths = 0;
Check if these people died in the area that you want them to die
Getplayerpos or IsPlayerInrangeOfPoint
In OnplayerDeath,
pawn Код:
public OnPlayerDeath(...)
{
(Might want to check if a player is in a specific team here)
{
      if(Did the player die in your area)
      {
             deaths= deaths +1
             if(deaths == 3)
             {
                  SetTimerEx(EndTimer, ....);
                  SetTimerEx(FlashTimer, ....);
              }
      }
      return 1;
}
}
So now you can put a timer that makes the gangzones flash, change the color every second, or something like that.
Don't forget to add a timer that counts to 2 minutes.
pawn Код:
public FlashTimer(...)
{
       Change the color;
       SetTimerEx(FlashTimerTwo,...);
       return 1;
}

public FlashTimerTwo(...)
{
       Change the color;
       SetTimerEx(FlashTimer,...);
       return 1;
}
And at the end of the 2 minute timer, you change the gangzone to the team that took over.
pawn Код:
public endtimer(...)
{
       KillTimer(FlashTimer);
       KillTimer(FlashTimerTwo);
       Change the color if you want to
       return 1;
}
Let me know If you have any questions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)