Killing player in other team in the area
#1

How to kill player in the other team if they're in the exact area?

I got this

PHP код:
static gTeam[MAX_PLAYERS];
#define TEAM_MARINES 1
#define TEAM_OPFOR 2
#define TEAM_SAS 3
#define TEAM_TERO 4
public isPlayerInArea()
{
    new 
Float:XFloat:YFloat:Z
    for(new 
i=0MAX_PLAYERSi++) 
    {
        
GetPlayerPos(iXYZ); 
        if (
gTeam[i] != TEAM_MARINES && <= 2478.038 && >= 2700.614 && <= 2672.355 && >= 2846.418)
        {
        
SetPlayerHealth(i, -999999.9);
        }
        if (
gTeam[i] != TEAM_OPFOR && <= 2478.038 && >= 2700.614 && <= 2672.355 && >= 2846.418)
        {
        
SetPlayerHealth(i, -999999.9);
        }
        if (
gTeam[i] != TEAM_SAS && <= 2478.038 && >= 2700.614 && <= 2672.355 && >= 2846.418)
        {
        
SetPlayerHealth(i, -999999.9);
        }
        if (
gTeam[i] != TEAM_TERO && <= 2478.038 && >= 2700.614 && <= 2672.355 && >= 2846.418)
        {
        
SetPlayerHealth(i, -999999.9);
        }
    }

Reply
#2

Y <= 2672.355 && Y >= 2846.418

should be

Y >= 2672.355 && Y <= 2846.418

understand why?
Reply
#3

Okay, i can't understand the difference. Could you tell me why, please?
Reply
#4

Well, let's set team 1 that cannot reach some area

Set this on
"OnPlayerUpdate"

PHP код:
if(GetPlayerTeam 2)
{
              
IsPlayerInRangeOfPoint(playerid,  etc..[/LEFT]
              {
                      
SetPlayerHealth(playerid0); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)