22.06.2010, 23:15
well i did but htis is what i get
errors (142) : warning 217: loose indentation
(142) : error 021: symbol already defined: "X"
pawn Код:
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
if (X <= 799.7739 && X >= 768.5180 && Y <= -1164.1331 && Y >= -1143.6027)
/* This line is the important one!. Here, is where you change those numbers, by the ones
you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
doesn't matter*/
{
if( GetPlayerTeam(i) == TEAM_BOYS)
{
MoveObject(maingate, 795.3819,-1152.7036,23.5723, 1);
}
else
{
MoveObject(maingate, 785.3819,-1152.7036,23.5723, 1);
}
}
}
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
if (X <= 654.9849 && X >= 662.5640 && Y <= -1210.4519 && Y >= -1243.0741)
/* This line is the important one!. Here, is where you change those numbers, by the ones
you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
doesn't matter*/
{
if( GetPlayerTeam(i) == TEAM_BOYS)
{
MoveObject(maingate2, 681.7512,-1227.6823,15.7329, 1);
}
else
{
MoveObject(maingate2, 661.7512,-1227.6823,15.7329, 1);
}
}
}
return 1;
}
(142) : error 021: symbol already defined: "X"