Problem with gate
#6

Ofcourse it doesnt work, because you have this
pawn Код:
if(!PlayerToPoint(15.0,playerid,1598.306885, -1637.804443, 15.260101)) return SendClientMessage(playerid,COLOR_VEH,"You're too far from the LSPD Gate");
If you're not in that radius(15.0), it will send you the message


Heres fixed code:
pawn Код:
if(strcmp(cmdtext,"/gate", true) == 0)
{
  if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 0)
  {
    if(PlayerToPoint(15.0,playerid,1598.306885, -1637.804443, 15.260101))
    {
      if(Moved == 0)
      {
        MoveObject(lspdgate, 1598.306885, -1637.804443, 15.260101, 2.0); Moved = 1;
      }
      else
      {
        MoveObject(lspdgate, 1590.306885, -1637.804443, 15.260101, 2.0); Moved = 0;
      }
    }
    else return SendClientMessage(playerid,COLOR_VEH,"You're too far from the LSPD gate.");
  }
  else if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
  {
    if(PlayerToPoint(15.0,playerid,1545.539795, -1451.062866, 15.331202))
    {
      if(Moved == 0)
      {
        MoveObject(fbigate, 1545.539795, -1451.062866, 15.331202, 2.0); Moved = 1;
      }
      else
      {
        MoveObject(fbigate, 1534.842773, -1451.141357, 15.331202, 2.0); Moved = 0;
      }
    }
    else return SendClientMessage(playerid,COLOR_VEH,"You're too far from the FBI gate.");
  }
  return 1;
}
Reply


Messages In This Thread
Problem with gate - by [Sk]Noob - 25.07.2009, 19:17
Re: Problem with gate - by member - 25.07.2009, 20:04
Re: Problem with gate - by [Sk]Noob - 25.07.2009, 21:06
Re: Problem with gate - by member - 25.07.2009, 21:17
Re: Problem with gate - by [Sk]Noob - 25.07.2009, 21:54
Re: Problem with gate - by M4S7ERMIND - 25.07.2009, 22:20
Re: Problem with gate - by [Sk]Noob - 26.07.2009, 08:37
Re: Problem with gate - by [Sk]Noob - 26.07.2009, 21:29

Forum Jump:


Users browsing this thread: 1 Guest(s)