Gate opens but dosent close?
#1

I walk up to my gate, It opens, If i walk away, It stays open?
It should close? But why, I checked my coordinates..

pawn Код:
public CheckGate(playerid)
{
  for(new i;i<MAX_PLAYERS;i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(IsPlayerInRangeOfPoint(i, 10.0, 1589.048096, -1637.884277, 12.902792) && c_gate_status == 0)
    {
    if(GetPlayerTeam(playerid) == 1)
    {
            MoveObject(c_gate, 1596.955811, -1637.884277, 12.902792, 2);
            PlayerPlaySound(i, 1165, 1589.048096, -1637.884277, 12.902792);
            c_gate_status = 1;
    }
    else if(!IsPlayerInRangeOfPoint(i, 10.0, 1589.048096, -1637.884277, 12.902792) && c_gate_status == 1)
    {
            MoveObject(c_gate, 1589.048096, -1637.884277, 12.902792, 2);
            PlayerPlaySound(i, 1165, 1589.048096, -1637.884277, 12.902792);
            c_gate_status = 0;
            }
        }
    }
}
Reply


Messages In This Thread
Gate opens but dosent close? - by Torran - 03.02.2010, 22:32
Re: Gate opens but dosent close? - by Fedee! - 03.02.2010, 22:35
Re: Gate opens but dosent close? - by Torran - 03.02.2010, 22:45
Re: Gate opens but dosent close? - by s0nic - 03.02.2010, 23:01
Re: Gate opens but dosent close? - by Torran - 03.02.2010, 23:06
Re: Gate opens but dosent close? - by GTAguillaume - 03.02.2010, 23:15
Re: Gate opens but dosent close? - by s0nic - 03.02.2010, 23:23
Re: Gate opens but dosent close? - by Joe Staff - 04.02.2010, 01:49
Re: Gate opens but dosent close? - by Torran - 04.02.2010, 08:02
Re: Gate opens but dosent close? - by Torran - 05.02.2010, 15:50

Forum Jump:


Users browsing this thread: 4 Guest(s)