Open and Close Gate
#10

Quote:
Originally Posted by Moustafa
I think i got the solution, at the radi of each GetDistanceBetweenPlayerobj to 1 instead of 15, because 15 is too big..

for example; like that
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if((newkeys == KEY_HORN) && (IsPlayerInAnyVehicle(playerid))){
    if(GetDistanceBetweenPlayerobj(playerid,1234.5, 1234.5, 1234.5) < 1){ // WHERE TO BE SO IT CAN BE OPENED
      MoveObject(gate1,xxxxx, xxxxxx, xxxxx);
      SendClientMessage(playerid, COLOR_RED, "You've opened the Gate.");
      return 1;
    }
    if(GetDistanceBetweenPlayerobj(playerid,6789.10, 6789.10, 9789.10) < 1){ // WHERE TO BE SO IT CAN BE CLOSED
      MoveObject(gate1,xxxxx,xxxxx,xxxxx);
      SendClientMessage(playerid, COLOR_RED, "You've closed the Gate.");
      return 1;
    }
  } return 0;
}
I don't understand.. because if I use 1, even I near the gate, I can't open!
Reply


Messages In This Thread
Open and Close Gate - by shark - 15.06.2009, 01:30
Re: Open and Close Gate - by Moustafa - 15.06.2009, 01:41
Re: Open and Close Gate - by shark - 15.06.2009, 01:48
Re: Open and Close Gate - by Moustafa - 15.06.2009, 06:06
Re: Open and Close Gate - by shark - 15.06.2009, 09:08
Re: Open and Close Gate - by Studio - 15.06.2009, 11:58
Re: Open and Close Gate - by JoeDaDude - 15.06.2009, 12:02
Re: Open and Close Gate - by shark - 15.06.2009, 12:37
Re: Open and Close Gate - by Moustafa - 15.06.2009, 15:28
Re: Open and Close Gate - by shark - 15.06.2009, 16:05

Forum Jump:


Users browsing this thread: 6 Guest(s)