#1

well i want to add more then 1 automatic gates. So i was wondering how we do this. I am using the way they teach us on here. But i got my first one done easily. I need to add two more. Thanks
Reply
#2

do the same thing u did for the first one? rofl
Reply
#3

well i did but htis is what i get
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;
  }
errors (142) : warning 217: loose indentation
(142) : error 021: symbol already defined: "X"
Reply
#4

simply remove new Float:X, Float:Y, Float:Z; from the SECOND one, and


For loose intendention errors, just press TAB to intendent your code.
Reply
#5

Thank you soo much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)