24.04.2012, 22:12
How to kill player in the other team if they're in the exact area?
I got this
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:X, Float:Y, Float:Z;
for(new i=0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, X, Y, Z);
if (gTeam[i] != TEAM_MARINES && X <= 2478.038 && X >= 2700.614 && Y <= 2672.355 && Y >= 2846.418)
{
SetPlayerHealth(i, -999999.9);
}
if (gTeam[i] != TEAM_OPFOR && X <= 2478.038 && X >= 2700.614 && Y <= 2672.355 && Y >= 2846.418)
{
SetPlayerHealth(i, -999999.9);
}
if (gTeam[i] != TEAM_SAS && X <= 2478.038 && X >= 2700.614 && Y <= 2672.355 && Y >= 2846.418)
{
SetPlayerHealth(i, -999999.9);
}
if (gTeam[i] != TEAM_TERO && X <= 2478.038 && X >= 2700.614 && Y <= 2672.355 && Y >= 2846.418)
{
SetPlayerHealth(i, -999999.9);
}
}
}